Remove getIntegerConstantExprValue in favor of using EvaluateAsInt.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70145 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/AST/ASTContext.cpp b/lib/AST/ASTContext.cpp
index 95bb1ba..58fc42b 100644
--- a/lib/AST/ASTContext.cpp
+++ b/lib/AST/ASTContext.cpp
@@ -549,8 +549,7 @@
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 @@
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);
}