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

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 6 22:50:20 PDT 2021


MaskRay added a comment.

Can you post the RISCV patch depending on this one?



================
Comment at: llvm/include/llvm/Support/TargetRegistry.h:1029
 
+/// RegisterMCObjectFileInfo - Helper template for registering a target object
+/// file info implementation.  This invokes the static "Create" method on the
----------------
https://llvm.org/docs/CodingStandards.html#doxygen-use-in-documentation-comments
"Don’t duplicate function or class name at the beginning of the comment."

Just ignore existing comments which do not abide by the standard.


================
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()));
----------------
The argument is almost always `/*MOFI=*/nullptr`. Doesn't this regress a bit?


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