Author: David Blaikie
Date: 2022-01-26T18:01:07-08:00
New Revision: 9c6272861032f511a23784ce0c5cc8f6ac2f625b

URL: 
https://github.com/llvm/llvm-project/commit/9c6272861032f511a23784ce0c5cc8f6ac2f625b
DIFF: 
https://github.com/llvm/llvm-project/commit/9c6272861032f511a23784ce0c5cc8f6ac2f625b.diff

LOG: Default to DWARFv4 on Windows

Added: 
    

Modified: 
    clang/lib/Driver/ToolChains/MSVC.h
    clang/test/CodeGen/dwarf-version.c

Removed: 
    


################################################################################
diff  --git a/clang/lib/Driver/ToolChains/MSVC.h 
b/clang/lib/Driver/ToolChains/MSVC.h
index 8f033de09bf64..c842773996eda 100644
--- a/clang/lib/Driver/ToolChains/MSVC.h
+++ b/clang/lib/Driver/ToolChains/MSVC.h
@@ -69,6 +69,10 @@ class LLVM_LIBRARY_VISIBILITY MSVCToolChain : public 
ToolChain {
     return llvm::DebuggerKind::Default;
   }
 
+  unsigned GetDefaultDwarfVersion() const override {
+    return 4;
+  }
+
   enum class SubDirectoryType {
     Bin,
     Include,

diff  --git a/clang/test/CodeGen/dwarf-version.c 
b/clang/test/CodeGen/dwarf-version.c
index b329556ae0d9d..47025e241d13c 100644
--- a/clang/test/CodeGen/dwarf-version.c
+++ b/clang/test/CodeGen/dwarf-version.c
@@ -28,10 +28,10 @@
 // RUN:     | FileCheck %s --check-prefixes=NODWARF,CODEVIEW
 //     Explicitly request DWARF.
 // RUN: %clang -target i686-pc-windows-msvc -gdwarf -S -emit-llvm -o - %s \
-// RUN:     | FileCheck %s --check-prefixes=VER5,NOCODEVIEW
+// RUN:     | FileCheck %s --check-prefixes=VER4,NOCODEVIEW
 //     Explicitly request both.
 // RUN: %clang -target i686-pc-windows-msvc -gdwarf -gcodeview -S -emit-llvm 
-o - %s \
-// RUN:     | FileCheck %s --check-prefixes=VER5,CODEVIEW
+// RUN:     | FileCheck %s --check-prefixes=VER4,CODEVIEW
 // RUN: %clang -target powerpc-ibm-aix-xcoff -g -S -emit-llvm -o - %s | \
 // RUN:   FileCheck %s --check-prefix=VER3
 // RUN: %clang -target powerpc-ibm-aix-xcoff -gdwarf-2 -S -emit-llvm -o - %s | 
\


        
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to