[PATCH] D127472: [llvm-driver] Add lld

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 13 10:39:58 PDT 2022


MaskRay accepted this revision.
MaskRay added inline comments.
This revision is now accepted and ready to land.


================
Comment at: lld/include/lld/Common/Driver.h:28
 // by cleanup.
-SafeReturn safeLldMain(int argc, const char **argv, llvm::raw_ostream &stdoutOS,
+SafeReturn safeLldMain(int argc, char **argv, llvm::raw_ostream &stdoutOS,
                        llvm::raw_ostream &stderrOS);
----------------
abrachet wrote:
> MaskRay wrote:
> > Seem unnecessary?
> I don't understand why, but `T**` doesn't implicitly convert to `const T **`, and the only way I could find to add the `const` qualifier to the inner pointer was through `const_cast` so I can either keep this as `const char **` and `const_cast` in from `lld_main` or keep this as `char **`. WDYT?
This should be fine. `const ` is the preferred one (I just  want to decouple unrelated changes....)


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

https://reviews.llvm.org/D127472



More information about the llvm-commits mailing list