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
This commit is contained in:
Bill Wendling
2012-10-09 09:11:20 +00:00
parent e97a3a4b4f
commit 2e879bcd52
7 changed files with 66 additions and 153 deletions

View File

@ -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);