DebugInfo: Fix up some test cases to have more correct debug info metadata.
[oota-llvm.git] / test / CodeGen / ARM / 2009-08-31-LSDA-Name.ll
index 397eba410b1f496ea0ad1c05b04f635f48bbd581..a016809857e7f597c6f54a9639c8ccc93a651435 100644 (file)
@@ -1,32 +1,35 @@
 ; RUN: llc < %s -mtriple=arm-apple-darwin9 -march=arm | FileCheck %s
 
+; CHECK: L_LSDA_0:
+
+
 %struct.A = type { i32* }
 
 define void @"\01-[MyFunction Name:]"() {
 entry:
-  %save_filt.1 = alloca i32                       ; <i32*> [#uses=2]
-  %save_eptr.0 = alloca i8*                       ; <i8**> [#uses=2]
-  %a = alloca %struct.A                           ; <%struct.A*> [#uses=3]
-  %eh_exception = alloca i8*                      ; <i8**> [#uses=5]
-  %eh_selector = alloca i32                       ; <i32*> [#uses=3]
-  %"alloca point" = bitcast i32 0 to i32          ; <i32> [#uses=0]
-  call  void @_ZN1AC1Ev(%struct.A* %a)
-  invoke  void @_Z3barv()
+  %save_filt.1 = alloca i32
+  %save_eptr.0 = alloca i8*
+  %a = alloca %struct.A
+  %eh_exception = alloca i8*
+  %eh_selector = alloca i32
+  %"alloca point" = bitcast i32 0 to i32
+  call void @_ZN1AC1Ev(%struct.A* %a)
+  invoke void @_Z3barv()
           to label %invcont unwind label %lpad
 
 invcont:                                          ; preds = %entry
-  call  void @_ZN1AD1Ev(%struct.A* %a) nounwind
+  call void @_ZN1AD1Ev(%struct.A* %a) nounwind
   br label %return
 
 bb:                                               ; preds = %ppad
-  %eh_select = load i32* %eh_selector             ; <i32> [#uses=1]
+  %eh_select = load i32* %eh_selector
   store i32 %eh_select, i32* %save_filt.1, align 4
-  %eh_value = load i8** %eh_exception             ; <i8*> [#uses=1]
+  %eh_value = load i8** %eh_exception
   store i8* %eh_value, i8** %save_eptr.0, align 4
-  call  void @_ZN1AD1Ev(%struct.A* %a) nounwind
-  %0 = load i8** %save_eptr.0, align 4            ; <i8*> [#uses=1]
+  call void @_ZN1AD1Ev(%struct.A* %a) nounwind
+  %0 = load i8** %save_eptr.0, align 4
   store i8* %0, i8** %eh_exception, align 4
-  %1 = load i32* %save_filt.1, align 4            ; <i32> [#uses=1]
+  %1 = load i32* %save_filt.1, align 4
   store i32 %1, i32* %eh_selector, align 4
   br label %Unwind
 
@@ -34,10 +37,11 @@ return:                                           ; preds = %invcont
   ret void
 
 lpad:                                             ; preds = %entry
-  %eh_ptr = call i8* @llvm.eh.exception()         ; <i8*> [#uses=1]
+  %exn = landingpad {i8*, i32} personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*)
+           cleanup
+  %eh_ptr = extractvalue {i8*, i32} %exn, 0
   store i8* %eh_ptr, i8** %eh_exception
-  %eh_ptr1 = load i8** %eh_exception              ; <i8*> [#uses=1]
-  %eh_select2 = call i32 (i8*, i8*, ...)* @llvm.eh.selector.i32(i8* %eh_ptr1, i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*), i32 0) ; <i32> [#uses=1]
+  %eh_select2 = extractvalue {i8*, i32} %exn, 1
   store i32 %eh_select2, i32* %eh_selector
   br label %ppad
 
@@ -45,20 +49,20 @@ ppad:                                             ; preds = %lpad
   br label %bb
 
 Unwind:                                           ; preds = %bb
-  %eh_ptr3 = load i8** %eh_exception              ; <i8*> [#uses=1]
-  call  void @_Unwind_SjLj_Resume(i8* %eh_ptr3)
+  %eh_ptr3 = load i8** %eh_exception
+  call void @_Unwind_SjLj_Resume(i8* %eh_ptr3)
   unreachable
 }
 
 define linkonce_odr void @_ZN1AC1Ev(%struct.A* %this) {
 entry:
-  %this_addr = alloca %struct.A*                  ; <%struct.A**> [#uses=2]
-  %"alloca point" = bitcast i32 0 to i32          ; <i32> [#uses=0]
+  %this_addr = alloca %struct.A*
+  %"alloca point" = bitcast i32 0 to i32
   store %struct.A* %this, %struct.A** %this_addr
-  %0 = call  i8* @_Znwm(i32 4)         ; <i8*> [#uses=1]
-  %1 = bitcast i8* %0 to i32*                     ; <i32*> [#uses=1]
-  %2 = load %struct.A** %this_addr, align 4       ; <%struct.A*> [#uses=1]
-  %3 = getelementptr inbounds %struct.A* %2, i32 0, i32 0 ; <i32**> [#uses=1]
+  %0 = call i8* @_Znwm(i32 4)
+  %1 = bitcast i8* %0 to i32*
+  %2 = load %struct.A** %this_addr, align 4
+  %3 = getelementptr inbounds %struct.A* %2, i32 0, i32 0
   store i32* %1, i32** %3, align 4
   br label %return
 
@@ -70,14 +74,14 @@ declare i8* @_Znwm(i32)
 
 define linkonce_odr void @_ZN1AD1Ev(%struct.A* %this) nounwind {
 entry:
-  %this_addr = alloca %struct.A*                  ; <%struct.A**> [#uses=2]
-  %"alloca point" = bitcast i32 0 to i32          ; <i32> [#uses=0]
+  %this_addr = alloca %struct.A*
+  %"alloca point" = bitcast i32 0 to i32
   store %struct.A* %this, %struct.A** %this_addr
-  %0 = load %struct.A** %this_addr, align 4       ; <%struct.A*> [#uses=1]
-  %1 = getelementptr inbounds %struct.A* %0, i32 0, i32 0 ; <i32**> [#uses=1]
-  %2 = load i32** %1, align 4                     ; <i32*> [#uses=1]
-  %3 = bitcast i32* %2 to i8*                     ; <i8*> [#uses=1]
-  call  void @_ZdlPv(i8* %3) nounwind
+  %0 = load %struct.A** %this_addr, align 4
+  %1 = getelementptr inbounds %struct.A* %0, i32 0, i32 0
+  %2 = load i32** %1, align 4
+  %3 = bitcast i32* %2 to i8*
+  call void @_ZdlPv(i8* %3) nounwind
   br label %bb
 
 bb:                                               ; preds = %entry
@@ -86,17 +90,12 @@ bb:                                               ; preds = %entry
 return:                                           ; preds = %bb
   ret void
 }
-;CHECK: L_LSDA_0:
 
 declare void @_ZdlPv(i8*) nounwind
 
 declare void @_Z3barv()
 
-declare i8* @llvm.eh.exception() nounwind
-
-declare i32 @llvm.eh.selector.i32(i8*, i8*, ...) nounwind
-
-declare i32 @llvm.eh.typeid.for.i32(i8*) nounwind
+declare i32 @llvm.eh.typeid.for(i8*) nounwind
 
 declare i32 @__gxx_personality_sj0(...)