diff options
author | Bill Wendling <isanbard@gmail.com> | 2012-10-10 03:12:49 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2012-10-10 03:12:49 +0000 |
commit | f5e6d70f8c8f21e744a10fd463cdeddae31cbab5 (patch) | |
tree | e8c338c945b3a44c80d0d83c841eec689bfd75b7 /lib/Transforms/Instrumentation/GCOVProfiling.cpp | |
parent | ebf3a37c0a5cea1ded89750e88d672951bf133cc (diff) | |
download | llvm-f5e6d70f8c8f21e744a10fd463cdeddae31cbab5.tar.gz llvm-f5e6d70f8c8f21e744a10fd463cdeddae31cbab5.tar.bz2 llvm-f5e6d70f8c8f21e744a10fd463cdeddae31cbab5.tar.xz |
Have 'addFnAttr' take the attribute enum value. Then have it build the attribute object and add it appropriately. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165595 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Instrumentation/GCOVProfiling.cpp')
-rw-r--r-- | lib/Transforms/Instrumentation/GCOVProfiling.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/Transforms/Instrumentation/GCOVProfiling.cpp b/lib/Transforms/Instrumentation/GCOVProfiling.cpp index 66d8570108..e9192e5cdd 100644 --- a/lib/Transforms/Instrumentation/GCOVProfiling.cpp +++ b/lib/Transforms/Instrumentation/GCOVProfiling.cpp @@ -682,9 +682,7 @@ void GCOVProfiler::insertCounterWriteout( "__llvm_gcov_init", M); F->setUnnamedAddr(true); F->setLinkage(GlobalValue::InternalLinkage); - Attributes::Builder B; - B.addAttribute(Attributes::NoInline); - F->addFnAttr(Attributes::get(B)); + F->addFnAttr(Attributes::NoInline); BB = BasicBlock::Create(*Ctx, "entry", F); Builder.SetInsertPoint(BB); @@ -703,9 +701,7 @@ void GCOVProfiler::insertIndirectCounterIncrement() { cast<Function>(GCOVProfiler::getIncrementIndirectCounterFunc()); Fn->setUnnamedAddr(true); Fn->setLinkage(GlobalValue::InternalLinkage); - Attributes::Builder B; - B.addAttribute(Attributes::NoInline); - Fn->addFnAttr(Attributes::get(B)); + Fn->addFnAttr(Attributes::NoInline); Type *Int32Ty = Type::getInt32Ty(*Ctx); Type *Int64Ty = Type::getInt64Ty(*Ctx); |