This revision was automatically updated to reflect the committed changes. Closed by commit rG6cf64b2d2858: [clang] [MinGW] Default to DWARF 4 (authored by mstorsjo).
Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119326/new/ https://reviews.llvm.org/D119326 Files: clang/lib/Driver/ToolChains/MinGW.h clang/test/CodeGen/dwarf-version.c Index: clang/test/CodeGen/dwarf-version.c =================================================================== --- clang/test/CodeGen/dwarf-version.c +++ clang/test/CodeGen/dwarf-version.c @@ -32,6 +32,11 @@ // Explicitly request both. // RUN: %clang -target i686-pc-windows-msvc -gdwarf -gcodeview -S -emit-llvm -o - %s \ // RUN: | FileCheck %s --check-prefixes=VER4,CODEVIEW + +// Check what version of dwarf is used for MinGW targets. +// RUN: %clang -target i686-pc-windows-gnu -g -S -emit-llvm -o - %s | \ +// RUN: FileCheck %s --check-prefixes=VER4 + // 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 | \ Index: clang/lib/Driver/ToolChains/MinGW.h =================================================================== --- clang/lib/Driver/ToolChains/MinGW.h +++ clang/lib/Driver/ToolChains/MinGW.h @@ -90,6 +90,8 @@ void printVerboseInfo(raw_ostream &OS) const override; + unsigned GetDefaultDwarfVersion() const override { return 4; } + protected: Tool *getTool(Action::ActionClass AC) const override; Tool *buildLinker() const override;
Index: clang/test/CodeGen/dwarf-version.c =================================================================== --- clang/test/CodeGen/dwarf-version.c +++ clang/test/CodeGen/dwarf-version.c @@ -32,6 +32,11 @@ // Explicitly request both. // RUN: %clang -target i686-pc-windows-msvc -gdwarf -gcodeview -S -emit-llvm -o - %s \ // RUN: | FileCheck %s --check-prefixes=VER4,CODEVIEW + +// Check what version of dwarf is used for MinGW targets. +// RUN: %clang -target i686-pc-windows-gnu -g -S -emit-llvm -o - %s | \ +// RUN: FileCheck %s --check-prefixes=VER4 + // 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 | \ Index: clang/lib/Driver/ToolChains/MinGW.h =================================================================== --- clang/lib/Driver/ToolChains/MinGW.h +++ clang/lib/Driver/ToolChains/MinGW.h @@ -90,6 +90,8 @@ void printVerboseInfo(raw_ostream &OS) const override; + unsigned GetDefaultDwarfVersion() const override { return 4; } + protected: Tool *getTool(Action::ActionClass AC) const override; Tool *buildLinker() const override;
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits