Skip to content

Commit 81fbadb

Browse files
committed
[AMDGPU] Set default dwarf version to 2
Differential Revision: http://reviews.llvm.org/D20640 llvm-svn: 271347
1 parent 90b8b8d commit 81fbadb

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

clang/lib/Driver/ToolChains.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -943,6 +943,7 @@ class LLVM_LIBRARY_VISIBILITY AMDGPUToolChain : public Generic_ELF {
943943
public:
944944
AMDGPUToolChain(const Driver &D, const llvm::Triple &Triple,
945945
const llvm::opt::ArgList &Args);
946+
unsigned GetDefaultDwarfVersion() const override { return 2; }
946947
bool IsIntegratedAssemblerDefault() const override { return true; }
947948
};
948949

clang/test/Driver/amdgpu-toolchain.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
// RUN: %clang -### -target amdgcn--amdhsa -x assembler -mcpu=kaveri %s 2>&1 | FileCheck -check-prefix=AS_LINK %s
22
// AS_LINK: clang{{.*}} "-cc1as"
33
// AS_LINK: ld.lld{{.*}} "-shared"
4+
5+
// RUN: %clang -### -g -target amdgcn--amdhsa -mcpu=kaveri %s 2>&1 | FileCheck -check-prefix=DWARF_VER %s
6+
// DWARF_VER: "-dwarf-version=2"

0 commit comments

Comments
 (0)