[cfe-commits] r105476 - in /cfe/trunk: lib/Driver/Tools.cpp test/Driver/darwin-debug-flags.c
Daniel Dunbar
daniel at zuster.org
Fri Jun 4 11:47:06 PDT 2010
Author: ddunbar
Date: Fri Jun 4 13:47:06 2010
New Revision: 105476
URL: http://llvm.org/viewvc/llvm-project?rev=105476&view=rev
Log:
Driver: Change -dwarf-debug-flags option to pass the original command line
arguments after translation, instead of the -cc1 level arguments.
Modified:
cfe/trunk/lib/Driver/Tools.cpp
cfe/trunk/test/Driver/darwin-debug-flags.c
Modified: cfe/trunk/lib/Driver/Tools.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=105476&r1=105475&r2=105476&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Tools.cpp (original)
+++ cfe/trunk/lib/Driver/Tools.cpp Fri Jun 4 13:47:06 2010
@@ -1462,11 +1462,16 @@
// Optionally embed the -cc1 level arguments into the debug info, for build
// analysis.
if (getToolChain().UseDwarfDebugFlags()) {
+ ArgStringList OriginalArgs;
+ for (ArgList::const_iterator it = Args.begin(),
+ ie = Args.end(); it != ie; ++it)
+ (*it)->render(Args, OriginalArgs);
+
llvm::SmallString<256> Flags;
Flags += Exec;
- for (unsigned i = 0, e = CmdArgs.size(); i != e; ++i) {
+ for (unsigned i = 0, e = OriginalArgs.size(); i != e; ++i) {
Flags += " ";
- Flags += CmdArgs[i];
+ Flags += OriginalArgs[i];
}
CmdArgs.push_back("-dwarf-debug-flags");
CmdArgs.push_back(Args.MakeArgString(Flags.str()));
Modified: cfe/trunk/test/Driver/darwin-debug-flags.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/darwin-debug-flags.c?rev=105476&r1=105475&r2=105476&view=diff
==============================================================================
--- cfe/trunk/test/Driver/darwin-debug-flags.c (original)
+++ cfe/trunk/test/Driver/darwin-debug-flags.c Fri Jun 4 13:47:06 2010
@@ -2,10 +2,8 @@
// <rdar://problem/7256886>
// CHECK: !1 = metadata !{
-// CHECK: -cc1
-// CHECK: -triple i386-apple-darwin9
-// CHECK: -g
-// CHECK: -Os
+// CHECK: -mmacosx-version-min=10.5.0
+// CHECK: -g -Os
// CHECK: [ DW_TAG_compile_unit ]
int x;
More information about the cfe-commits
mailing list