2019-05-01 13:27:20 +08:00
|
|
|
; RUN: llc -filetype=obj %s -o - | llvm-readobj -r -S --symbols | FileCheck %s
|
2018-04-27 03:27:28 +08:00
|
|
|
|
|
|
|
; CHECK: Format: WASM
|
|
|
|
; CHECK-NEXT:Arch: wasm32
|
|
|
|
; CHECK-NEXT:AddressSize: 32bit
|
|
|
|
; CHECK-NEXT:Sections [
|
|
|
|
; CHECK-NEXT: Section {
|
|
|
|
; CHECK-NEXT: Type: TYPE (0x1)
|
|
|
|
; CHECK-NEXT: Size: 4
|
|
|
|
; CHECK-NEXT: Offset: 8
|
|
|
|
; CHECK-NEXT: }
|
|
|
|
; CHECK-NEXT: Section {
|
|
|
|
; CHECK-NEXT: Type: IMPORT (0x2)
|
|
|
|
; CHECK-NEXT: Size: 58
|
|
|
|
; CHECK-NEXT: Offset: 18
|
|
|
|
; CHECK-NEXT: }
|
|
|
|
; CHECK-NEXT: Section {
|
|
|
|
; CHECK-NEXT: Type: FUNCTION (0x3)
|
|
|
|
; CHECK-NEXT: Size: 2
|
|
|
|
; CHECK-NEXT: Offset: 82
|
|
|
|
; CHECK-NEXT: }
|
|
|
|
; CHECK-NEXT: Section {
|
|
|
|
; CHECK-NEXT: Type: ELEM (0x9)
|
|
|
|
; CHECK-NEXT: Size: 7
|
|
|
|
; CHECK-NEXT: Offset: 90
|
|
|
|
; CHECK-NEXT: }
|
|
|
|
; CHECK-NEXT: Section {
|
2019-04-13 06:27:48 +08:00
|
|
|
; CHECK-NEXT: Type: DATACOUNT (0xC)
|
|
|
|
; CHECK-NEXT: Size: 1
|
|
|
|
; CHECK-NEXT: Offset: 103
|
|
|
|
; CHECK-NEXT: }
|
|
|
|
; CHECK-NEXT: Section {
|
2018-04-27 03:27:28 +08:00
|
|
|
; CHECK-NEXT: Type: CODE (0xA)
|
|
|
|
; CHECK-NEXT: Size: 4
|
2019-04-13 06:27:48 +08:00
|
|
|
; CHECK-NEXT: Offset: 110
|
2018-04-27 03:27:28 +08:00
|
|
|
; CHECK-NEXT: }
|
|
|
|
; CHECK-NEXT: Section {
|
|
|
|
; CHECK-NEXT: Type: DATA (0xB)
|
|
|
|
; CHECK-NEXT: Size: 19
|
2019-04-13 06:27:48 +08:00
|
|
|
; CHECK-NEXT: Offset: 120
|
2018-04-27 03:27:28 +08:00
|
|
|
; CHECK-NEXT: Segments [
|
|
|
|
; CHECK-NEXT: Segment {
|
|
|
|
; CHECK-NEXT: Name: .data.foo
|
|
|
|
; CHECK-NEXT: Size: 4
|
|
|
|
; CHECK-NEXT: Offset: 0
|
|
|
|
; CHECK-NEXT: }
|
|
|
|
; CHECK-NEXT: Segment {
|
|
|
|
; CHECK-NEXT: Name: .data.ptr2
|
|
|
|
; CHECK-NEXT: Size: 4
|
|
|
|
; CHECK-NEXT: Offset: 4
|
|
|
|
; CHECK-NEXT: }
|
|
|
|
; CHECK-NEXT: ]
|
|
|
|
; CHECK-NEXT: }
|
|
|
|
; CHECK-NEXT: Section {
|
|
|
|
; CHECK-NEXT: Type: CUSTOM (0x0)
|
|
|
|
; CHECK-NEXT: Size: 121
|
2019-04-13 06:27:48 +08:00
|
|
|
; CHECK-NEXT: Offset: 145
|
2018-04-27 03:27:28 +08:00
|
|
|
; CHECK-NEXT: Name: .debug_str
|
|
|
|
; CHECK-NEXT: }
|
|
|
|
; CHECK-NEXT: Section {
|
|
|
|
; CHECK-NEXT: Type: CUSTOM (0x0)
|
2019-12-19 06:50:19 +08:00
|
|
|
; CHECK-NEXT: Size: 86
|
2019-04-13 06:27:48 +08:00
|
|
|
; CHECK-NEXT: Offset: 283
|
2018-04-27 03:27:28 +08:00
|
|
|
; CHECK-NEXT: Name: .debug_abbrev
|
|
|
|
; CHECK-NEXT: }
|
|
|
|
; CHECK-NEXT: Section {
|
|
|
|
; CHECK-NEXT: Type: CUSTOM (0x0)
|
2019-12-19 06:50:19 +08:00
|
|
|
; CHECK-NEXT: Size: 111
|
|
|
|
; CHECK-NEXT: Offset: 389
|
2018-04-27 03:27:28 +08:00
|
|
|
; CHECK-NEXT: Name: .debug_info
|
|
|
|
; CHECK-NEXT: }
|
|
|
|
; CHECK-NEXT: Section {
|
|
|
|
; CHECK-NEXT: Type: CUSTOM (0x0)
|
|
|
|
; CHECK-NEXT: Size: 42
|
2019-12-19 06:50:19 +08:00
|
|
|
; CHECK-NEXT: Offset: 518
|
2018-04-27 03:27:28 +08:00
|
|
|
; CHECK-NEXT: Name: .debug_pubnames
|
|
|
|
; CHECK-NEXT: }
|
|
|
|
; CHECK-NEXT: Section {
|
|
|
|
; CHECK-NEXT: Type: CUSTOM (0x0)
|
|
|
|
; CHECK-NEXT: Size: 26
|
2019-12-19 06:50:19 +08:00
|
|
|
; CHECK-NEXT: Offset: 582
|
2018-04-27 03:27:28 +08:00
|
|
|
; CHECK-NEXT: Name: .debug_pubtypes
|
|
|
|
; CHECK-NEXT: }
|
|
|
|
; CHECK-NEXT: Section {
|
|
|
|
; CHECK-NEXT: Type: CUSTOM (0x0)
|
|
|
|
; CHECK-NEXT: Size: 57
|
2019-12-19 06:50:19 +08:00
|
|
|
; CHECK-NEXT: Offset: 630
|
2018-04-27 03:27:28 +08:00
|
|
|
; CHECK-NEXT: Name: .debug_line
|
|
|
|
; CHECK-NEXT: }
|
|
|
|
; CHECK-NEXT: Section {
|
|
|
|
; CHECK-NEXT: Type: CUSTOM (0x0)
|
2018-05-03 07:11:38 +08:00
|
|
|
; CHECK-NEXT: Size: 88
|
2019-12-19 06:50:19 +08:00
|
|
|
; CHECK-NEXT: Offset: 705
|
2018-04-27 03:27:28 +08:00
|
|
|
; CHECK-NEXT: Name: linking
|
|
|
|
; CHECK-NEXT: }
|
|
|
|
; CHECK-NEXT: Section {
|
|
|
|
; CHECK-NEXT: Type: CUSTOM (0x0)
|
|
|
|
; CHECK-NEXT: Size: 9
|
2019-12-19 06:50:19 +08:00
|
|
|
; CHECK-NEXT: Offset: 807
|
2018-04-27 03:27:28 +08:00
|
|
|
; CHECK-NEXT: Name: reloc.DATA
|
|
|
|
; CHECK-NEXT: }
|
|
|
|
; CHECK-NEXT: Section {
|
|
|
|
; CHECK-NEXT: Type: CUSTOM (0x0)
|
|
|
|
; CHECK-NEXT: Size: 58
|
2019-12-19 06:50:19 +08:00
|
|
|
; CHECK-NEXT: Offset: 833
|
2018-04-27 03:27:28 +08:00
|
|
|
; CHECK-NEXT: Name: reloc..debug_info
|
|
|
|
; CHECK-NEXT: }
|
|
|
|
; CHECK-NEXT: Section {
|
|
|
|
; CHECK-NEXT: Type: CUSTOM (0x0)
|
|
|
|
; CHECK-NEXT: Size: 6
|
2019-12-19 06:50:19 +08:00
|
|
|
; CHECK-NEXT: Offset: 915
|
2018-04-27 03:27:28 +08:00
|
|
|
; CHECK-NEXT: Name: reloc..debug_pubnames
|
|
|
|
; CHECK-NEXT: }
|
|
|
|
; CHECK-NEXT: Section {
|
|
|
|
; CHECK-NEXT: Type: CUSTOM (0x0)
|
|
|
|
; CHECK-NEXT: Size: 6
|
2019-12-19 06:50:19 +08:00
|
|
|
; CHECK-NEXT: Offset: 949
|
2018-04-27 03:27:28 +08:00
|
|
|
; CHECK-NEXT: Name: reloc..debug_pubtypes
|
|
|
|
; CHECK-NEXT: }
|
|
|
|
; CHECK-NEXT: Section {
|
|
|
|
; CHECK-NEXT: Type: CUSTOM (0x0)
|
|
|
|
; CHECK-NEXT: Size: 6
|
2019-12-19 06:50:19 +08:00
|
|
|
; CHECK-NEXT: Offset: 983
|
2018-04-27 03:27:28 +08:00
|
|
|
; CHECK-NEXT: Name: reloc..debug_line
|
|
|
|
; CHECK-NEXT: }
|
2019-01-17 10:29:55 +08:00
|
|
|
; CHECK-NEXT: Section {
|
|
|
|
; CHECK-NEXT: Type: CUSTOM (0x0)
|
2019-01-18 10:47:48 +08:00
|
|
|
; CHECK-NEXT: Size: 77
|
2019-12-19 06:50:19 +08:00
|
|
|
; CHECK-NEXT: Offset: 1013
|
2019-01-17 10:29:55 +08:00
|
|
|
; CHECK-NEXT: Name: producers
|
|
|
|
; CHECK-NEXT: }
|
2018-04-27 03:27:28 +08:00
|
|
|
; CHECK-NEXT:]
|
|
|
|
; CHECK-NEXT:Relocations [
|
2019-04-13 06:27:48 +08:00
|
|
|
; CHECK-NEXT: Section (7) DATA {
|
2019-02-05 01:28:46 +08:00
|
|
|
; CHECK-NEXT: 0x6 R_WASM_MEMORY_ADDR_I32 myextern 0
|
|
|
|
; CHECK-NEXT: 0xF R_WASM_TABLE_INDEX_I32 f2
|
2018-04-27 03:27:28 +08:00
|
|
|
; CHECK-NEXT: }
|
2019-04-13 06:27:48 +08:00
|
|
|
; CHECK-NEXT: Section (10) .debug_info {
|
2019-02-05 01:28:46 +08:00
|
|
|
; CHECK-NEXT: 0x6 R_WASM_SECTION_OFFSET_I32 .debug_abbrev 0
|
|
|
|
; CHECK-NEXT: 0xC R_WASM_SECTION_OFFSET_I32 .debug_str 0
|
|
|
|
; CHECK-NEXT: 0x12 R_WASM_SECTION_OFFSET_I32 .debug_str 55
|
|
|
|
; CHECK-NEXT: 0x16 R_WASM_SECTION_OFFSET_I32 .debug_line 0
|
|
|
|
; CHECK-NEXT: 0x1A R_WASM_SECTION_OFFSET_I32 .debug_str 62
|
|
|
|
; CHECK-NEXT: 0x1E R_WASM_FUNCTION_OFFSET_I32 f2 0
|
|
|
|
; CHECK-NEXT: 0x27 R_WASM_SECTION_OFFSET_I32 .debug_str 105
|
|
|
|
; CHECK-NEXT: 0x33 R_WASM_MEMORY_ADDR_I32 foo 0
|
|
|
|
; CHECK-NEXT: 0x3D R_WASM_SECTION_OFFSET_I32 .debug_str 109
|
|
|
|
; CHECK-NEXT: 0x44 R_WASM_SECTION_OFFSET_I32 .debug_str 113
|
|
|
|
; CHECK-NEXT: 0x50 R_WASM_MEMORY_ADDR_I32 ptr2 0
|
|
|
|
; CHECK-NEXT: 0x5B R_WASM_FUNCTION_OFFSET_I32 f2 0
|
2019-12-19 06:50:19 +08:00
|
|
|
; CHECK-NEXT: 0x68 R_WASM_SECTION_OFFSET_I32 .debug_str 118
|
2018-04-27 03:27:28 +08:00
|
|
|
; CHECK-NEXT: }
|
2019-11-09 07:26:17 +08:00
|
|
|
; CHECK-NEXT: Section (11) .debug_pubnames {
|
2019-02-05 01:28:46 +08:00
|
|
|
; CHECK-NEXT: 0x6 R_WASM_SECTION_OFFSET_I32 .debug_info 0
|
2018-04-27 03:27:28 +08:00
|
|
|
; CHECK-NEXT: }
|
2019-11-09 07:26:17 +08:00
|
|
|
; CHECK-NEXT: Section (12) .debug_pubtypes {
|
2019-02-05 01:28:46 +08:00
|
|
|
; CHECK-NEXT: 0x6 R_WASM_SECTION_OFFSET_I32 .debug_info 0
|
2018-04-27 03:27:28 +08:00
|
|
|
; CHECK-NEXT: }
|
2019-11-09 07:26:17 +08:00
|
|
|
; CHECK-NEXT: Section (13) .debug_line {
|
2019-02-05 01:28:46 +08:00
|
|
|
; CHECK-NEXT: 0x2B R_WASM_FUNCTION_OFFSET_I32 f2 0
|
2018-04-27 03:27:28 +08:00
|
|
|
; CHECK-NEXT: }
|
|
|
|
; CHECK-NEXT:]
|
2018-04-27 08:17:21 +08:00
|
|
|
; CHECK-NEXT:Symbols [
|
|
|
|
; CHECK-NEXT: Symbol {
|
2018-05-03 07:11:38 +08:00
|
|
|
; CHECK-NEXT: Name: f2
|
|
|
|
; CHECK-NEXT: Type: FUNCTION (0x0)
|
2019-02-07 09:17:34 +08:00
|
|
|
; CHECK-NEXT: Flags [ (0x4)
|
|
|
|
; CHECK-NEXT: VISIBILITY_HIDDEN (0x4)
|
|
|
|
; CHECK-NEXT: ]
|
2019-02-05 06:27:46 +08:00
|
|
|
; CHECK-NEXT: ElementIndex: 0x0
|
2018-04-27 08:17:21 +08:00
|
|
|
; CHECK-NEXT: }
|
|
|
|
; CHECK-NEXT: Symbol {
|
2018-05-03 07:11:38 +08:00
|
|
|
; CHECK-NEXT: Name: foo
|
|
|
|
; CHECK-NEXT: Type: DATA (0x1)
|
2019-02-07 09:17:34 +08:00
|
|
|
; CHECK-NEXT: Flags [ (0x4)
|
|
|
|
; CHECK-NEXT: VISIBILITY_HIDDEN (0x4)
|
|
|
|
; CHECK-NEXT: ]
|
2019-02-05 06:27:46 +08:00
|
|
|
; CHECK-NEXT: Offset: 0x0
|
|
|
|
; CHECK-NEXT: Segment: 0x0
|
|
|
|
; CHECK-NEXT: Size: 0x4
|
2018-04-27 08:17:21 +08:00
|
|
|
; CHECK-NEXT: }
|
|
|
|
; CHECK-NEXT: Symbol {
|
2018-05-03 07:11:38 +08:00
|
|
|
; CHECK-NEXT: Name: myextern
|
|
|
|
; CHECK-NEXT: Type: DATA (0x1)
|
2019-02-07 09:17:34 +08:00
|
|
|
; CHECK-NEXT: Flags [ (0x10)
|
|
|
|
; CHECK-NEXT: UNDEFINED (0x10)
|
|
|
|
; CHECK-NEXT: ]
|
2019-02-08 06:03:32 +08:00
|
|
|
; CHECK-NEXT: ImportName:
|
|
|
|
; CHECK-NEXT: ImportModule:
|
2018-04-27 08:17:21 +08:00
|
|
|
; CHECK-NEXT: }
|
|
|
|
; CHECK-NEXT: Symbol {
|
2018-05-03 07:11:38 +08:00
|
|
|
; CHECK-NEXT: Name: ptr2
|
|
|
|
; CHECK-NEXT: Type: DATA (0x1)
|
2019-02-07 09:17:34 +08:00
|
|
|
; CHECK-NEXT: Flags [ (0x4)
|
|
|
|
; CHECK-NEXT: VISIBILITY_HIDDEN (0x4)
|
|
|
|
; CHECK-NEXT: ]
|
2019-02-05 06:27:46 +08:00
|
|
|
; CHECK-NEXT: Offset: 0x0
|
|
|
|
; CHECK-NEXT: Segment: 0x1
|
|
|
|
; CHECK-NEXT: Size: 0x4
|
2018-04-27 08:17:21 +08:00
|
|
|
; CHECK-NEXT: }
|
|
|
|
; CHECK-NEXT: Symbol {
|
2018-05-03 07:11:38 +08:00
|
|
|
; CHECK-NEXT: Name: .debug_str
|
2018-04-27 08:17:21 +08:00
|
|
|
; CHECK-NEXT: Type: SECTION (0x3)
|
2019-02-07 09:17:34 +08:00
|
|
|
; CHECK-NEXT: Flags [ (0x2)
|
|
|
|
; CHECK-NEXT: BINDING_LOCAL (0x2)
|
|
|
|
; CHECK-NEXT: ]
|
2019-04-13 06:27:48 +08:00
|
|
|
; CHECK-NEXT: ElementIndex: 0x7
|
2018-04-27 08:17:21 +08:00
|
|
|
; CHECK-NEXT: }
|
|
|
|
; CHECK-NEXT: Symbol {
|
2018-05-03 07:11:38 +08:00
|
|
|
; CHECK-NEXT: Name: .debug_abbrev
|
2018-04-27 08:17:21 +08:00
|
|
|
; CHECK-NEXT: Type: SECTION (0x3)
|
2019-02-07 09:17:34 +08:00
|
|
|
; CHECK-NEXT: Flags [ (0x2)
|
|
|
|
; CHECK-NEXT: BINDING_LOCAL (0x2)
|
|
|
|
; CHECK-NEXT: ]
|
2019-04-13 06:27:48 +08:00
|
|
|
; CHECK-NEXT: ElementIndex: 0x8
|
2018-04-27 08:17:21 +08:00
|
|
|
; CHECK-NEXT: }
|
|
|
|
; CHECK-NEXT: Symbol {
|
2018-05-03 07:11:38 +08:00
|
|
|
; CHECK-NEXT: Name: .debug_info
|
2018-04-27 08:17:21 +08:00
|
|
|
; CHECK-NEXT: Type: SECTION (0x3)
|
2019-02-07 09:17:34 +08:00
|
|
|
; CHECK-NEXT: Flags [ (0x2)
|
|
|
|
; CHECK-NEXT: BINDING_LOCAL (0x2)
|
|
|
|
; CHECK-NEXT: ]
|
2019-04-13 06:27:48 +08:00
|
|
|
; CHECK-NEXT: ElementIndex: 0x9
|
2018-04-27 08:17:21 +08:00
|
|
|
; CHECK-NEXT: }
|
|
|
|
; CHECK-NEXT: Symbol {
|
|
|
|
; CHECK-NEXT: Name: .debug_line
|
|
|
|
; CHECK-NEXT: Type: SECTION (0x3)
|
2019-02-07 09:17:34 +08:00
|
|
|
; CHECK-NEXT: Flags [ (0x2)
|
|
|
|
; CHECK-NEXT: BINDING_LOCAL (0x2)
|
|
|
|
; CHECK-NEXT: ]
|
2019-11-09 07:26:17 +08:00
|
|
|
; CHECK-NEXT: ElementIndex: 0xC
|
2018-04-27 08:17:21 +08:00
|
|
|
; CHECK-NEXT: }
|
|
|
|
; CHECK-NEXT:]
|
2018-01-24 07:03:47 +08:00
|
|
|
|
2018-05-17 04:09:05 +08:00
|
|
|
; generated from the following C code using: clang --target=wasm32 -g -O0 -S -emit-llvm test.c
|
|
|
|
; extern int myextern;
|
|
|
|
; void f2(void) { return; }
|
|
|
|
;
|
|
|
|
; int* foo = &myextern;
|
|
|
|
; void (*ptr2)(void) = f2;
|
|
|
|
|
2018-05-11 01:49:11 +08:00
|
|
|
target triple = "wasm32-unknown-unknown"
|
2017-10-21 05:28:38 +08:00
|
|
|
|
|
|
|
source_filename = "test.c"
|
|
|
|
|
|
|
|
@myextern = external global i32, align 4
|
|
|
|
@foo = hidden global i32* @myextern, align 4, !dbg !0
|
|
|
|
@ptr2 = hidden global void ()* @f2, align 4, !dbg !6
|
|
|
|
|
|
|
|
; Function Attrs: noinline nounwind optnone
|
|
|
|
define hidden void @f2() #0 !dbg !17 {
|
|
|
|
entry:
|
|
|
|
ret void, !dbg !18
|
|
|
|
}
|
|
|
|
|
2019-12-25 08:11:33 +08:00
|
|
|
attributes #0 = { noinline nounwind optnone "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "frame-pointer"="none" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="generic" "unsafe-fp-math"="false" "use-soft-float"="false" }
|
2017-10-21 05:28:38 +08:00
|
|
|
|
|
|
|
!llvm.dbg.cu = !{!2}
|
|
|
|
!llvm.module.flags = !{!13, !14, !15}
|
|
|
|
!llvm.ident = !{!16}
|
|
|
|
|
|
|
|
!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression())
|
|
|
|
!1 = distinct !DIGlobalVariable(name: "foo", scope: !2, file: !3, line: 4, type: !11, isLocal: false, isDefinition: true)
|
2018-05-17 04:09:05 +08:00
|
|
|
!2 = distinct !DICompileUnit(language: DW_LANG_C99, file: !3, producer: "clang version 7.0.0 (trunk 332303) (llvm/trunk 332406)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, globals: !5)
|
2017-10-21 05:28:38 +08:00
|
|
|
!3 = !DIFile(filename: "test.c", directory: "/usr/local/google/home/sbc/dev/wasm/simple")
|
|
|
|
!4 = !{}
|
|
|
|
!5 = !{!0, !6}
|
|
|
|
!6 = !DIGlobalVariableExpression(var: !7, expr: !DIExpression())
|
|
|
|
!7 = distinct !DIGlobalVariable(name: "ptr2", scope: !2, file: !3, line: 5, type: !8, isLocal: false, isDefinition: true)
|
|
|
|
!8 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !9, size: 32)
|
|
|
|
!9 = !DISubroutineType(types: !10)
|
|
|
|
!10 = !{null}
|
|
|
|
!11 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !12, size: 32)
|
|
|
|
!12 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
|
|
|
|
!13 = !{i32 2, !"Dwarf Version", i32 4}
|
|
|
|
!14 = !{i32 2, !"Debug Info Version", i32 3}
|
|
|
|
!15 = !{i32 1, !"wchar_size", i32 4}
|
2018-05-17 04:09:05 +08:00
|
|
|
!16 = !{!"clang version 7.0.0 (trunk 332303) (llvm/trunk 332406)"}
|
[DebugInfo] Add DILabel metadata and intrinsic llvm.dbg.label.
In order to set breakpoints on labels and list source code around
labels, we need collect debug information for labels, i.e., label
name, the function label belong, line number in the file, and the
address label located. In order to keep these information in LLVM
IR and to allow backend to generate debug information correctly.
We create a new kind of metadata for labels, DILabel. The format
of DILabel is
!DILabel(scope: !1, name: "foo", file: !2, line: 3)
We hope to keep debug information as much as possible even the
code is optimized. So, we create a new kind of intrinsic for label
metadata to avoid the metadata is eliminated with basic block.
The intrinsic will keep existing if we keep it from optimized out.
The format of the intrinsic is
llvm.dbg.label(metadata !1)
It has only one argument, that is the DILabel metadata. The
intrinsic will follow the label immediately. Backend could get the
label metadata through the intrinsic's parameter.
We also create DIBuilder API for labels to be used by Frontend.
Frontend could use createLabel() to allocate DILabel objects, and use
insertLabel() to insert llvm.dbg.label intrinsic in LLVM IR.
Differential Revision: https://reviews.llvm.org/D45024
Patch by Hsiangkai Wang.
llvm-svn: 331841
2018-05-09 10:40:45 +08:00
|
|
|
!17 = distinct !DISubprogram(name: "f2", scope: !3, file: !3, line: 2, type: !9, isLocal: false, isDefinition: true, scopeLine: 2, flags: DIFlagPrototyped, isOptimized: false, unit: !2, retainedNodes: !4)
|
2018-05-17 04:09:05 +08:00
|
|
|
!18 = !DILocation(line: 2, column: 17, scope: !17)
|