Looks mostly fine. I'm concerned about a -R option affecting the debug info 
that ends up in the object file. I'm also concerned that the diagnostic quality 
will degrade if you build with no debug info enabled at all.

  It seems to me that if we can afford the IR size increase from 
`-dwarf-column-info`, we can afford the IR size increase from storing the 
frontend's notion of 'source location' into the IR, and that would allow us to 
do the right thing without `-g` and to deal properly with macro expansions etc. 
(It's only 32 bits per location...)


================
Comment at: lib/Driver/Tools.cpp:3394
@@ +3393,3 @@
+    // remarks.
+    CmdArgs.push_back("-dwarf-column-info");
+    A->render(Args, CmdArgs);
----------------
I don't think it's OK for a diagnostic option to affect the contents of the 
object file.

================
Comment at: lib/Frontend/CompilerInvocation.cpp:523
@@ -522,1 +522,3 @@
 
+  if (Arg *A = Args.getLastArg(OPT_Rpass_EQ)) {
+    StringRef Val = A->getValue();
----------------
... so we take the last -Rpass= option, rather than combining them? I find that 
unintuitive, FWIW, but maybe this is the right model.


http://llvm-reviews.chandlerc.com/D3226
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to