diff options
author | Eli Friedman <eli.friedman@gmail.com> | 2009-04-26 19:19:15 +0000 |
---|---|---|
committer | Eli Friedman <eli.friedman@gmail.com> | 2009-04-26 19:19:15 +0000 |
commit | 9a901bb63990574ff0bcc12ff851d7a71cff8ddb (patch) | |
tree | a90ae2d57be74b5e2ce39197f486e31172c46f3f /lib/AST/ASTContext.cpp | |
parent | 9ec64d6e2fe575b297e1eaa5051efc2983373e25 (diff) |
Remove getIntegerConstantExprValue in favor of using EvaluateAsInt.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70145 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/ASTContext.cpp')
-rw-r--r-- | lib/AST/ASTContext.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/AST/ASTContext.cpp b/lib/AST/ASTContext.cpp index 95bb1ba04b..58fc42b036 100644 --- a/lib/AST/ASTContext.cpp +++ b/lib/AST/ASTContext.cpp @@ -549,8 +549,7 @@ void ASTRecordLayout::LayoutField(const FieldDecl *FD, unsigned FieldNo, if (const Expr *BitWidthExpr = FD->getBitWidth()) { // TODO: Need to check this algorithm on other targets! // (tested on Linux-X86) - FieldSize = - BitWidthExpr->getIntegerConstantExprValue(Context).getZExtValue(); + FieldSize = BitWidthExpr->EvaluateAsInt(Context).getZExtValue(); std::pair<uint64_t, unsigned> FieldInfo = Context.getTypeInfo(FD->getType()); @@ -2263,7 +2262,7 @@ static void EncodeBitField(const ASTContext *Context, std::string& S, const Expr *E = FD->getBitWidth(); assert(E && "bitfield width not there - getObjCEncodingForTypeImpl"); ASTContext *Ctx = const_cast<ASTContext*>(Context); - unsigned N = E->getIntegerConstantExprValue(*Ctx).getZExtValue(); + unsigned N = E->EvaluateAsInt(*Ctx).getZExtValue(); S += 'b'; S += llvm::utostr(N); } |