[llvm] [NFC][ModuleUtils] Move externalize() from module splitting utilities (PR #221181)

Teresa Johnson via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 14 08:02:05 PDT 2026


================
@@ -381,6 +381,18 @@ std::string llvm::getUniqueModuleId(Module *M) {
   return ("." + Str).str();
 }
 
+void llvm::externalizeGlobal(GlobalValue &GV) {
----------------
teresajohnson wrote:

I still have a preference for putting this into the GlobalValue class and making it more generic. You could add the nameUnnamedGlobalValue there too using a more generic (non-splitting specific) name like I suggested in my other comment. The other advantage is that nameUnnamedGlobalValue doesn't indicate from its name that it is very specific to splitting, however the name it gives to GVs is.

https://github.com/llvm/llvm-project/pull/221181


More information about the llvm-commits mailing list