diff options
Diffstat (limited to 'lib/CodeGen/CGCall.cpp')
-rw-r--r-- | lib/CodeGen/CGCall.cpp | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/lib/CodeGen/CGCall.cpp b/lib/CodeGen/CGCall.cpp index e8d99e2f5a..15db9fd305 100644 --- a/lib/CodeGen/CGCall.cpp +++ b/lib/CodeGen/CGCall.cpp @@ -990,7 +990,8 @@ void CodeGenModule::ConstructAttributeList(const CGFunctionInfo &FI, SRETAttrs.addAttribute(llvm::Attributes::InReg); PAL.push_back(llvm:: AttributeWithIndex::get(Index, - llvm::Attributes::get(SRETAttrs))); + llvm::Attributes::get(getLLVMContext(), + SRETAttrs))); ++Index; // sret disables readnone and readonly @@ -1006,7 +1007,8 @@ void CodeGenModule::ConstructAttributeList(const CGFunctionInfo &FI, if (RetAttrs.hasAttributes()) PAL.push_back(llvm:: AttributeWithIndex::get(0, - llvm::Attributes::get(RetAttrs))); + llvm::Attributes::get(getLLVMContext(), + RetAttrs))); for (CGFunctionInfo::const_arg_iterator it = FI.arg_begin(), ie = FI.arg_end(); it != ie; ++it) { @@ -1039,7 +1041,8 @@ void CodeGenModule::ConstructAttributeList(const CGFunctionInfo &FI, if (Attrs.hasAttributes()) for (unsigned I = 0; I < Extra; ++I) PAL.push_back(llvm::AttributeWithIndex::get(Index + I, - llvm::Attributes::get(Attrs))); + llvm::Attributes::get(getLLVMContext(), + Attrs))); Index += Extra; } break; @@ -1072,12 +1075,14 @@ void CodeGenModule::ConstructAttributeList(const CGFunctionInfo &FI, if (Attrs.hasAttributes()) PAL.push_back(llvm::AttributeWithIndex::get(Index, - llvm::Attributes::get(Attrs))); + llvm::Attributes::get(getLLVMContext(), + Attrs))); ++Index; } if (FuncAttrs.hasAttributes()) PAL.push_back(llvm::AttributeWithIndex::get(~0, - llvm::Attributes::get(FuncAttrs))); + llvm::Attributes::get(getLLVMContext(), + FuncAttrs))); } /// An argument came in as a promoted argument; demote it back to its @@ -1127,7 +1132,7 @@ void CodeGenFunction::EmitFunctionProlog(const CGFunctionInfo &FI, AI->setName("agg.result"); llvm::Attributes::Builder B; B.addAttribute(llvm::Attributes::NoAlias); - AI->addAttr(llvm::Attributes::get(B)); + AI->addAttr(llvm::Attributes::get(getLLVMContext(), B)); ++AI; } @@ -1199,7 +1204,7 @@ void CodeGenFunction::EmitFunctionProlog(const CGFunctionInfo &FI, if (Arg->getType().isRestrictQualified()) { llvm::Attributes::Builder B; B.addAttribute(llvm::Attributes::NoAlias); - AI->addAttr(llvm::Attributes::get(B)); + AI->addAttr(llvm::Attributes::get(getLLVMContext(), B)); } // Ensure the argument is the correct type. |