Remove getIntegerConstantExprValue in favor of using EvaluateAsInt.
llvm-svn: 70145
diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp
index a652ede..eeaa197 100644
--- a/clang/lib/CodeGen/CGDebugInfo.cpp
+++ b/clang/lib/CodeGen/CGDebugInfo.cpp
@@ -320,8 +320,7 @@
FieldSize = M->getContext().getTypeSize(FType);
Expr *BitWidth = Field->getBitWidth();
if (BitWidth)
- FieldSize =
- BitWidth->getIntegerConstantExprValue(M->getContext()).getZExtValue();
+ FieldSize = BitWidth->EvaluateAsInt(M->getContext()).getZExtValue();
FieldAlign = M->getContext().getTypeAlign(FType);
}
@@ -432,9 +431,8 @@
FieldSize = M->getContext().getTypeSize(FType);
Expr *BitWidth = Field->getBitWidth();
if (BitWidth)
- FieldSize =
- BitWidth->getIntegerConstantExprValue(M->getContext()).getZExtValue();
-
+ FieldSize = BitWidth->EvaluateAsInt(M->getContext()).getZExtValue();
+
FieldAlign = M->getContext().getTypeAlign(FType);
}