Update for LLVM API change.

llvm-svn: 77267
This commit is contained in:
Owen Anderson
2009-07-27 22:29:56 +00:00
parent 45308b578b
commit 0e0189d64d
6 changed files with 51 additions and 53 deletions

View File

@@ -213,7 +213,7 @@ void CodeGenModule::EmitCtorList(const CtorList &Fns, const char *GlobalName) {
S.push_back(
llvm::ConstantInt::get(llvm::Type::Int32Ty, I->second, false));
S.push_back(VMContext.getConstantExprBitCast(I->first, CtorPFTy));
Ctors.push_back(VMContext.getConstantStruct(CtorStructTy, S));
Ctors.push_back(llvm::ConstantStruct::get(CtorStructTy, S));
}
if (!Ctors.empty()) {
@@ -507,7 +507,7 @@ llvm::Constant *CodeGenModule::EmitAnnotateAttr(llvm::GlobalValue *GV,
VMContext.getConstantExprBitCast(unitGV, SBP),
llvm::ConstantInt::get(llvm::Type::Int32Ty, LineNo)
};
return VMContext.getConstantStruct(Fields, 4, false);
return llvm::ConstantStruct::get(Fields, 4, false);
}
bool CodeGenModule::MayDeferGeneration(const ValueDecl *Global) {
@@ -1342,7 +1342,7 @@ CodeGenModule::GetAddrOfConstantCFString(const StringLiteral *Literal) {
llvm::ConstantInt::get(Ty, StringLength), CFRD, STy);
// The struct.
C = VMContext.getConstantStruct(STy, Fields);
C = llvm::ConstantStruct::get(STy, Fields);
GV = new llvm::GlobalVariable(getModule(), C->getType(), true,
llvm::GlobalVariable::PrivateLinkage, C,
"_unnamed_cfstring_");