We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e49834b commit 7fec45eCopy full SHA for 7fec45e
clang/lib/CodeGen/CGExpr.cpp
@@ -3928,6 +3928,9 @@ void CodeGenFunction::EmitTrapCheck(llvm::Value *Checked,
3928
CGM.getCodeGenOpts().TrapFuncName);
3929
TrapCall->addFnAttr(A);
3930
}
3931
+ // We unconditionally add NoMerge, even if this is the first time we've
3932
+ // seen this type of trap in this function. This is necessary because
3933
+ // inlining may occur in later stages.
3934
TrapCall->addFnAttr(llvm::Attribute::NoMerge);
3935
TrapCall->setDoesNotReturn();
3936
TrapCall->setDoesNotThrow();
0 commit comments