mirror of
https://github.com/RPCS3/llvm.git
synced 2025-02-26 13:49:56 +00:00

Summary: If the LLVM module shows that it has debug info, but the file is actually empty and the real debug info is not emitted, the ptxas tool emits error 'Debug information not found in presence of .target debug'. We need at leas one empty debug section to silence this message. Section `.debug_loc` is not emitted for PTX and we can emit empty `.debug_loc` section if `debug` option was emitted. Reviewers: tra Subscribers: jholewinski, aprantl, llvm-commits Differential Revision: https://reviews.llvm.org/D57250 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@355719 91177308-0d34-0410-b5e6-96231b3b80d8
20 lines
795 B
LLVM
20 lines
795 B
LLVM
; RUN: llc < %s -mtriple=nvptx64-nvidia-cuda | FileCheck %s
|
|
|
|
; CHECK: .target sm_{{[0-9]+$}}
|
|
; CHECK: .section .debug_loc { }
|
|
; CHECK-NOT: }
|
|
|
|
!llvm.dbg.cu = !{!0}
|
|
!llvm.module.flags = !{!3, !4, !5, !6, !7}
|
|
!llvm.ident = !{!8}
|
|
|
|
!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 9.0.0 (trunk 351924) (llvm/trunk 351968)", isOptimized: false, runtimeVersion: 0, emissionKind: DebugDirectivesOnly, enums: !2, nameTableKind: None)
|
|
!1 = !DIFile(filename: "new.cc", directory: "/test")
|
|
!2 = !{}
|
|
!3 = !{i32 2, !"Dwarf Version", i32 2}
|
|
!4 = !{i32 2, !"Debug Info Version", i32 3}
|
|
!5 = !{i32 1, !"wchar_size", i32 4}
|
|
!6 = !{i32 4, !"nvvm-reflect-ftz", i32 0}
|
|
!7 = !{i32 7, !"PIC Level", i32 2}
|
|
!8 = !{!"clang version 9.0.0 (trunk 351924) (llvm/trunk 351968)"}
|