ahatanak added inline comments.
================ Comment at: lib/CodeGen/CGBlocks.cpp:271-276 llvm::GlobalVariable *global = - elements.finishAndCreateGlobal("__block_descriptor_tmp", - CGM.getPointerAlign(), - /*constant*/ true, - llvm::GlobalValue::InternalLinkage, - AddrSpace); + elements.finishAndCreateGlobal(descName, CGM.getPointerAlign(), + /*constant*/ true, linkage, AddrSpace); + + if (linkage == llvm::GlobalValue::LinkOnceODRLinkage) + global->setVisibility(llvm::GlobalValue::HiddenVisibility); ---------------- rsmith wrote: > Would it make sense to also mark this constant as `unnamed_addr`? Yes. I don't think there is any harm in marking it as `unnamed_addr`. However, unfortunately it looks like ld64 doesn't try to merge `unnamed_addr` global variables. Repository: rC Clang https://reviews.llvm.org/D50783 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits