[PATCH] D20640: [AMDGPU] Set default dwarf version to 2

Konstantin Zhuravlyov via cfe-commits cfe-commits at lists.llvm.org
Wed May 25 13:01:32 PDT 2016


kzhuravl created this revision.
kzhuravl added a reviewer: tstellarAMD.
kzhuravl added a subscriber: cfe-commits.
Herald added a subscriber: kzhuravl.

http://reviews.llvm.org/D20640

Files:
  lib/Driver/ToolChains.h
  test/Driver/amdgpu-toolchain.c

Index: test/Driver/amdgpu-toolchain.c
===================================================================
--- test/Driver/amdgpu-toolchain.c
+++ test/Driver/amdgpu-toolchain.c
@@ -1,3 +1,6 @@
 // RUN: %clang -### -target amdgcn--amdhsa -x assembler -mcpu=kaveri %s 2>&1 | FileCheck -check-prefix=AS_LINK %s
 // AS_LINK: clang{{.*}} "-cc1as"
 // AS_LINK: ld.lld{{.*}} "-shared"
+
+// RUN: %clang -### -g -target amdgcn--amdhsa -mcpu=kaveri %s 2>&1 | FileCheck -check-prefix=DWARF_VER %s
+// DWARF_VER: "-dwarf-version=2"
Index: lib/Driver/ToolChains.h
===================================================================
--- lib/Driver/ToolChains.h
+++ lib/Driver/ToolChains.h
@@ -943,6 +943,7 @@
 public:
   AMDGPUToolChain(const Driver &D, const llvm::Triple &Triple,
             const llvm::opt::ArgList &Args);
+  unsigned GetDefaultDwarfVersion() const override { return 2; }
   bool IsIntegratedAssemblerDefault() const override { return true; }
 };
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D20640.58481.patch
Type: text/x-patch
Size: 957 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160525/2972a383/attachment.bin>


More information about the cfe-commits mailing list