mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-01 05:01:59 +01:00
ebfa474806
This is part of PR44213 https://bugs.llvm.org/show_bug.cgi?id=44213 When importing (system) Clang modules, LLDB needs to know which SDK (e.g., MacOSX, iPhoneSimulator, ...) they came from. While the sysroot attribute contains the absolute path to the SDK, this doesn't work well when the debugger is run on a different machine than the compiler, and the SDKs are installed in different directories. It thus makes sense to just store the name of the SDK instead of the absolute path, so it can be found relative to LLDB. rdar://problem/51645582 Differential Revision: https://reviews.llvm.org/D75646
37 lines
1.3 KiB
LLVM
37 lines
1.3 KiB
LLVM
; RUN: %llc_dwarf -split-dwarf-file=foo.dwo %s -filetype=obj -o - | llvm-dwarfdump -debug-info - | FileCheck %s
|
|
|
|
; DW_AT_LLVM_sysroot goes into the .dwo, not in the skeleton.
|
|
|
|
; CHECK: DW_TAG_skeleton_unit
|
|
; CHECK-NOT: DW_AT_LLVM_sysroot
|
|
; CHECK-NOT: DW_AT_LLVM_sdk
|
|
; CHECK: DW_TAG_compile_unit
|
|
; CHECK-NOT: DW_TAG
|
|
; CHECK: DW_AT_LLVM_sysroot ("/opt/clang-root")
|
|
; CHECK: DW_AT_APPLE_sdk ("Linux.sdk")
|
|
|
|
target triple = "x86_64-pc-linux"
|
|
|
|
declare void @_Z2f1v()
|
|
|
|
; Function Attrs: noinline norecurse uwtable
|
|
define i32 @main() !dbg !9 {
|
|
entry:
|
|
ret i32 0, !dbg !18
|
|
}
|
|
|
|
!llvm.dbg.cu = !{!0}
|
|
!llvm.module.flags = !{!6, !7, !8}
|
|
|
|
!0 = distinct !DICompileUnit(language: DW_LANG_C, file: !1, emissionKind: FullDebug, enums: !2, sysroot: "/opt/clang-root", sdk: "Linux.sdk")
|
|
!1 = !DIFile(filename: "a.c", directory: "/")
|
|
!2 = !{}
|
|
!6 = !{i32 2, !"Dwarf Version", i32 5}
|
|
!7 = !{i32 2, !"Debug Info Version", i32 3}
|
|
!8 = !{i32 1, !"wchar_size", i32 4}
|
|
!9 = distinct !DISubprogram(name: "main", scope: !1, file: !1, line: 2, type: !10, isLocal: false, isDefinition: true, scopeLine: 2, flags: DIFlagPrototyped, isOptimized: false, unit: !0, retainedNodes: !2)
|
|
!10 = !DISubroutineType(types: !11)
|
|
!11 = !{!12}
|
|
!12 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
|
|
!18 = !DILocation(line: 4, column: 1, scope: !9)
|