2013-10-31 20:51:58 +00:00
|
|
|
; RUN: llvm-as < %s >%t1
|
|
|
|
; RUN: llvm-lto -o %t2 -dso-symbol=foo1 -dso-symbol=foo2 -dso-symbol=foo3 \
|
|
|
|
; RUN: -dso-symbol=foo4 %t1 -disable-opt
|
|
|
|
; RUN: llvm-nm %t2 | FileCheck %s
|
2013-10-25 21:29:52 +00:00
|
|
|
|
2013-10-31 21:22:43 +00:00
|
|
|
; FIXME: it looks like -march option of llvm-lto is not working and llvm-nm is
|
|
|
|
; not printing the correct values with Mach-O.
|
|
|
|
; XFAIL: darwin
|
|
|
|
|
2013-10-31 20:51:58 +00:00
|
|
|
; CHECK: t foo1
|
2013-10-25 21:29:52 +00:00
|
|
|
define linkonce_odr void @foo1() noinline {
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2013-10-31 20:51:58 +00:00
|
|
|
; CHECK: W foo2
|
2013-10-25 21:29:52 +00:00
|
|
|
define linkonce_odr void @foo2() noinline {
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2013-10-31 20:51:58 +00:00
|
|
|
; CHECK: t foo3
|
2013-10-25 21:29:52 +00:00
|
|
|
define linkonce_odr void @foo3() noinline {
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2013-10-31 20:51:58 +00:00
|
|
|
; CHECK: W foo4
|
2013-10-25 21:29:52 +00:00
|
|
|
define linkonce_odr void @foo4() noinline {
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
declare void @f(void()*)
|
|
|
|
|
2013-10-31 20:51:58 +00:00
|
|
|
declare void @p()
|
|
|
|
|
2013-10-25 21:29:52 +00:00
|
|
|
define void @bar() {
|
|
|
|
bb0:
|
|
|
|
call void @foo1()
|
|
|
|
call void @f(void()* @foo2)
|
|
|
|
invoke void @foo3() to label %bb1 unwind label %clean
|
|
|
|
bb1:
|
|
|
|
invoke void @f(void()* @foo4) to label %bb2 unwind label %clean
|
|
|
|
bb2:
|
|
|
|
ret void
|
|
|
|
clean:
|
2013-10-31 20:51:58 +00:00
|
|
|
landingpad {i32, i32} personality void()* @p cleanup
|
2013-10-25 21:29:52 +00:00
|
|
|
ret void
|
|
|
|
}
|