Improvements to constant folding.
We can now do constant folding with all basic datatypes (the previous implementation handled int32 well, but had limited, if any, coverage for other datatypes.) Reduced a bit of repeated code in the constant folding implementation through template helper functions.
This commit is contained in:
2
type.cpp
2
type.cpp
@@ -804,7 +804,7 @@ EnumType::GetDIType(llvm::DIDescriptor scope) const {
|
||||
for (unsigned int i = 0; i < enumerators.size(); ++i) {
|
||||
unsigned int enumeratorValue;
|
||||
Assert(enumerators[i]->constValue != NULL);
|
||||
int count = enumerators[i]->constValue->AsUInt32(&enumeratorValue);
|
||||
int count = enumerators[i]->constValue->GetValues(&enumeratorValue);
|
||||
Assert(count == 1);
|
||||
|
||||
llvm::Value *descriptor =
|
||||
|
||||
Reference in New Issue
Block a user