Author: bruno Date: Tue Mar 29 19:25:57 2016 New Revision: 264813 URL: http://llvm.org/viewvc/llvm-project?rev=264813&view=rev Log: [Driver] Quote clang full version in dwarf producer when invoking cc1as
Convenience to allow easy copy-n-paste from clang -v output when reproducing cc1as comandline. rdar://problem/23959295 Modified: cfe/trunk/lib/Driver/Tools.cpp cfe/trunk/test/Misc/cc1as-asm.s Modified: cfe/trunk/lib/Driver/Tools.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=264813&r1=264812&r2=264813&view=diff ============================================================================== --- cfe/trunk/lib/Driver/Tools.cpp (original) +++ cfe/trunk/lib/Driver/Tools.cpp Tue Mar 29 19:25:57 2016 @@ -6226,7 +6226,8 @@ void ClangAs::ConstructJob(Compilation & // Set the AT_producer to the clang version when using the integrated // assembler on assembly source files. CmdArgs.push_back("-dwarf-debug-producer"); - CmdArgs.push_back(Args.MakeArgString(getClangFullVersion())); + std::string QuotedClangVersion("'" + getClangFullVersion() + "'"); + CmdArgs.push_back(Args.MakeArgString(QuotedClangVersion)); // And pass along -I options Args.AddAllArgs(CmdArgs, options::OPT_I); Modified: cfe/trunk/test/Misc/cc1as-asm.s URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Misc/cc1as-asm.s?rev=264813&r1=264812&r2=264813&view=diff ============================================================================== --- cfe/trunk/test/Misc/cc1as-asm.s (original) +++ cfe/trunk/test/Misc/cc1as-asm.s Tue Mar 29 19:25:57 2016 @@ -1,3 +1,5 @@ // 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 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits