Author: Phoebe Wang Date: 2024-04-03T16:10:19+08:00 New Revision: cd7517859eef14d8b38cec2d52c0625a58c645a2
URL: https://github.com/llvm/llvm-project/commit/cd7517859eef14d8b38cec2d52c0625a58c645a2 DIFF: https://github.com/llvm/llvm-project/commit/cd7517859eef14d8b38cec2d52c0625a58c645a2.diff LOG: Revert "[Win32][ELF] Make CodeView a DebugInfoFormat only for COFF format (#87149)" This reverts commit 4b25053ae47f50095371a663391baadfd2694eb0. There're failures in some target. Added: Modified: clang/lib/Driver/ToolChains/MSVC.h Removed: clang/test/Misc/win32-elf.c ################################################################################ diff --git a/clang/lib/Driver/ToolChains/MSVC.h b/clang/lib/Driver/ToolChains/MSVC.h index 3950a8ed38e8b4..48369e030aade2 100644 --- a/clang/lib/Driver/ToolChains/MSVC.h +++ b/clang/lib/Driver/ToolChains/MSVC.h @@ -61,8 +61,9 @@ class LLVM_LIBRARY_VISIBILITY MSVCToolChain : public ToolChain { /// 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/Misc/win32-elf.c b/clang/test/Misc/win32-elf.c deleted file mode 100644 index f75281dc418727..00000000000000 --- 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={{.*}} _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits