40 lines · plain
1RUN: dsymutil -oso-prepend-path %p/../Inputs %p/../Inputs/swift-dwarf-loc.macho.x86_64 -no-output -verbose | FileCheck %s2 3RUN: dsymutil --linker parallel -oso-prepend-path %p/../Inputs %p/../Inputs/swift-dwarf-loc.macho.x86_64 -no-output -verbose | FileCheck %s4 5This test checks that dsymutil generates a valid dwarf location for a symbol with no flags set.6 7The following IR was compiled for x86_64-apple:8; ModuleID = '-'9source_filename = "-"10target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"11target triple = "x86_64-apple-macosx10.12"12 13%TSi = type <{ i64 }>14 15@_var = hidden global %TSi zeroinitializer, align 8, !dbg !016 17!llvm.dbg.cu = !{!8}18!llvm.module.flags = !{!11, !12}19 20!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression())21!1 = distinct !DIGlobalVariable(name: "x", linkageName: "_var", scope: !2, file: !3, line: 1, type: !4, isLocal: false, isDefinition: true)22!2 = !DIModule(scope: null, name: "main")23!3 = !DIFile(filename: "<stdin>", directory: "")24!4 = !DICompositeType(tag: DW_TAG_structure_type, name: "Int", scope: !6, file: !5, size: 64, elements: !7, runtimeLang: DW_LANG_Swift, identifier: "_T0SiD")25!5 = !DIFile(filename: "foo", directory: "/tmp")26!6 = !DIModule(scope: null, name: "foo", includePath: "")27!7 = !{}28!8 = distinct !DICompileUnit(language: DW_LANG_Swift, file: !9, producer: "swiftc", isOptimized: false, flags: "", runtimeVersion: 4, emissionKind: FullDebug, enums: !7, globals: !10, imports: null)29!9 = !DIFile(filename: "/tmp", directory: "")30!10 = !{!0}31!11 = !{i32 2, !"Dwarf Version", i32 4}32!12 = !{i32 2, !"Debug Info Version", i32 3}33 34Compiled with: llc -filetype=obj %p/../Inputs/swift-dwarf-loc.ll -mtriple x86_64-apple-darwin35Linked with: ld -dylib %T/swift-dwarf-loc.o -arch x86_64 -lSystem -macosx_version_min 10.9.036 37CHECK: __var,38CHECK-NOT: __var,{{.*}}binAddr: 0x000000000000000039CHECK-NOT: __var{{.*}} => 000000000000000040