[PATCH] D145899: [AIX][Clang] Respect -r when invoking the linker

wael yehia via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 13 10:17:42 PDT 2023


w2yehia added a comment.

testcase?



================
Comment at: clang/lib/Driver/ToolChains/AIX.cpp:236
+  if (Args.hasArg(options::OPT_r)) {
+    const char *Exec = Args.MakeArgString(ToolChain.GetLinkerPath());
+    C.addCommand(std::make_unique<Command>(
----------------
nit: can we avoid the code duplication here? We can use a `goto` or add `options::OPT_r` checking below. 
`./lib/Driver/ToolChains/Gnu.cpp` can be used as a reference.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D145899



More information about the cfe-commits mailing list