Skip to content

Commit

Permalink
[SystemZ/z/OS] Set DWARF version to 4 for z/OS.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
redstar committed Jun 10, 2022
1 parent ea3c9a8 commit b5019ff
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions clang/lib/Driver/ToolChains/ZOS.h
Expand Up @@ -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;
Expand Down
3 changes: 3 additions & 0 deletions 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

0 comments on commit b5019ff

Please sign in to comment.