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) {
--- /dev/null
+// 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) {
+}