Move ConstantExpr to 2.5 API.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77494 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Analysis/DebugInfo.cpp b/lib/Analysis/DebugInfo.cpp
index 7ecb1ad..3db7ff9 100644
--- a/lib/Analysis/DebugInfo.cpp
+++ b/lib/Analysis/DebugInfo.cpp
@@ -477,7 +477,7 @@
/// This is only valid when the descriptor is non-null.
Constant *DIFactory::getCastToEmpty(DIDescriptor D) {
if (D.isNull()) return VMContext.getNullValue(EmptyStructPtr);
- return VMContext.getConstantExprBitCast(D.getGV(), EmptyStructPtr);
+ return ConstantExpr::getBitCast(D.getGV(), EmptyStructPtr);
}
Constant *DIFactory::GetTagConstant(unsigned TAG) {
@@ -507,7 +507,7 @@
GlobalVariable::InternalLinkage,
ConstStr, ".str");
StrGV->setSection("llvm.metadata");
- return Slot = VMContext.getConstantExprBitCast(StrGV, DestTy);
+ return Slot = ConstantExpr::getBitCast(StrGV, DestTy);
}
//===----------------------------------------------------------------------===//
@@ -779,7 +779,7 @@
getCastToEmpty(Type),
ConstantInt::get(Type::Int1Ty, isLocalToUnit),
ConstantInt::get(Type::Int1Ty, isDefinition),
- VMContext.getConstantExprBitCast(Val, EmptyStructPtr)
+ ConstantExpr::getBitCast(Val, EmptyStructPtr)
};
Constant *Init = ConstantStruct::get(Elts, sizeof(Elts)/sizeof(Elts[0]));