r339968 - Disable pubnames in NVPTX debug info using metadata
David Blaikie via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 16 16:56:32 PDT 2018
Author: dblaikie
Date: Thu Aug 16 16:56:32 2018
New Revision: 339968
URL: http://llvm.org/viewvc/llvm-project?rev=339968&view=rev
Log:
Disable pubnames in NVPTX debug info using metadata
Added:
cfe/trunk/test/CodeGen/debug-nvptx.c
Modified:
cfe/trunk/lib/CodeGen/CGDebugInfo.cpp
Modified: cfe/trunk/lib/CodeGen/CGDebugInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGDebugInfo.cpp?rev=339968&r1=339967&r2=339968&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGDebugInfo.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGDebugInfo.cpp Thu Aug 16 16:56:32 2018
@@ -579,8 +579,11 @@ void CGDebugInfo::CreateCompileUnit() {
CGOpts.DwarfDebugFlags, RuntimeVers,
CGOpts.EnableSplitDwarf ? "" : CGOpts.SplitDwarfFile, EmissionKind,
0 /* DWOid */, CGOpts.SplitDwarfInlining, CGOpts.DebugInfoForProfiling,
- CGOpts.GnuPubnames ? llvm::DICompileUnit::DebugNameTableKind::GNU
- : llvm::DICompileUnit::DebugNameTableKind::Default);
+ CGM.getTarget().getTriple().isNVPTX()
+ ? llvm::DICompileUnit::DebugNameTableKind::None
+ : CGOpts.GnuPubnames
+ ? llvm::DICompileUnit::DebugNameTableKind::GNU
+ : llvm::DICompileUnit::DebugNameTableKind::Default);
}
llvm::DIType *CGDebugInfo::CreateType(const BuiltinType *BT) {
Added: cfe/trunk/test/CodeGen/debug-nvptx.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/debug-nvptx.c?rev=339968&view=auto
==============================================================================
--- cfe/trunk/test/CodeGen/debug-nvptx.c (added)
+++ cfe/trunk/test/CodeGen/debug-nvptx.c Thu Aug 16 16:56:32 2018
@@ -0,0 +1,6 @@
+// RUN: %clang_cc1 -triple nvptx-unknown-unknown -S -o - -debug-info-kind=limited %s -emit-llvm | FileCheck %s
+
+// CHECK: DICompileUnit({{.*}}, nameTableKind: None)
+
+void f1(void) {
+}
More information about the cfe-commits
mailing list