mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-21 08:17:40 +00:00
Move ConstantExpr to 2.5 API.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77494 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -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]));
|
||||
|
||||
Reference in New Issue
Block a user