[PATCH] On {mips, mipsel, mips64, mips64el}-freebsd, we need to pass any -G option to the assembler.

Brooks Davis brooks at one-eyed-alien.net
Fri May 29 16:23:05 PDT 2015


I may just not understand how render() works, but I tried it and it didn't seem to work to replace

StringRef v = A->getValue();
 CmdArgs.push_back(Args.MakeArgString("-G" + v));

with

A->render(Args, CmdArgs);


================
Comment at: lib/Driver/Tools.cpp:6746-6748
@@ +6745,5 @@
+  if (Arg *A = Args.getLastArg(options::OPT_G)) {
+    StringRef v = A->getValue();
+    CmdArgs.push_back(Args.MakeArgString("-G" + v));
+    A->claim();
+  }
----------------
rnk wrote:
> Any reason not to do `A->render(Args, CmdArgs);`?
I may just not understand how render() works, but I tried it and it didn't seem to work.  On annoying thing about -G is that it can work as "-G#" or "-G #" which seems to require the getValue() call to construct a -G# that will work with the assembler.

http://reviews.llvm.org/D10137

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the cfe-commits mailing list