aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Driver/ToolChains/MSVC.h
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2019-10-23 17:52:09 +0000
committerDimitry Andric <dim@FreeBSD.org>2019-10-23 17:52:09 +0000
commit519fc96c475680de2cc49e7811dbbfadb912cbcc (patch)
tree310ca684459b7e9ae13c9a3b9abf308b3a634afe /lib/Driver/ToolChains/MSVC.h
parent2298981669bf3bd63335a4be179bc0f96823a8f4 (diff)
downloadsrc-vendor/clang.tar.gz
src-vendor/clang.zip
Vendor import of stripped clang trunk r375505, the last commit beforevendor/clang/clang-trunk-r375505vendor/clang
the upstream Subversion repository was made read-only, and the LLVM project migrated to GitHub: https://llvm.org/svn/llvm-project/cfe/trunk@375505
Notes
Notes: svn path=/vendor/clang/dist/; revision=353942 svn path=/vendor/clang/clang-r375505/; revision=353943; tag=vendor/clang/clang-trunk-r375505
Diffstat (limited to 'lib/Driver/ToolChains/MSVC.h')
-rw-r--r--lib/Driver/ToolChains/MSVC.h14
1 files changed, 9 insertions, 5 deletions
diff --git a/lib/Driver/ToolChains/MSVC.h b/lib/Driver/ToolChains/MSVC.h
index aba9417c9727..41a69a82fecf 100644
--- a/lib/Driver/ToolChains/MSVC.h
+++ b/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
@@ -96,12 +98,14 @@ public:
Lib,
};
std::string getSubDirectoryPath(SubDirectoryType Type,
+ llvm::StringRef SubdirParent,
llvm::Triple::ArchType TargetArch) const;
// Convenience overload.
// Uses the current target arch.
- std::string getSubDirectoryPath(SubDirectoryType Type) const {
- return getSubDirectoryPath(Type, getArch());
+ std::string getSubDirectoryPath(SubDirectoryType Type,
+ llvm::StringRef SubdirParent = "") const {
+ return getSubDirectoryPath(Type, SubdirParent, getArch());
}
enum class ToolsetLayout {