mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-20 00:20:11 +00:00
Don't remove aggregate-typed module level constants before encoding functions
since functions may contain aggregate constants too. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73220 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -277,22 +277,6 @@ void ValueEnumerator::EnumerateAttributes(const AttrListPtr &PAL) {
|
||||
}
|
||||
|
||||
|
||||
/// PurgeAggregateValues - If there are any aggregate values at the end of the
|
||||
/// value list, remove them and return the count of the remaining values. If
|
||||
/// there are none, return -1.
|
||||
int ValueEnumerator::PurgeAggregateValues() {
|
||||
// If there are no aggregate values at the end of the list, return -1.
|
||||
if (Values.empty() || Values.back().first->getType()->isSingleValueType())
|
||||
return -1;
|
||||
|
||||
// Otherwise, remove aggregate values...
|
||||
while (!Values.empty() && !Values.back().first->getType()->isSingleValueType())
|
||||
Values.pop_back();
|
||||
|
||||
// ... and return the new size.
|
||||
return Values.size();
|
||||
}
|
||||
|
||||
void ValueEnumerator::incorporateFunction(const Function &F) {
|
||||
NumModuleValues = Values.size();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user