Home | History | Annotate | Download | only in ARM
      1 ; RUN: llc < %s -mtriple=arm-apple-darwin9 -march=arm | FileCheck %s
      2 
      3 ; CHECK: L_LSDA_0:
      4 
      5 
      6 %struct.A = type { i32* }
      7 
      8 define void @"\01-[MyFunction Name:]"() {
      9 entry:
     10   %save_filt.1 = alloca i32
     11   %save_eptr.0 = alloca i8*
     12   %a = alloca %struct.A
     13   %eh_exception = alloca i8*
     14   %eh_selector = alloca i32
     15   %"alloca point" = bitcast i32 0 to i32
     16   call void @_ZN1AC1Ev(%struct.A* %a)
     17   invoke void @_Z3barv()
     18           to label %invcont unwind label %lpad
     19 
     20 invcont:                                          ; preds = %entry
     21   call void @_ZN1AD1Ev(%struct.A* %a) nounwind
     22   br label %return
     23 
     24 bb:                                               ; preds = %ppad
     25   %eh_select = load i32* %eh_selector
     26   store i32 %eh_select, i32* %save_filt.1, align 4
     27   %eh_value = load i8** %eh_exception
     28   store i8* %eh_value, i8** %save_eptr.0, align 4
     29   call void @_ZN1AD1Ev(%struct.A* %a) nounwind
     30   %0 = load i8** %save_eptr.0, align 4
     31   store i8* %0, i8** %eh_exception, align 4
     32   %1 = load i32* %save_filt.1, align 4
     33   store i32 %1, i32* %eh_selector, align 4
     34   br label %Unwind
     35 
     36 return:                                           ; preds = %invcont
     37   ret void
     38 
     39 lpad:                                             ; preds = %entry
     40   %exn = landingpad {i8*, i32} personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*)
     41            cleanup
     42   %eh_ptr = extractvalue {i8*, i32} %exn, 0
     43   store i8* %eh_ptr, i8** %eh_exception
     44   %eh_select2 = extractvalue {i8*, i32} %exn, 1
     45   store i32 %eh_select2, i32* %eh_selector
     46   br label %ppad
     47 
     48 ppad:                                             ; preds = %lpad
     49   br label %bb
     50 
     51 Unwind:                                           ; preds = %bb
     52   %eh_ptr3 = load i8** %eh_exception
     53   call void @_Unwind_SjLj_Resume(i8* %eh_ptr3)
     54   unreachable
     55 }
     56 
     57 define linkonce_odr void @_ZN1AC1Ev(%struct.A* %this) {
     58 entry:
     59   %this_addr = alloca %struct.A*
     60   %"alloca point" = bitcast i32 0 to i32
     61   store %struct.A* %this, %struct.A** %this_addr
     62   %0 = call i8* @_Znwm(i32 4)
     63   %1 = bitcast i8* %0 to i32*
     64   %2 = load %struct.A** %this_addr, align 4
     65   %3 = getelementptr inbounds %struct.A* %2, i32 0, i32 0
     66   store i32* %1, i32** %3, align 4
     67   br label %return
     68 
     69 return:                                           ; preds = %entry
     70   ret void
     71 }
     72 
     73 declare i8* @_Znwm(i32)
     74 
     75 define linkonce_odr void @_ZN1AD1Ev(%struct.A* %this) nounwind {
     76 entry:
     77   %this_addr = alloca %struct.A*
     78   %"alloca point" = bitcast i32 0 to i32
     79   store %struct.A* %this, %struct.A** %this_addr
     80   %0 = load %struct.A** %this_addr, align 4
     81   %1 = getelementptr inbounds %struct.A* %0, i32 0, i32 0
     82   %2 = load i32** %1, align 4
     83   %3 = bitcast i32* %2 to i8*
     84   call void @_ZdlPv(i8* %3) nounwind
     85   br label %bb
     86 
     87 bb:                                               ; preds = %entry
     88   br label %return
     89 
     90 return:                                           ; preds = %bb
     91   ret void
     92 }
     93 
     94 declare void @_ZdlPv(i8*) nounwind
     95 
     96 declare void @_Z3barv()
     97 
     98 declare i32 @llvm.eh.typeid.for(i8*) nounwind
     99 
    100 declare i32 @__gxx_personality_sj0(...)
    101 
    102 declare void @_Unwind_SjLj_Resume(i8*)
    103