]> granicus.if.org Git - clang/commitdiff
Move the Attributes::Builder outside of the Attributes class and into its own class...
authorBill Wendling <isanbard@gmail.com>
Mon, 15 Oct 2012 20:36:26 +0000 (20:36 +0000)
committerBill Wendling <isanbard@gmail.com>
Mon, 15 Oct 2012 20:36:26 +0000 (20:36 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165961 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGCall.cpp
lib/CodeGen/CGExpr.cpp
lib/CodeGen/CGObjCMac.cpp
lib/CodeGen/CGStmt.cpp
lib/CodeGen/ItaniumCXXABI.cpp
lib/CodeGen/TargetInfo.cpp

index 715438c8ffe3c0d878cb3c49e4fa8374f010bdd3..629c01d9f3523ef5ed64b17f7d217ab19e2918ec 100644 (file)
@@ -924,8 +924,8 @@ void CodeGenModule::ConstructAttributeList(const CGFunctionInfo &FI,
                                            const Decl *TargetDecl,
                                            AttributeListType &PAL,
                                            unsigned &CallingConv) {
-  llvm::Attributes::Builder FuncAttrs;
-  llvm::Attributes::Builder RetAttrs;
+  llvm::AttrBuilder FuncAttrs;
+  llvm::AttrBuilder RetAttrs;
 
   CallingConv = FI.getEffectiveCallingConvention();
 
@@ -984,7 +984,7 @@ void CodeGenModule::ConstructAttributeList(const CGFunctionInfo &FI,
     break;
 
   case ABIArgInfo::Indirect: {
-    llvm::Attributes::Builder SRETAttrs;
+    llvm::AttrBuilder SRETAttrs;
     SRETAttrs.addAttribute(llvm::Attributes::StructRet);
     if (RetAI.getInReg())
       SRETAttrs.addAttribute(llvm::Attributes::InReg);
@@ -1014,7 +1014,7 @@ void CodeGenModule::ConstructAttributeList(const CGFunctionInfo &FI,
          ie = FI.arg_end(); it != ie; ++it) {
     QualType ParamType = it->type;
     const ABIArgInfo &AI = it->info;
-    llvm::Attributes::Builder Attrs;
+    llvm::AttrBuilder Attrs;
 
     // 'restrict' -> 'noalias' is done in EmitFunctionProlog when we
     // have the corresponding parameter variable.  It doesn't make
@@ -1131,7 +1131,7 @@ void CodeGenFunction::EmitFunctionProlog(const CGFunctionInfo &FI,
   // Name the struct return argument.
   if (CGM.ReturnTypeUsesSRet(FI)) {
     AI->setName("agg.result");
-    llvm::Attributes::Builder B;
+    llvm::AttrBuilder B;
     B.addAttribute(llvm::Attributes::NoAlias);
     AI->addAttr(llvm::Attributes::get(getLLVMContext(), B));
     ++AI;
@@ -1203,7 +1203,7 @@ void CodeGenFunction::EmitFunctionProlog(const CGFunctionInfo &FI,
         llvm::Value *V = AI;
 
         if (Arg->getType().isRestrictQualified()) {
-          llvm::Attributes::Builder B;
+          llvm::AttrBuilder B;
           B.addAttribute(llvm::Attributes::NoAlias);
           AI->addAttr(llvm::Attributes::get(getLLVMContext(), B));
         }
index c62b1b10734526b49394c13f28534faa30d56d9c..809c1c15177d57f856bf15d6e91aae4c58fb1e47 100644 (file)
@@ -2081,7 +2081,7 @@ void CodeGenFunction::EmitCheck(llvm::Value *Checked, StringRef CheckName,
 
   llvm::FunctionType *FnType =
     llvm::FunctionType::get(CGM.VoidTy, ArgTypes, false);
-  llvm::Attributes::Builder B;
+  llvm::AttrBuilder B;
   B.addAttribute(llvm::Attributes::NoReturn)
     .addAttribute(llvm::Attributes::NoUnwind)
     .addAttribute(llvm::Attributes::UWTable);
index 749d9d4b04343fae56f7b4a2897d9075223700fd..c89171db5505adc59cee5cb096822302f875df3e 100644 (file)
@@ -63,7 +63,7 @@ private:
     // Add the non-lazy-bind attribute, since objc_msgSend is likely to
     // be called a lot.
     llvm::Type *params[] = { ObjectPtrTy, SelectorPtrTy };
-    llvm::Attributes::Builder B;
+    llvm::AttrBuilder B;
     B.addAttribute(llvm::Attributes::NonLazyBind);
     return CGM.CreateRuntimeFunction(llvm::FunctionType::get(ObjectPtrTy,
                                                              params, true),
@@ -583,7 +583,7 @@ public:
   llvm::Constant *getSetJmpFn() {
     // This is specifically the prototype for x86.
     llvm::Type *params[] = { CGM.Int32Ty->getPointerTo() };
-    llvm::Attributes::Builder B;
+    llvm::AttrBuilder B;
     B.addAttribute(llvm::Attributes::NonLazyBind);
     return CGM.CreateRuntimeFunction(llvm::FunctionType::get(CGM.Int32Ty,
                                                              params, false),
index 976d69d6b3ce87c01468a2cee247a6a0dac07407..dc441d9c5b56f18741d71cf547931a84cf93f906 100644 (file)
@@ -1632,7 +1632,7 @@ void CodeGenFunction::EmitAsmStmt(const AsmStmt &S) {
     llvm::InlineAsm::get(FTy, AsmString, Constraints, HasSideEffect,
                          /* IsAlignStack */ false, AsmDialect);
   llvm::CallInst *Result = Builder.CreateCall(IA, Args);
-  llvm::Attributes::Builder B;
+  llvm::AttrBuilder B;
   B.addAttribute(llvm::Attributes::NoUnwind);
   Result->addAttribute(llvm::AttrListPtr::FunctionIndex,
                        llvm::Attributes::get(getLLVMContext(), B));
index 42ca81e6a6a5857c501e717022452fac13f82289..bb63cb33ba4fcc5df764a7e1d576810eac8b2afe 100644 (file)
@@ -950,7 +950,7 @@ static llvm::Constant *getGuardAcquireFn(CodeGenModule &CGM,
   llvm::FunctionType *FTy =
     llvm::FunctionType::get(CGM.getTypes().ConvertType(CGM.getContext().IntTy),
                             GuardPtrTy, /*isVarArg=*/false);
-  llvm::Attributes::Builder B;
+  llvm::AttrBuilder B;
   B.addAttribute(llvm::Attributes::NoUnwind);
   return CGM.CreateRuntimeFunction(FTy, "__cxa_guard_acquire",
                                    llvm::Attributes::get(CGM.getLLVMContext(),
@@ -962,7 +962,7 @@ static llvm::Constant *getGuardReleaseFn(CodeGenModule &CGM,
   // void __cxa_guard_release(__guard *guard_object);
   llvm::FunctionType *FTy =
     llvm::FunctionType::get(CGM.VoidTy, GuardPtrTy, /*isVarArg=*/false);
-  llvm::Attributes::Builder B;
+  llvm::AttrBuilder B;
   B.addAttribute(llvm::Attributes::NoUnwind);
   return CGM.CreateRuntimeFunction(FTy, "__cxa_guard_release",
                                    llvm::Attributes::get(CGM.getLLVMContext(),
@@ -974,7 +974,7 @@ static llvm::Constant *getGuardAbortFn(CodeGenModule &CGM,
   // void __cxa_guard_abort(__guard *guard_object);
   llvm::FunctionType *FTy =
     llvm::FunctionType::get(CGM.VoidTy, GuardPtrTy, /*isVarArg=*/false);
-  llvm::Attributes::Builder B;
+  llvm::AttrBuilder B;
   B.addAttribute(llvm::Attributes::NoUnwind);
   return CGM.CreateRuntimeFunction(FTy, "__cxa_guard_abort",
                                    llvm::Attributes::get(CGM.getLLVMContext(),
index dca335d69d09db632802851aaf47979bf048ed69..75cc5a37a57ca9edb2fc26a27fcdb70b81ed2223 100644 (file)
@@ -968,7 +968,7 @@ void X86_32TargetCodeGenInfo::SetTargetAttributes(const Decl *D,
       llvm::Function *Fn = cast<llvm::Function>(GV);
 
       // Now add the 'alignstack' attribute with a value of 16.
-      llvm::Attributes::Builder B;
+      llvm::AttrBuilder B;
       B.addStackAlignmentAttr(16);
       Fn->addAttribute(llvm::AttrListPtr::FunctionIndex,
                        llvm::Attributes::get(CGM.getLLVMContext(), B));