[PATCH] D101921: [MC] Make it possible for targets to define their own MCObjectFileInfo

Philipp Krones via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 7 01:01:47 PDT 2021


flip1995 added inline comments.


================
Comment at: llvm/lib/DWARFLinker/DWARFStreamer.cpp:57
 
-  MOFI.reset(new MCObjectFileInfo);
-  MC.reset(
-      new MCContext(TheTriple, MAI.get(), MRI.get(), MOFI.get(), MSTI.get()));
-  MOFI->initMCObjectFileInfo(*MC, /*PIC=*/false);
+  MC.reset(new MCContext(TheTriple, MAI.get(), MRI.get(), /*MOFI=*/nullptr,
+                         MSTI.get()));
----------------
MaskRay wrote:
> The argument is almost always `/*MOFI=*/nullptr`. Doesn't this regress a bit?
I agree. I think the best thing to do here would be to just remove this argument?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D101921/new/

https://reviews.llvm.org/D101921



More information about the llvm-commits mailing list