summaryrefslogtreecommitdiff
path: root/lib/Analysis/DebugInfo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Analysis/DebugInfo.cpp')
-rw-r--r--lib/Analysis/DebugInfo.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Analysis/DebugInfo.cpp b/lib/Analysis/DebugInfo.cpp
index 7ecb1ad8d4..3db7ff964c 100644
--- a/lib/Analysis/DebugInfo.cpp
+++ b/lib/Analysis/DebugInfo.cpp
@@ -477,7 +477,7 @@ DIFactory::DIFactory(Module &m)
/// 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 @@ Constant *DIFactory::GetStringConstant(const std::string &String) {
GlobalVariable::InternalLinkage,
ConstStr, ".str");
StrGV->setSection("llvm.metadata");
- return Slot = VMContext.getConstantExprBitCast(StrGV, DestTy);
+ return Slot = ConstantExpr::getBitCast(StrGV, DestTy);
}
//===----------------------------------------------------------------------===//
@@ -779,7 +779,7 @@ DIFactory::CreateGlobalVariable(DIDescriptor Context, const std::string &Name,
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]));