summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhoebe Wang <phoebe.wang@intel.com>2024-04-10 14:36:38 +0800
committerGitHub <noreply@github.com>2024-04-10 14:36:38 +0800
commit293c27f9137ea45a401ac74d84799d11b193fefd (patch)
treee58bf785c9a0542120ae4d69995b531c385eed5d
parent469caa31e77f1da37434783f9b4f1d87fe8dff71 (diff)
Revert "Reland "[Win32][ELF] Make CodeView a DebugInfoFormat only for COFF fo…"upstream/revert-87987-win32-elf
This reverts commit 4a93872a4f57d2f205826052150fadc36490445f.
-rw-r--r--clang/lib/Driver/ToolChains/MSVC.h5
-rw-r--r--clang/test/Driver/gcodeview-command-line.c1
-rw-r--r--clang/test/Misc/win32-elf.c5
3 files changed, 3 insertions, 8 deletions
diff --git a/clang/lib/Driver/ToolChains/MSVC.h b/clang/lib/Driver/ToolChains/MSVC.h
index 3950a8ed38e8..48369e030aad 100644
--- a/clang/lib/Driver/ToolChains/MSVC.h
+++ b/clang/lib/Driver/ToolChains/MSVC.h
@@ -61,8 +61,9 @@ public:
/// formats, and to DWARF otherwise. Users can use -gcodeview and -gdwarf to
/// override the default.
llvm::codegenoptions::DebugInfoFormat getDefaultDebugFormat() const override {
- return getTriple().isOSBinFormatCOFF() ? llvm::codegenoptions::DIF_CodeView
- : llvm::codegenoptions::DIF_DWARF;
+ return getTriple().isOSBinFormatMachO()
+ ? llvm::codegenoptions::DIF_DWARF
+ : llvm::codegenoptions::DIF_CodeView;
}
/// Set the debugger tuning to "default", since we're definitely not tuning
diff --git a/clang/test/Driver/gcodeview-command-line.c b/clang/test/Driver/gcodeview-command-line.c
index 83542fc71aec..da8708af3224 100644
--- a/clang/test/Driver/gcodeview-command-line.c
+++ b/clang/test/Driver/gcodeview-command-line.c
@@ -1,6 +1,5 @@
// Note: %s must be preceded by --, otherwise it may be interpreted as a
// command-line option, e.g. on Mac where %s is commonly under /Users.
-// REQUIRES: aarch64-registered-target,arm-registered-target,x86-registered-target
// ON-NOT: "-gno-codview-commandline"
// OFF: "-gno-codeview-command-line"
diff --git a/clang/test/Misc/win32-elf.c b/clang/test/Misc/win32-elf.c
deleted file mode 100644
index f75281dc4187..000000000000
--- a/clang/test/Misc/win32-elf.c
+++ /dev/null
@@ -1,5 +0,0 @@
-// Check that basic use of win32-elf targets works.
-// RUN: %clang -fsyntax-only -target x86_64-pc-win32-elf %s
-
-// RUN: %clang -fsyntax-only -target x86_64-pc-win32-elf -g %s -### 2>&1 | FileCheck %s -check-prefix=DEBUG-INFO
-// DEBUG-INFO: -dwarf-version={{.*}}