[cfe-commits] r67257 - in /cfe/trunk: lib/Driver/Tools.cpp test/Driver/clang-translation.c
Daniel Dunbar
daniel at zuster.org
Wed Mar 18 16:39:35 PDT 2009
Author: ddunbar
Date: Wed Mar 18 18:39:35 2009
New Revision: 67257
URL: http://llvm.org/viewvc/llvm-project?rev=67257&view=rev
Log:
Driver: Fix bug in translating -O to clang, add clang-translation test
case.
Added:
cfe/trunk/test/Driver/clang-translation.c
Modified:
cfe/trunk/lib/Driver/Tools.cpp
Modified: cfe/trunk/lib/Driver/Tools.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=67257&r1=67256&r2=67257&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Tools.cpp (original)
+++ cfe/trunk/lib/Driver/Tools.cpp Wed Mar 18 18:39:35 2009
@@ -290,7 +290,7 @@
if (A->getValue(Args)[0] == '\0')
CmdArgs.push_back("-O1");
else
- CmdArgs.push_back(A->getValue(Args));
+ A->render(Args, CmdArgs);
}
Args.AddAllArgs(CmdArgs, options::OPT_clang_W_Group, options::OPT_pedantic_Group);
Added: cfe/trunk/test/Driver/clang-translation.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/clang-translation.c?rev=67257&view=auto
==============================================================================
--- cfe/trunk/test/Driver/clang-translation.c (added)
+++ cfe/trunk/test/Driver/clang-translation.c Wed Mar 18 18:39:35 2009
@@ -0,0 +1,11 @@
+// RUN: clang-driver -ccc-host-triple i386-unknown-unknown -### -S -Os %s -o %t.s &> %t.log
+// RUN: grep '"-S"' %t.log &&
+// RUN: grep '"-disable-free"' %t.log &&
+// RUN: grep '"--relocation-model" "static"' %t.log &&
+// RUN: grep '"--disable-fp-elim"' %t.log &&
+// RUN: grep '"--unwind-tables=0"' %t.log &&
+// RUN: grep '"--fmath-errno=1"' %t.log &&
+// RUN: grep '"-Os"' %t.log &&
+// RUN: grep '"-arch" "i386"' %t.log &&
+// RUN: grep '"-o" .*clang-translation\.c\.out\.tmp\.s' %t.log &&
+// RUN: true
More information about the cfe-commits
mailing list