1 ; RUN: llc -mtriple=armv7-none-linux-gnueabi < %s | FileCheck %s
3 @_ZTVN10__cxxabiv117__class_type_infoE = external global i8*
4 @_ZTS3Foo = linkonce_odr constant [5 x i8] c"3Foo\00"
5 @_ZTI3Foo = linkonce_odr unnamed_addr constant { i8*, i8* } { i8* bitcast (i8** getelementptr inbounds (i8*, i8** @_ZTVN10__cxxabiv117__class_type_infoE, i32 2) to i8*), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @_ZTS3Foo, i32 0, i32 0) }
7 define i32 @main() personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
10 to label %return unwind label %lpad
12 lpad: ; preds = %entry
13 %0 = landingpad { i8*, i32 }
14 catch i8* bitcast ({ i8*, i8* }* @_ZTI3Foo to i8*)
15 %1 = extractvalue { i8*, i32 } %0, 1
16 %2 = tail call i32 @llvm.eh.typeid.for(i8* bitcast ({ i8*, i8* }* @_ZTI3Foo to i8*)) nounwind
17 ; CHECK: _ZTI3Foo(target2)
19 %matches = icmp eq i32 %1, %2
20 br i1 %matches, label %catch, label %eh.resume
22 catch: ; preds = %lpad
23 %3 = extractvalue { i8*, i32 } %0, 0
24 %4 = tail call i8* @__cxa_begin_catch(i8* %3) nounwind
25 tail call void @__cxa_end_catch()
28 return: ; preds = %entry, %catch
29 %retval.0 = phi i32 [ 1, %catch ], [ 0, %entry ]
32 eh.resume: ; preds = %lpad
33 resume { i8*, i32 } %0
36 declare void @_Z3foov()
38 declare i32 @__gxx_personality_v0(...)
40 declare i32 @llvm.eh.typeid.for(i8*) nounwind readnone
42 declare i8* @__cxa_begin_catch(i8*)
44 declare void @__cxa_end_catch()