[clang] [clang][modules] Remove `_Private` suffix from framework auto-link hints. (PR #77120)

Juergen Ributzka via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 8 10:01:38 PST 2024


================
@@ -984,7 +984,9 @@ static void inferFrameworkLink(Module *Mod) {
   assert(!Mod->isSubFramework() &&
          "Can only infer linking for top-level frameworks");
 
-  Mod->LinkLibraries.push_back(Module::LinkLibrary(Mod->Name,
+  StringRef FrameworkName(Mod->Name);
+  FrameworkName.consume_back("_Private");
+  Mod->LinkLibraries.push_back(Module::LinkLibrary(FrameworkName.str(),
----------------
ributzka wrote:

There is already an implicit allocation, because you need to pass a string to LinkLibrary.

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


More information about the cfe-commits mailing list