================ @@ -3919,18 +3919,16 @@ void CodeGenFunction::EmitTrapCheck(llvm::Value *Checked, Builder.CreateCondBr(Checked, Cont, TrapBB); EmitBlock(TrapBB); - llvm::CallInst *TrapCall = Builder.CreateCall( - CGM.getIntrinsic(llvm::Intrinsic::ubsantrap), - llvm::ConstantInt::get(CGM.Int8Ty, - ClSanitizeDebugDeoptimization - ? TrapBB->getParent()->size() - : static_cast<uint64_t>(CheckHandlerID))); + llvm::CallInst *TrapCall = + Builder.CreateCall(CGM.getIntrinsic(llvm::Intrinsic::ubsantrap), + llvm::ConstantInt::get(CGM.Int8Ty, CheckHandlerID)); if (!CGM.getCodeGenOpts().TrapFuncName.empty()) { auto A = llvm::Attribute::get(getLLVMContext(), "trap-func-name", CGM.getCodeGenOpts().TrapFuncName); TrapCall->addFnAttr(A); } + TrapCall->addFnAttr(llvm::Attribute::NoMerge); ---------------- vitalybuka wrote:
Please use this in the top if() as well. And double check boolean logic :) https://github.com/llvm/llvm-project/pull/117651 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits