summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/ASTContext.cpp
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2009-12-10 22:29:29 +0000
committerEli Friedman <eli.friedman@gmail.com>2009-12-10 22:29:29 +0000
commitee275c82ffd451499595d753d0dc3576f5e2280f (patch)
tree523369107145862231b1e5cf208786e8604706aa /clang/lib/AST/ASTContext.cpp
parent781161dc55edbbf5f95a9d6e52d1b9bd2348bdcb (diff)
downloadbcm5719-llvm-ee275c82ffd451499595d753d0dc3576f5e2280f.tar.gz
bcm5719-llvm-ee275c82ffd451499595d753d0dc3576f5e2280f.zip
Clean up enum constants so that they're finally sane. Fixes PR3173 and a
recently introduced crash. llvm-svn: 91070
Diffstat (limited to 'clang/lib/AST/ASTContext.cpp')
-rw-r--r--clang/lib/AST/ASTContext.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/AST/ASTContext.cpp b/clang/lib/AST/ASTContext.cpp
index 91fd1661338..0d5567370b9 100644
--- a/clang/lib/AST/ASTContext.cpp
+++ b/clang/lib/AST/ASTContext.cpp
@@ -4522,7 +4522,7 @@ unsigned ASTContext::getIntWidth(QualType T) {
return FWIT->getWidth();
}
if (EnumType *ET = dyn_cast<EnumType>(T))
- T = ET->getDecl()->getPromotionType();
+ T = ET->getDecl()->getIntegerType();
// For builtin types, just use the standard type sizing method
return (unsigned)getTypeSize(T);
}
OpenPOWER on IntegriCloud