diff options
-rw-r--r-- | lib/Driver/Tools.cpp | 2 | ||||
-rw-r--r-- | test/Driver/clang-translation.c | 11 |
2 files changed, 12 insertions, 1 deletions
diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp index db9d3972f2..4cb73dbda3 100644 --- a/lib/Driver/Tools.cpp +++ b/lib/Driver/Tools.cpp @@ -290,7 +290,7 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, 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); diff --git a/test/Driver/clang-translation.c b/test/Driver/clang-translation.c new file mode 100644 index 0000000000..44bf2207ec --- /dev/null +++ b/test/Driver/clang-translation.c @@ -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 |