File: invoke.ll

package info (click to toggle)
swiftlang 6.0.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,519,992 kB
  • sloc: cpp: 9,107,863; ansic: 2,040,022; asm: 1,135,751; python: 296,500; objc: 82,456; f90: 60,502; lisp: 34,951; pascal: 19,946; sh: 18,133; perl: 7,482; ml: 4,937; javascript: 4,117; makefile: 3,840; awk: 3,535; xml: 914; fortran: 619; cs: 573; ruby: 573
file content (80 lines) | stat: -rw-r--r-- 3,740 bytes parent folder | download | duplicates (15)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
; RUN: llvm-as < %s | llvm-dis > %t.orig
; RUN: llvm-as < %s | llvm-c-test --echo > %t.echo
; RUN: diff -w %t.orig %t.echo

%C6object9ClassInfo = type { ptr, ptr }
%C6object9ClassInfo__vtbl = type { ptr }
%C6object9Exception__vtbl = type { ptr }
%C6object6Object = type { ptr }
%C6object6Object__vtbl = type { ptr }
%C6object9Throwable = type { ptr }
%C6object9Throwable__vtbl = type { ptr }

@C6object9ClassInfo__ClassInfo = linkonce_odr constant %C6object9ClassInfo { ptr @C6object9ClassInfo__vtblZ, ptr @C6object8TypeInfo__ClassInfo }
@C6object9ClassInfo__vtblZ = linkonce_odr constant %C6object9ClassInfo__vtbl { ptr @C6object9ClassInfo__ClassInfo }
@C6object8TypeInfo__ClassInfo = linkonce_odr constant %C6object9ClassInfo { ptr @C6object9ClassInfo__vtblZ, ptr @C6object6Object__ClassInfo }
@C6object6Object__ClassInfo = linkonce_odr constant %C6object9ClassInfo { ptr @C6object9ClassInfo__vtblZ, ptr @C6object6Object__ClassInfo }
@C6object9Throwable__ClassInfo = linkonce_odr constant %C6object9ClassInfo { ptr @C6object9ClassInfo__vtblZ, ptr @C6object6Object__ClassInfo }
@C6object9Exception__ClassInfo = linkonce_odr constant %C6object9ClassInfo { ptr @C6object9ClassInfo__vtblZ, ptr @C6object9Throwable__ClassInfo }
@C6object9Exception__vtblZ = linkonce_odr constant %C6object9Exception__vtbl { ptr @C6object9Exception__ClassInfo }
@C6object5Error__ClassInfo = linkonce_odr constant %C6object9ClassInfo { ptr @C6object9ClassInfo__vtblZ, ptr @C6object9Throwable__ClassInfo }

define i32 @_D8test01494mainFMZi() personality ptr @__sd_eh_personality {
body:
  %0 = invoke noalias ptr @_d_allocmemory(i64 8)
          to label %then unwind label %landingPad

then:                                             ; preds = %body
  store ptr bitcast (ptr @C6object9Exception__vtblZ to ptr), ptr %0, align 8
  invoke void @_D6object6Object6__ctorFMC6object6ObjectZv(ptr %0)
          to label %then1 unwind label %landingPad

then1:                                            ; preds = %then
  invoke void @__sd_eh_throw(ptr nonnull %0)
          to label %then2 unwind label %landingPad

then2:                                            ; preds = %then1
  unreachable

landingPad:                                       ; preds = %then1, %then, %body
  %1 = landingpad { ptr, i32 }
          cleanup
          catch ptr @C6object5Error__ClassInfo
          catch ptr @C6object9Exception__ClassInfo
          catch ptr @C6object9Throwable__ClassInfo
  %2 = extractvalue { ptr, i32 } %1, 1
  %3 = tail call i32 @llvm.eh.typeid.for(ptr nonnull bitcast (ptr @C6object5Error__ClassInfo to ptr))
  %4 = icmp eq i32 %3, %2
  br i1 %4, label %catch, label %unwind3

catch:                                            ; preds = %unwind5, %unwind3, %landingPad
  %merge = phi i32 [ 23, %landingPad ], [ 19, %unwind3 ], [ 13, %unwind5 ]
  ret i32 %merge

unwind3:                                          ; preds = %landingPad
  %5 = tail call i32 @llvm.eh.typeid.for(ptr nonnull @C6object9Exception__ClassInfo)
  %6 = icmp eq i32 %5, %2
  br i1 %6, label %catch, label %unwind5

unwind5:                                          ; preds = %unwind3
  %7 = tail call i32 @llvm.eh.typeid.for(ptr nonnull @C6object9Throwable__ClassInfo)
  %8 = icmp eq i32 %7, %2
  br i1 %8, label %catch, label %unwind7

unwind7:                                          ; preds = %unwind5
  resume { ptr, i32 } %1
}

declare void @_D6object6Object6__ctorFMC6object6ObjectZv(ptr)

declare noalias ptr @_d_allocmemory(i64)

declare i32 @__sd_eh_personality(i32, i32, i64, ptr, ptr)

declare void @__sd_eh_throw(ptr nonnull) #0

; Function Attrs: nounwind readnone
declare i32 @llvm.eh.typeid.for(ptr) #1

attributes #0 = { noreturn }
attributes #1 = { nounwind readnone }