diff options
| author | Vedant Kumar <vsk@apple.com> | 2019-07-22 21:46:45 +0000 |
|---|---|---|
| committer | Vedant Kumar <vsk@apple.com> | 2019-07-22 21:46:45 +0000 |
| commit | 7b124c0903d4e9e7215f89ee4776b35d2310e0d2 (patch) | |
| tree | 8551b0e13175d7776a61ffff1d3389dcc70fa5b9 /clang/lib | |
| parent | 827427f65bef0c6e89f5d1f5167b20af659e7d70 (diff) | |
| download | bcm5719-llvm-7b124c0903d4e9e7215f89ee4776b35d2310e0d2.tar.gz bcm5719-llvm-7b124c0903d4e9e7215f89ee4776b35d2310e0d2.zip | |
[Driver] Set the default win32-macho debug format to DWARF
rdar://53267670
Differential Revision: https://reviews.llvm.org/D65116
llvm-svn: 366744
Diffstat (limited to 'clang/lib')
| -rw-r--r-- | clang/lib/Driver/ToolChains/MSVC.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/clang/lib/Driver/ToolChains/MSVC.h b/clang/lib/Driver/ToolChains/MSVC.h index aba9417c972..a8ef4815564 100644 --- a/clang/lib/Driver/ToolChains/MSVC.h +++ b/clang/lib/Driver/ToolChains/MSVC.h @@ -78,10 +78,12 @@ public: bool isPIEDefault() const override; bool isPICDefaultForced() const override; - /// Set CodeView as the default debug info format. Users can use -gcodeview - /// and -gdwarf to override the default. + /// Set CodeView as the default debug info format for non-MachO binary + /// formats, and to DWARF otherwise. Users can use -gcodeview and -gdwarf to + /// override the default. codegenoptions::DebugInfoFormat getDefaultDebugFormat() const override { - return codegenoptions::DIF_CodeView; + return getTriple().isOSBinFormatMachO() ? codegenoptions::DIF_DWARF + : codegenoptions::DIF_CodeView; } /// Set the debugger tuning to "default", since we're definitely not tuning |

