<div dir="ltr"><div>In the 4.0 cycle, the NamedOnly flag in IRMover.cpp was changed from true to false. This wound up breaking my out-of-tree compiler frontend.<br></div><div><br></div><div>The attached patch threads through the NamedOnly flag from IRMover to Linker and adds a new flag enum value. Thus, the behavior of existing code remains the same, but linker clients can override the NamedOnly behavior as needed.</div><div><br></div><div>I added new constructors to IRMover and Linker, rather than changing the signature of the existing constructors, to minimize changes in the rest of the codebase.</div><div><br></div><div>I originally implemented the patch against the 4.0 codebase. I've compiled it against trunk but didn't bother running any tests... I'm hoping that it's small enough that a mainline LLVM dev can fold the patch (with fixes for any style nits ;-)) into their compile-test cycle if desired.</div><div><br></div><div>Cheers!</div></div>