Merge pull request #551 from mmp/constfold

Improvements to constant folding.
This commit is contained in:
Dmitry Babokin
2013-07-24 10:27:04 -07:00
7 changed files with 267 additions and 270 deletions

View File

@@ -1199,7 +1199,7 @@ lEmitEnumDecls(const std::vector<const EnumType *> &enumTypes, FILE *file) {
const Symbol *e = enumTypes[i]->GetEnumerator(j);
Assert(e->constValue != NULL);
unsigned int enumValue;
int count = e->constValue->AsUInt32(&enumValue);
int count = e->constValue->GetValues(&enumValue);
Assert(count == 1);
// Always print an initializer to set the value. We could be