File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -78,10 +78,12 @@ class LLVM_LIBRARY_VISIBILITY MSVCToolChain : public ToolChain {
78
78
bool isPIEDefault () const override ;
79
79
bool isPICDefaultForced () const override ;
80
80
81
- // / Set CodeView as the default debug info format. Users can use -gcodeview
82
- // / and -gdwarf to override the default.
81
+ // / Set CodeView as the default debug info format for non-MachO binary
82
+ // / formats, and to DWARF otherwise. Users can use -gcodeview and -gdwarf to
83
+ // / override the default.
83
84
codegenoptions::DebugInfoFormat getDefaultDebugFormat () const override {
84
- return codegenoptions::DIF_CodeView;
85
+ return getTriple ().isOSBinFormatMachO () ? codegenoptions::DIF_DWARF
86
+ : codegenoptions::DIF_CodeView;
85
87
}
86
88
87
89
// / Set the debugger tuning to "default", since we're definitely not tuning
Original file line number Diff line number Diff line change 1
1
// Check that basic use of win32-macho targets works.
2
2
// RUN: %clang -fsyntax-only -target x86_64-pc-win32-macho %s
3
+
4
+ // RUN: %clang -fsyntax-only -target x86_64-pc-win32-macho -g %s -### 2>&1 | FileCheck %s -check-prefix=DEBUG-INFO
5
+ // DEBUG-INFO: -dwarf-version={{.*}}
You can’t perform that action at this time.
0 commit comments