From: Martin Storsjo Date: Tue, 8 May 2018 20:55:23 +0000 (+0000) Subject: [Driver] Don't add -dwarf-column-info when using -gcodeview on non-msvc targets X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=055b5467343b9c8aa9ebc18a8430304df2df6c66;p=clang [Driver] Don't add -dwarf-column-info when using -gcodeview on non-msvc targets -dwarf-column-info is omitted if -gcodeview is specified for msvc targets at the moment, but since -gcodeview is an option that can be specified for any target, there's little reason to restrict this handling to msvc targets. This allows getting proper codeview debug info by passing -gcodeview for e.g. MinGW targets as well. Differential Revision: https://reviews.llvm.org/D46287 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@331807 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Driver/ToolChains/Clang.cpp b/lib/Driver/ToolChains/Clang.cpp index 352ffc81d6..762b5bdcdf 100644 --- a/lib/Driver/ToolChains/Clang.cpp +++ b/lib/Driver/ToolChains/Clang.cpp @@ -3000,7 +3000,7 @@ static void RenderDebugOptions(const ToolChain &TC, const Driver &D, // debuggers don't handle missing end columns well, so it's better not to // include any column info. if (Args.hasFlag(options::OPT_gcolumn_info, options::OPT_gno_column_info, - /*Default=*/!(IsWindowsMSVC && EmitCodeView) && + /*Default=*/!EmitCodeView && DebuggerTuning != llvm::DebuggerKind::SCE)) CmdArgs.push_back("-dwarf-column-info"); diff --git a/test/Driver/codeview-column-info.c b/test/Driver/codeview-column-info.c index c5a7dc96d4..6b524accd7 100644 --- a/test/Driver/codeview-column-info.c +++ b/test/Driver/codeview-column-info.c @@ -6,6 +6,8 @@ // RUN: FileCheck < %t1 %s // RUN: %clangxx -### --target=x86_64-windows-msvc -c -g -gcodeview %s 2> %t2 // RUN: FileCheck < %t2 %s +// RUN: %clangxx -### --target=x86_64-windows-gnu -c -g -gcodeview %s 2> %t2 +// RUN: FileCheck < %t2 %s // RUN: %clang_cl -### --target=x86_64-windows-msvc /c /Z7 -- %s 2> %t2 // RUN: FileCheck < %t2 %s