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 | 1c4a175aefcdcf38230baa37dade6bbad3d53240 (patch) | |
tree | 9c4c377dbe49214d2205c495d58d6af2a6d612b2 /clang/lib/AST/ASTContext.cpp | |
parent | 5cdb8cc267d0820f724e8643b70c3bf74885c830 (diff) | |
download | bcm5719-llvm-1c4a175aefcdcf38230baa37dade6bbad3d53240.tar.gz bcm5719-llvm-1c4a175aefcdcf38230baa37dade6bbad3d53240.zip |
Remove getIntegerConstantExprValue in favor of using EvaluateAsInt.
llvm-svn: 70145
Diffstat (limited to 'clang/lib/AST/ASTContext.cpp')
-rw-r--r-- | clang/lib/AST/ASTContext.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/clang/lib/AST/ASTContext.cpp b/clang/lib/AST/ASTContext.cpp index 95bb1ba04b8..58fc42b036b 100644 --- a/clang/lib/AST/ASTContext.cpp +++ b/clang/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); } |