[PATCH] D30760: Record command lines in objects built by clang, Clang part
George Burgess IV via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Mar 23 18:48:26 PDT 2017
george.burgess.iv added inline comments.
================
Comment at: lib/Driver/ToolChains/Clang.cpp:4328
+ if (getToolChain().UseDwarfDebugFlags() ||
+ Args.hasArg(options::OPT_grecord_gcc_switches)) {
ArgStringList OriginalArgs;
----------------
looks like we have to consider `-gno-record-gcc-switches` (which already exists in Options.td), too. `hasFlag` should let you test them both easily.
please also add a test checking that we respect `-gno-record-gcc-switches`.
================
Comment at: test/CodeGen/debug-info-grecord-gcc-switches.c:6
+
+// CHECK: -g -grecord-gcc-switches -S -emit-llvm
----------------
nit: since `RenderAsInput` args (`-Xlinker`, `-o`, ...) have cases where they're printed without their arg, can we check that `-o -` is printed sanely here, as well?
https://reviews.llvm.org/D30760
More information about the cfe-commits
mailing list