From: Bruno Cardoso Lopes Date: Mon, 2 May 2016 20:20:49 +0000 (+0000) Subject: Revert "[Driver] Quote clang full version in dwarf producer when invoking cc1as" X-Git-Tag: llvmorg-3.9.0-rc1~7217 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=34c549ea02081e48946750adbc928ae57ff67bd9;p=platform%2Fupstream%2Fllvm.git Revert "[Driver] Quote clang full version in dwarf producer when invoking cc1as" This reverts commit r264813 / 6484b95d634f53dd929c75265ef3c4decf397584. While using it in the shell is fine, this a problem when cc1as is invoked directly by the driver because single quoting the clang full version makes cc1as write out the version with the quotes in the final binary. If the user wants to copy-n-pastable output, it could use either -### or CC_PRINT_OPTIONS=1 clang -v ... llvm-svn: 268297 --- diff --git a/clang/lib/Driver/Tools.cpp b/clang/lib/Driver/Tools.cpp index f0199aa..1cc1369 100644 --- a/clang/lib/Driver/Tools.cpp +++ b/clang/lib/Driver/Tools.cpp @@ -6251,8 +6251,7 @@ void ClangAs::ConstructJob(Compilation &C, const JobAction &JA, // Set the AT_producer to the clang version when using the integrated // assembler on assembly source files. CmdArgs.push_back("-dwarf-debug-producer"); - std::string QuotedClangVersion("'" + getClangFullVersion() + "'"); - CmdArgs.push_back(Args.MakeArgString(QuotedClangVersion)); + CmdArgs.push_back(Args.MakeArgString(getClangFullVersion())); // And pass along -I options Args.AddAllArgs(CmdArgs, options::OPT_I); diff --git a/clang/test/Misc/cc1as-asm.s b/clang/test/Misc/cc1as-asm.s index 36549c0..af92644 100644 --- a/clang/test/Misc/cc1as-asm.s +++ b/clang/test/Misc/cc1as-asm.s @@ -1,5 +1,3 @@ // Run cc1as asm output path just to make sure it works // REQUIRES: x86-registered-target // RUN: %clang -cc1as -triple x86_64-apple-macosx10.10.0 -filetype asm %s -o /dev/null -// Test that cc1as is able to consume a quoted clang full version -// RUN: %clang -cc1as -triple x86_64-apple-macosx10.10.0 -dwarf-debug-producer 'clang dummy version' -filetype asm %s -o /dev/null