diff options
author | Bill Wendling <isanbard@gmail.com> | 2012-10-09 09:11:20 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2012-10-09 09:11:20 +0000 |
commit | 2e879bcd52583335c753c005d203bf2ffe8b67b5 (patch) | |
tree | 519df78db10304e80747bbaecab158bc53664152 /lib/Transforms | |
parent | e97a3a4b4fccbe6283b616af93ab0117d3a7fee9 (diff) | |
download | external_llvm-2e879bcd52583335c753c005d203bf2ffe8b67b5.zip external_llvm-2e879bcd52583335c753c005d203bf2ffe8b67b5.tar.gz external_llvm-2e879bcd52583335c753c005d203bf2ffe8b67b5.tar.bz2 |
Use the enum value of the attributes when adding them to the attributes builder.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165494 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms')
-rw-r--r-- | lib/Transforms/IPO/PruneEH.cpp | 4 | ||||
-rw-r--r-- | lib/Transforms/Instrumentation/GCOVProfiling.cpp | 4 | ||||
-rw-r--r-- | lib/Transforms/Scalar/ObjCARC.cpp | 18 |
3 files changed, 13 insertions, 13 deletions
diff --git a/lib/Transforms/IPO/PruneEH.cpp b/lib/Transforms/IPO/PruneEH.cpp index 8ebf6ee..3e598ab 100644 --- a/lib/Transforms/IPO/PruneEH.cpp +++ b/lib/Transforms/IPO/PruneEH.cpp @@ -140,9 +140,9 @@ bool PruneEH::runOnSCC(CallGraphSCC &SCC) { Attributes::Builder NewAttributes; if (!SCCMightUnwind) - NewAttributes.addNoUnwindAttr(); + NewAttributes.addAttribute(Attributes::NoUnwind); if (!SCCMightReturn) - NewAttributes.addNoReturnAttr(); + NewAttributes.addAttribute(Attributes::NoReturn); Function *F = (*I)->getFunction(); const AttrListPtr &PAL = F->getAttributes(); diff --git a/lib/Transforms/Instrumentation/GCOVProfiling.cpp b/lib/Transforms/Instrumentation/GCOVProfiling.cpp index 4c71fe3..66d8570 100644 --- a/lib/Transforms/Instrumentation/GCOVProfiling.cpp +++ b/lib/Transforms/Instrumentation/GCOVProfiling.cpp @@ -683,7 +683,7 @@ void GCOVProfiler::insertCounterWriteout( F->setUnnamedAddr(true); F->setLinkage(GlobalValue::InternalLinkage); Attributes::Builder B; - B.addNoInlineAttr(); + B.addAttribute(Attributes::NoInline); F->addFnAttr(Attributes::get(B)); BB = BasicBlock::Create(*Ctx, "entry", F); @@ -704,7 +704,7 @@ void GCOVProfiler::insertIndirectCounterIncrement() { Fn->setUnnamedAddr(true); Fn->setLinkage(GlobalValue::InternalLinkage); Attributes::Builder B; - B.addNoInlineAttr(); + B.addAttribute(Attributes::NoInline); Fn->addFnAttr(Attributes::get(B)); Type *Int32Ty = Type::getInt32Ty(*Ctx); diff --git a/lib/Transforms/Scalar/ObjCARC.cpp b/lib/Transforms/Scalar/ObjCARC.cpp index dca6a72..629f9d2 100644 --- a/lib/Transforms/Scalar/ObjCARC.cpp +++ b/lib/Transforms/Scalar/ObjCARC.cpp @@ -1789,7 +1789,7 @@ Constant *ObjCARCOpt::getRetainRVCallee(Module *M) { Type *Params[] = { I8X }; FunctionType *FTy = FunctionType::get(I8X, Params, /*isVarArg=*/false); Attributes::Builder B; - B.addNoUnwindAttr(); + B.addAttribute(Attributes::NoUnwind); AttrListPtr Attributes = AttrListPtr().addAttr(~0u, Attributes::get(B)); RetainRVCallee = M->getOrInsertFunction("objc_retainAutoreleasedReturnValue", FTy, @@ -1805,7 +1805,7 @@ Constant *ObjCARCOpt::getAutoreleaseRVCallee(Module *M) { Type *Params[] = { I8X }; FunctionType *FTy = FunctionType::get(I8X, Params, /*isVarArg=*/false); Attributes::Builder B; - B.addNoUnwindAttr(); + B.addAttribute(Attributes::NoUnwind); AttrListPtr Attributes = AttrListPtr().addAttr(~0u, Attributes::get(B)); AutoreleaseRVCallee = M->getOrInsertFunction("objc_autoreleaseReturnValue", FTy, @@ -1819,7 +1819,7 @@ Constant *ObjCARCOpt::getReleaseCallee(Module *M) { LLVMContext &C = M->getContext(); Type *Params[] = { PointerType::getUnqual(Type::getInt8Ty(C)) }; Attributes::Builder B; - B.addNoUnwindAttr(); + B.addAttribute(Attributes::NoUnwind); AttrListPtr Attributes = AttrListPtr().addAttr(~0u, Attributes::get(B)); ReleaseCallee = M->getOrInsertFunction( @@ -1835,7 +1835,7 @@ Constant *ObjCARCOpt::getRetainCallee(Module *M) { LLVMContext &C = M->getContext(); Type *Params[] = { PointerType::getUnqual(Type::getInt8Ty(C)) }; Attributes::Builder B; - B.addNoUnwindAttr(); + B.addAttribute(Attributes::NoUnwind); AttrListPtr Attributes = AttrListPtr().addAttr(~0u, Attributes::get(B)); RetainCallee = M->getOrInsertFunction( @@ -1866,7 +1866,7 @@ Constant *ObjCARCOpt::getAutoreleaseCallee(Module *M) { LLVMContext &C = M->getContext(); Type *Params[] = { PointerType::getUnqual(Type::getInt8Ty(C)) }; Attributes::Builder B; - B.addNoUnwindAttr(); + B.addAttribute(Attributes::NoUnwind); AttrListPtr Attributes = AttrListPtr().addAttr(~0u, Attributes::get(B)); AutoreleaseCallee = M->getOrInsertFunction( @@ -3841,9 +3841,9 @@ Constant *ObjCARCContract::getStoreStrongCallee(Module *M) { Type *Params[] = { I8XX, I8X }; Attributes::Builder BNoUnwind; - BNoUnwind.addNoUnwindAttr(); + BNoUnwind.addAttribute(Attributes::NoUnwind); Attributes::Builder BNoCapture; - BNoCapture.addNoCaptureAttr(); + BNoCapture.addAttribute(Attributes::NoCapture); AttrListPtr Attributes = AttrListPtr() .addAttr(~0u, Attributes::get(BNoUnwind)) .addAttr(1, Attributes::get(BNoCapture)); @@ -3864,7 +3864,7 @@ Constant *ObjCARCContract::getRetainAutoreleaseCallee(Module *M) { Type *Params[] = { I8X }; FunctionType *FTy = FunctionType::get(I8X, Params, /*isVarArg=*/false); Attributes::Builder B; - B.addNoUnwindAttr(); + B.addAttribute(Attributes::NoUnwind); AttrListPtr Attributes = AttrListPtr().addAttr(~0u, Attributes::get(B)); RetainAutoreleaseCallee = M->getOrInsertFunction("objc_retainAutorelease", FTy, Attributes); @@ -3879,7 +3879,7 @@ Constant *ObjCARCContract::getRetainAutoreleaseRVCallee(Module *M) { Type *Params[] = { I8X }; FunctionType *FTy = FunctionType::get(I8X, Params, /*isVarArg=*/false); Attributes::Builder B; - B.addNoUnwindAttr(); + B.addAttribute(Attributes::NoUnwind); AttrListPtr Attributes = AttrListPtr().addAttr(~0u, Attributes::get(B)); RetainAutoreleaseRVCallee = M->getOrInsertFunction("objc_retainAutoreleaseReturnValue", FTy, |