summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorVedant Kumar <vsk@apple.com>2019-07-22 21:46:45 +0000
committerVedant Kumar <vsk@apple.com>2019-07-22 21:46:45 +0000
commit7b124c0903d4e9e7215f89ee4776b35d2310e0d2 (patch)
tree8551b0e13175d7776a61ffff1d3389dcc70fa5b9 /clang/lib
parent827427f65bef0c6e89f5d1f5167b20af659e7d70 (diff)
downloadbcm5719-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.h8
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
OpenPOWER on IntegriCloud