Author: hans Date: Wed Aug 10 11:36:05 2016 New Revision: 278240 URL: http://llvm.org/viewvc/llvm-project?rev=278240&view=rev Log: Merging r278139: ------------------------------------------------------------------------ r278139 | rnk | 2016-08-09 10:23:56 -0700 (Tue, 09 Aug 2016) | 6 lines
[clang-cl] Make -gline-tables-only imply -gcodeview It's surprising that you have to pass /Z7 in addition to -gcodeview to get debug info. The sanitizer runtime, for example, expects that if the compiler supports the -gline-tables-only flag, then it will emit debug info. ------------------------------------------------------------------------ Modified: cfe/branches/release_39/ (props changed) cfe/branches/release_39/lib/Driver/Tools.cpp cfe/branches/release_39/test/Driver/cl-options.c Propchange: cfe/branches/release_39/ ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Wed Aug 10 11:36:05 2016 @@ -1,4 +1,4 @@ /cfe/branches/type-system-rewrite:134693-134817 -/cfe/trunk:275880,275967,276102,276350,276361,276473,276653,276716,276887,276891,276979,276983,277095,277138,277141,277221,277307,277743,277796-277797,277866,277889,277900 +/cfe/trunk:275880,275967,276102,276350,276361,276473,276653,276716,276887,276891,276979,276983,277095,277138,277141,277221,277307,277743,277796-277797,277866,277889,277900,278139 /cfe/trunk/test:170344 /cfe/trunk/test/SemaTemplate:126920 Modified: cfe/branches/release_39/lib/Driver/Tools.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/branches/release_39/lib/Driver/Tools.cpp?rev=278240&r1=278239&r2=278240&view=diff ============================================================================== --- cfe/branches/release_39/lib/Driver/Tools.cpp (original) +++ cfe/branches/release_39/lib/Driver/Tools.cpp Wed Aug 10 11:36:05 2016 @@ -4568,8 +4568,8 @@ void Clang::ConstructJob(Compilation &C, options::OPT_gdwarf_4, options::OPT_gdwarf_5)) DwarfVersion = DwarfVersionNum(A->getSpelling()); - // Forward -gcodeview. - // 'EmitCodeView might have been set by CL-compatibility argument parsing. + // Forward -gcodeview. EmitCodeView might have been set by CL-compatibility + // argument parsing. if (Args.hasArg(options::OPT_gcodeview) || EmitCodeView) { // DwarfVersion remains at 0 if no explicit choice was made. CmdArgs.push_back("-gcodeview"); @@ -6358,9 +6358,10 @@ void Clang::AddClangCLArgs(const ArgList CmdArgs.push_back(Args.MakeArgString(Twine(LangOptions::SSPStrong))); } - // Emit CodeView if -Z7 or -Zd are present. + // Emit CodeView if -Z7, -Zd, or -gline-tables-only are present. if (Arg *DebugInfoArg = - Args.getLastArg(options::OPT__SLASH_Z7, options::OPT__SLASH_Zd)) { + Args.getLastArg(options::OPT__SLASH_Z7, options::OPT__SLASH_Zd, + options::OPT_gline_tables_only)) { *EmitCodeView = true; if (DebugInfoArg->getOption().matches(options::OPT__SLASH_Z7)) *DebugInfoKind = codegenoptions::LimitedDebugInfo; Modified: cfe/branches/release_39/test/Driver/cl-options.c URL: http://llvm.org/viewvc/llvm-project/cfe/branches/release_39/test/Driver/cl-options.c?rev=278240&r1=278239&r2=278240&view=diff ============================================================================== --- cfe/branches/release_39/test/Driver/cl-options.c (original) +++ cfe/branches/release_39/test/Driver/cl-options.c Wed Aug 10 11:36:05 2016 @@ -424,6 +424,10 @@ // Z7GMLT: "-gcodeview" // Z7GMLT: "-debug-info-kind=line-tables-only" +// RUN: %clang_cl -gline-tables-only /c -### -- %s 2>&1 | FileCheck -check-prefix=ZGMLT %s +// ZGMLT: "-gcodeview" +// ZGMLT: "-debug-info-kind=line-tables-only" + // RUN: %clang_cl /c -### -- %s 2>&1 | FileCheck -check-prefix=BreproDefault %s // BreproDefault: "-mincremental-linker-compatible" _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits