Skip to content

Commit 21f51b3

Browse files
committedSep 9, 2016
Update clang for D21514. NFC
Summary: As per title. Reviewers: ahatanak, bkramer, whitequark, mehdi_amini, void Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D21515 llvm-svn: 281018
1 parent 5104e30 commit 21f51b3

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed
 

‎clang/lib/CodeGen/CGExpr.cpp

+5-4
Original file line numberDiff line numberDiff line change
@@ -2758,10 +2758,11 @@ void CodeGenFunction::EmitTrapCheck(llvm::Value *Checked) {
27582758
llvm::CallInst *CodeGenFunction::EmitTrapCall(llvm::Intrinsic::ID IntrID) {
27592759
llvm::CallInst *TrapCall = Builder.CreateCall(CGM.getIntrinsic(IntrID));
27602760

2761-
if (!CGM.getCodeGenOpts().TrapFuncName.empty())
2762-
TrapCall->addAttribute(llvm::AttributeSet::FunctionIndex,
2763-
"trap-func-name",
2764-
CGM.getCodeGenOpts().TrapFuncName);
2761+
if (!CGM.getCodeGenOpts().TrapFuncName.empty()) {
2762+
auto A = llvm::Attribute::get(getLLVMContext(), "trap-func-name",
2763+
CGM.getCodeGenOpts().TrapFuncName);
2764+
TrapCall->addAttribute(llvm::AttributeSet::FunctionIndex, A);
2765+
}
27652766

27662767
return TrapCall;
27672768
}

0 commit comments

Comments
 (0)
Please sign in to comment.