aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGStmt.cpp
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2012-10-16 05:23:44 +0000
committerBill Wendling <isanbard@gmail.com>2012-10-16 05:23:44 +0000
commita6375560645177168099f1a1d96be8fa4718aa8e (patch)
treed9aa46214b5b6225d73237f05c0572b50b3b433b /lib/CodeGen/CGStmt.cpp
parentbc9e5ffb0d0757238c071764e4bc1fc8a1521097 (diff)
Use the Attributes::get method which takes an AttrVal value directly to simplify the code a bit. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166010 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGStmt.cpp')
-rw-r--r--lib/CodeGen/CGStmt.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/CodeGen/CGStmt.cpp b/lib/CodeGen/CGStmt.cpp
index dc441d9c5b..7c65b3c437 100644
--- a/lib/CodeGen/CGStmt.cpp
+++ b/lib/CodeGen/CGStmt.cpp
@@ -1632,10 +1632,9 @@ void CodeGenFunction::EmitAsmStmt(const AsmStmt &S) {
llvm::InlineAsm::get(FTy, AsmString, Constraints, HasSideEffect,
/* IsAlignStack */ false, AsmDialect);
llvm::CallInst *Result = Builder.CreateCall(IA, Args);
- llvm::AttrBuilder B;
- B.addAttribute(llvm::Attributes::NoUnwind);
Result->addAttribute(llvm::AttrListPtr::FunctionIndex,
- llvm::Attributes::get(getLLVMContext(), B));
+ llvm::Attributes::get(getLLVMContext(),
+ llvm::Attributes::NoUnwind));
// Slap the source location of the inline asm into a !srcloc metadata on the
// call. FIXME: Handle metadata for MS-style inline asms.