[clang] [llvm] [MC] Remove Darwin SDK/Version from ObjFileInfo (PR #103025)

Alexis Engelke via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 13 10:46:35 PDT 2024


================
@@ -109,7 +109,6 @@ initializeRecordStreamer(const Module &M,
   MCContext MCCtx(TT, MAI.get(), MRI.get(), STI.get(), &SrcMgr);
   std::unique_ptr<MCObjectFileInfo> MOFI(
       T->createMCObjectFileInfo(MCCtx, /*PIC=*/false));
-  MOFI->setSDKVersion(M.getSDKVersion());
----------------
aengelke wrote:

I don't think so? I would *expect* that the information is always stored in the module -- and all call sites that create a MCObjectStreamer take the information from the module (the only reader of the MOFI fields was createMachOStreamer, but emitVersionForTarget is always (also) called from the AsmPrinter). I'm just 95% confident: tests pass + local code changes seem reasonable to me, but I certainly miss the "big picture" regarding LTO.

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


More information about the cfe-commits mailing list