vitalybuka added inline comments.
================ Comment at: clang/lib/CodeGen/CGExpr.cpp:3576-3597 + if (TrapBBs.size() <= CheckHandlerID) + TrapBBs.resize(CheckHandlerID + 1); + llvm::BasicBlock *&TrapBB = TrapBBs[CheckHandlerID]; + + if (!CGM.getCodeGenOpts().OptimizationLevel || !TrapBB || + (CurCodeDecl && CurCodeDecl->hasAttr<OptimizeNoneAttr>())) { + TrapBB = createBasicBlock("trap"); ---------------- looks like a lot of code duplication ================ Comment at: clang/lib/CodeGen/CGExpr.cpp:3594 + TrapCall->addFnAttr(A); + } + TrapCall->setDoesNotReturn(); ---------------- wouldn't be you issues solved with TrapCall->setCannotMerge() here? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148654/new/ https://reviews.llvm.org/D148654 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits