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/CodeGen/CGDebugInfo.cpp b/lib/CodeGen/CGDebugInfo.cpp
index a652ede..eeaa197 100644
--- a/lib/CodeGen/CGDebugInfo.cpp
+++ b/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);
}