================

----------------
mmjjpp wrote:

You're right — since externalize() promotes all local globals to 
ExternalLinkage + HiddenVisibility above, NeedsConservativeClone checks 
hasLocalLinkage() which is always false at that point, making it dead code.
My original concern was that some globals might be missed, leading to undefined 
references. But on reflection, after externalize(), all globals are external 
and go to partition 0 (via the ShouldCloneDefinition fallback), while other 
partitions have declarations — which is correct for cross-partition linking.
I've removed the NeedsConservativeClone mechanism entirely, along with the 
associated cleanup loop in dealWithMpart.

https://github.com/llvm/llvm-project/pull/198702
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to