DHowett-MSFT accepted this revision. DHowett-MSFT added a comment. This revision is now accepted and ready to land.
This looks good to me, but I don't have a strong understanding of "outlining." ================ Comment at: lib/CodeGen/CGBlocks.cpp:1262 + if (IsWindows) { + auto *Init = llvm::Function::Create(llvm::FunctionType::get(CGM.VoidTy, + {}), llvm::GlobalValue::InternalLinkage, ".block_isa_init", ---------------- Is there value in emitting a list of blocks that need to be initialized, then initializing them in one go in a COMDAT-foldable function? ================ Comment at: lib/CodeGen/CGObjCGNU.cpp:1522 + GetClassVar(clsAlias.first) }, sectionName<ClassAliasSection>()); + // On ELF platforms, add a null value fore each special section so that we + // can always guarantee that the _start and _stop symbols will exist and be ---------------- nit: `fore` ================ Comment at: lib/CodeGen/CGObjCRuntime.cpp:234 + if ((CPI = dyn_cast_or_null<llvm::CatchPadInst>(Handler.Block->getFirstNonPHI()))) { + CGF.CurrentFuncletPad = CPI; + CPI->setOperand(2, CGF.getExceptionSlot().getPointer()); ---------------- this region may need reformatting ================ Comment at: lib/CodeGen/CGObjCRuntime.cpp:274 CGF.EmitBranchThroughCleanup(Cont); - } + CGF.CurrentFuncletPad = nullptr; + } ---------------- There's a scoped save/restore helper for this that'll offer better support for nested funclets. ``` SaveAndRestore<llvm::Instruction *> RestoreCurrentFuncletPad(CGF.CurrentFuncletPad); ``` Repository: rC Clang https://reviews.llvm.org/D50144 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits