[PATCH] D65116: [Driver] Set the default win32-macho debug format to DWARF
Vedant Kumar via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jul 22 14:31:25 PDT 2019
vsk created this revision.
vsk added reviewers: ahatanak, JDevlieghere, friss.
Herald added a subscriber: dexonsmith.
rdar://53267670
https://reviews.llvm.org/D65116
Files:
clang/lib/Driver/ToolChains/MSVC.h
clang/test/Misc/win32-macho.c
Index: clang/test/Misc/win32-macho.c
===================================================================
--- clang/test/Misc/win32-macho.c
+++ clang/test/Misc/win32-macho.c
@@ -1,2 +1,5 @@
// Check that basic use of win32-macho targets works.
// RUN: %clang -fsyntax-only -target x86_64-pc-win32-macho %s
+
+// RUN: %clang -fsyntax-only -target x86_64-pc-win32-macho -g %s -### 2>&1 | FileCheck %s -check-prefix=DEBUG-INFO
+// DEBUG-INFO: -dwarf-version={{.*}}
Index: clang/lib/Driver/ToolChains/MSVC.h
===================================================================
--- clang/lib/Driver/ToolChains/MSVC.h
+++ clang/lib/Driver/ToolChains/MSVC.h
@@ -81,7 +81,8 @@
/// Set CodeView as the default debug info format. 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D65116.211192.patch
Type: text/x-patch
Size: 1146 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190722/73abc526/attachment.bin>
More information about the cfe-commits
mailing list