2011-04-15 17:11:06 +02:00
|
|
|
; RUN: llc < %s -mtriple=i686-pc-linux-gnu -o - | FileCheck %s
|
|
|
|
|
|
|
|
; CHECK: .cfi_personality 0, __gnat_eh_personality
|
2011-04-29 16:48:51 +02:00
|
|
|
; CHECK: .cfi_lsda 0, .Lexception0
|
2007-05-05 22:22:08 +02:00
|
|
|
|
2011-06-18 08:05:24 +02:00
|
|
|
@error = external global i8
|
2007-05-05 22:22:08 +02:00
|
|
|
|
|
|
|
define void @_ada_x() {
|
|
|
|
entry:
|
2011-06-18 08:05:24 +02:00
|
|
|
invoke void @raise()
|
|
|
|
to label %eh_then unwind label %unwind
|
|
|
|
|
2011-11-08 01:17:28 +01:00
|
|
|
unwind: ; preds = %entry
|
|
|
|
%eh_ptr = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gnat_eh_personality to i8*)
|
|
|
|
catch i8* @error
|
|
|
|
%eh_select = extractvalue { i8*, i32 } %eh_ptr, 1
|
2011-06-18 08:05:24 +02:00
|
|
|
%eh_typeid = tail call i32 @llvm.eh.typeid.for(i8* @error)
|
|
|
|
%tmp2 = icmp eq i32 %eh_select, %eh_typeid
|
|
|
|
br i1 %tmp2, label %eh_then, label %Unwind
|
|
|
|
|
|
|
|
eh_then: ; preds = %unwind, %entry
|
|
|
|
ret void
|
|
|
|
|
|
|
|
Unwind: ; preds = %unwind
|
2011-11-08 01:17:28 +01:00
|
|
|
resume { i8*, i32 } %eh_ptr
|
2007-05-05 22:22:08 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
declare void @raise()
|
|
|
|
|
2011-06-18 08:05:24 +02:00
|
|
|
declare i32 @llvm.eh.typeid.for(i8*) nounwind
|
2007-05-05 22:22:08 +02:00
|
|
|
|
|
|
|
declare i32 @__gnat_eh_personality(...)
|
|
|
|
|
|
|
|
declare i32 @_Unwind_Resume(...)
|