r326141 - Re-land "Emit proper CodeView when -gcodeview is passed without the cl driver."
Reid Kleckner via cfe-commits
cfe-commits at lists.llvm.org
Thu Mar 1 15:29:09 PST 2018
I want to do that, but it will surely break the LLDB test suite, which
assumes `clang -g` makes dwarf. It's just a matter of fixing up the flags
their test makefiles use.
On Thu, Mar 1, 2018 at 3:22 PM Nico Weber <thakis at chromium.org> wrote:
> Should we key the default off the triple? (I thought that what was the
> patch did, but I misread.) I.e. with an MSVC triple, default to emitting
> codeview?
>
> On Mon, Feb 26, 2018 at 5:55 PM, Reid Kleckner via cfe-commits <
> cfe-commits at lists.llvm.org> wrote:
>
>> Author: rnk
>> Date: Mon Feb 26 14:55:33 2018
>> New Revision: 326141
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=326141&view=rev
>> Log:
>> Re-land "Emit proper CodeView when -gcodeview is passed without the cl
>> driver."
>>
>> Reverts r326116 and re-lands r326113 with a fix to ASan so that it
>> enables column info in its test suite.
>>
>> Added:
>> cfe/trunk/test/Driver/codeview-column-info.c
>> Modified:
>> cfe/trunk/lib/Driver/ToolChains/Clang.cpp
>>
>> Modified: cfe/trunk/lib/Driver/ToolChains/Clang.cpp
>> URL:
>> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains/Clang.cpp?rev=326141&r1=326140&r2=326141&view=diff
>>
>> ==============================================================================
>> --- cfe/trunk/lib/Driver/ToolChains/Clang.cpp (original)
>> +++ cfe/trunk/lib/Driver/ToolChains/Clang.cpp Mon Feb 26 14:55:33 2018
>> @@ -2968,7 +2968,7 @@ static void RenderDebugOptions(const Too
>>
>> // Forward -gcodeview. EmitCodeView might have been set by
>> CL-compatibility
>> // argument parsing.
>> - if (Args.hasArg(options::OPT_gcodeview) || EmitCodeView) {
>> + if (EmitCodeView) {
>> // DWARFVersion remains at 0 if no explicit choice was made.
>> CmdArgs.push_back("-gcodeview");
>> } else if (DWARFVersion == 0 &&
>> @@ -3567,6 +3567,8 @@ void Clang::ConstructJob(Compilation &C,
>> types::ID InputType = Input.getType();
>> if (D.IsCLMode())
>> AddClangCLArgs(Args, InputType, CmdArgs, &DebugInfoKind,
>> &EmitCodeView);
>> + else
>> + EmitCodeView = Args.hasArg(options::OPT_gcodeview);
>>
>> const Arg *SplitDWARFArg = nullptr;
>> RenderDebugOptions(getToolChain(), D, RawTriple, Args, EmitCodeView,
>>
>> Added: cfe/trunk/test/Driver/codeview-column-info.c
>> URL:
>> http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/codeview-column-info.c?rev=326141&view=auto
>>
>> ==============================================================================
>> --- cfe/trunk/test/Driver/codeview-column-info.c (added)
>> +++ cfe/trunk/test/Driver/codeview-column-info.c Mon Feb 26 14:55:33 2018
>> @@ -0,0 +1,13 @@
>> +// Check that -dwarf-column-info does not get added to the cc1 line:
>> +// 1) When -gcodeview is present via the clang or clang++ driver
>> +// 2) When /Z7 is present via the cl driver.
>> +
>> +// RUN: %clang -### -c -g -gcodeview %s 2> %t1
>> +// RUN: FileCheck < %t1 %s
>> +// RUN: %clangxx -### -c -g -gcodeview %s 2> %t2
>> +// RUN: FileCheck < %t2 %s
>> +// RUN: %clang_cl -### /c /Z7 %s 2> %t2
>> +// RUN: FileCheck < %t2 %s
>> +
>> +// CHECK: "-cc1"
>> +// CHECK-NOT: "-dwarf-column-info"
>>
>>
>> _______________________________________________
>> cfe-commits mailing list
>> cfe-commits at lists.llvm.org
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180301/ca718c14/attachment.html>
More information about the cfe-commits
mailing list