[clang] b5019ff - [SystemZ/z/OS] Set DWARF version to 4 for z/OS.
Kai Nacke via cfe-commits
cfe-commits at lists.llvm.org
Fri Jun 10 10:39:20 PDT 2022
Author: Kai Nacke
Date: 2022-06-10T13:38:58-04:00
New Revision: b5019ffc8efd472d18eb9ed55a004af8d713583d
URL: https://github.com/llvm/llvm-project/commit/b5019ffc8efd472d18eb9ed55a004af8d713583d
DIFF: https://github.com/llvm/llvm-project/commit/b5019ffc8efd472d18eb9ed55a004af8d713583d.diff
LOG: [SystemZ/z/OS] Set DWARF version to 4 for z/OS.
The DWARF version was raised to 5 for all platforms which do not opt
out. Default to DWARF version to 4 for z/OS again.
Reviewed By: abhina.sreeskantharajan, uweigand
Differential Revision: https://reviews.llvm.org/D127498
Added:
clang/test/Driver/zos-dwarfversion.c
Modified:
clang/lib/Driver/ToolChains/ZOS.h
Removed:
################################################################################
diff --git a/clang/lib/Driver/ToolChains/ZOS.h b/clang/lib/Driver/ToolChains/ZOS.h
index 50bff09935613..53138306fd410 100644
--- a/clang/lib/Driver/ToolChains/ZOS.h
+++ b/clang/lib/Driver/ToolChains/ZOS.h
@@ -30,6 +30,8 @@ class LLVM_LIBRARY_VISIBILITY ZOS : public ToolChain {
bool IsIntegratedAssemblerDefault() const override { return true; }
+ unsigned GetDefaultDwarfVersion() const override { return 4; }
+
void addClangTargetOptions(
const llvm::opt::ArgList &DriverArgs, llvm::opt::ArgStringList &CC1Args,
Action::OffloadKind DeviceOffloadingKind) const override;
diff --git a/clang/test/Driver/zos-dwarfversion.c b/clang/test/Driver/zos-dwarfversion.c
new file mode 100644
index 0000000000000..53a727102f081
--- /dev/null
+++ b/clang/test/Driver/zos-dwarfversion.c
@@ -0,0 +1,3 @@
+// RUN: %clang -target s390x-none-zos -g -S -emit-llvm %s -o - | FileCheck %s
+
+// CHECK: !"Dwarf Version", i32 4
More information about the cfe-commits
mailing list