aboutsummaryrefslogtreecommitdiff
path: root/lib/Transforms/Instrumentation/GCOVProfiling.cpp
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2012-10-09 00:01:21 +0000
committerBill Wendling <isanbard@gmail.com>2012-10-09 00:01:21 +0000
commit8831c0605bbc0c82ce56c2fb85bd681d1c013925 (patch)
tree99ab041142fcf8baf621d46fcb3afc99a113662e /lib/Transforms/Instrumentation/GCOVProfiling.cpp
parent9f11bf52b47cf91b09a6294a1b6dc750fa695fd8 (diff)
Convert to using the Attributes::Builder interface.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165465 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Instrumentation/GCOVProfiling.cpp')
-rw-r--r--lib/Transforms/Instrumentation/GCOVProfiling.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/Transforms/Instrumentation/GCOVProfiling.cpp b/lib/Transforms/Instrumentation/GCOVProfiling.cpp
index bcee0c5f04..4c71fe3f4a 100644
--- a/lib/Transforms/Instrumentation/GCOVProfiling.cpp
+++ b/lib/Transforms/Instrumentation/GCOVProfiling.cpp
@@ -682,7 +682,9 @@ void GCOVProfiler::insertCounterWriteout(
"__llvm_gcov_init", M);
F->setUnnamedAddr(true);
F->setLinkage(GlobalValue::InternalLinkage);
- F->addFnAttr(Attribute::NoInline);
+ Attributes::Builder B;
+ B.addNoInlineAttr();
+ F->addFnAttr(Attributes::get(B));
BB = BasicBlock::Create(*Ctx, "entry", F);
Builder.SetInsertPoint(BB);
@@ -701,7 +703,9 @@ void GCOVProfiler::insertIndirectCounterIncrement() {
cast<Function>(GCOVProfiler::getIncrementIndirectCounterFunc());
Fn->setUnnamedAddr(true);
Fn->setLinkage(GlobalValue::InternalLinkage);
- Fn->addFnAttr(Attribute::NoInline);
+ Attributes::Builder B;
+ B.addNoInlineAttr();
+ Fn->addFnAttr(Attributes::get(B));
Type *Int32Ty = Type::getInt32Ty(*Ctx);
Type *Int64Ty = Type::getInt64Ty(*Ctx);