diff options
| author | John McCall <rjmccall@apple.com> | 2010-05-06 08:49:23 +0000 |
|---|---|---|
| committer | John McCall <rjmccall@apple.com> | 2010-05-06 08:49:23 +0000 |
| commit | 9aa35bed4584d99347843a45e7209e46c1829412 (patch) | |
| tree | 8524b4ab4fbf8667496b7e03a5f377eb42cc0bb5 /clang/lib/AST/Decl.cpp | |
| parent | 31cdcd46d6ce7a719d9dcf6348c873a346d7465e (diff) | |
| download | bcm5719-llvm-9aa35bed4584d99347843a45e7209e46c1829412.tar.gz bcm5719-llvm-9aa35bed4584d99347843a45e7209e46c1829412.zip | |
Remember the number of positive and negative bits used by the enumerators of
an enum in the enum decl itself. Use some spare bits from TagDecl for this
purpose.
llvm-svn: 103173
Diffstat (limited to 'clang/lib/AST/Decl.cpp')
| -rw-r--r-- | clang/lib/AST/Decl.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/clang/lib/AST/Decl.cpp b/clang/lib/AST/Decl.cpp index e19a9fb7c22..0336ca1eaac 100644 --- a/clang/lib/AST/Decl.cpp +++ b/clang/lib/AST/Decl.cpp @@ -1572,10 +1572,14 @@ void EnumDecl::Destroy(ASTContext& C) { } void EnumDecl::completeDefinition(QualType NewType, - QualType NewPromotionType) { + QualType NewPromotionType, + unsigned NumPositiveBits, + unsigned NumNegativeBits) { assert(!isDefinition() && "Cannot redefine enums!"); IntegerType = NewType; PromotionType = NewPromotionType; + setNumPositiveBits(NumPositiveBits); + setNumNegativeBits(NumNegativeBits); TagDecl::completeDefinition(); } |

