]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - opencl/llvm.git/blob - test/Transforms/Inline/debug-invoke.ll
IR: Make metadata typeless in assembly
[opencl/llvm.git] / test / Transforms / Inline / debug-invoke.ll
1 ; RUN: opt < %s -always-inline -S | FileCheck %s
3 ; Test that the debug location is preserved when rewriting an inlined call as an invoke
5 ; CHECK: invoke void @test()
6 ; CHECK-NEXT: to label {{.*}} unwind label {{.*}}, !dbg [[INL_LOC:!.*]]
7 ; CHECK: [[EMPTY:.*]] = !{}
8 ; CHECK: [[INL_LOC]] = !{i32 1, i32 0, [[EMPTY]], [[INL_AT:.*]]}
9 ; CHECK: [[INL_AT]] = !{i32 2, i32 0, [[EMPTY]], null}
11 declare void @test()
12 declare i32 @__gxx_personality_v0(...)
14 attributes #0 = { alwaysinline }
15 define void @inl() #0 {
16   call void @test(), !dbg !3
17   ret void
18 }
20 define void @caller() {
21   invoke void @inl()
22     to label %cont unwind label %lpad, !dbg !4
24 cont:
25   ret void
27 lpad:
28   landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*)
29     cleanup
30   ret void
31 }
33 !llvm.module.flags = !{!1}
34 !1 = !{i32 2, !"Debug Info Version", i32 2}
35 !2 = !{}
36 !3 = !{i32 1, i32 0, !2, null}
37 !4 = !{i32 2, i32 0, !2, null}