[PATCH] D21515: Update clang for D21514. NFC

Amaury SECHET via cfe-commits cfe-commits at lists.llvm.org
Sun Jun 19 20:59:41 PDT 2016


deadalnix created this revision.
deadalnix added reviewers: ahatanak, bkramer, whitequark, mehdi_amini, void.
deadalnix added a subscriber: cfe-commits.

As per title.

http://reviews.llvm.org/D21515

Files:
  lib/CodeGen/CGExpr.cpp

Index: lib/CodeGen/CGExpr.cpp
===================================================================
--- lib/CodeGen/CGExpr.cpp
+++ lib/CodeGen/CGExpr.cpp
@@ -2735,10 +2735,11 @@
 llvm::CallInst *CodeGenFunction::EmitTrapCall(llvm::Intrinsic::ID IntrID) {
   llvm::CallInst *TrapCall = Builder.CreateCall(CGM.getIntrinsic(IntrID));
 
-  if (!CGM.getCodeGenOpts().TrapFuncName.empty())
-    TrapCall->addAttribute(llvm::AttributeSet::FunctionIndex,
-                           "trap-func-name",
-                           CGM.getCodeGenOpts().TrapFuncName);
+  if (!CGM.getCodeGenOpts().TrapFuncName.empty()) {
+    auto A = llvm::Attribute::get(getLLVMContext(), "trap-func-name",
+                                  CGM.getCodeGenOpts().TrapFuncName);
+    TrapCall->addAttribute(llvm::AttributeSet::FunctionIndex, A);
+  }
 
   return TrapCall;
 }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D21515.61233.patch
Type: text/x-patch
Size: 847 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160620/f8f72bf9/attachment.bin>


More information about the cfe-commits mailing list