brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.0 KiB · 124c2c4 Raw
44 lines · plain
1; RUN: llc -mtriple=i686-apple-macosx -o - %s | FileCheck %s2 3; x86 doesn't normally use indirect symbols, particularly hidden ones, but it4; can be tricked into it for exception-handling typeids.5 6@hidden_typeid = external hidden constant ptr7@normal_typeid = external constant ptr8 9declare void @throws()10 11define void @get_indirect_hidden() personality ptr @__gxx_personality_v0 {12  invoke void @throws() to label %end unwind label %lpad13lpad:14  %tmp = landingpad { ptr, i32 }15          catch ptr @hidden_typeid16  br label %end17 18end:19  ret void20}21 22define void @get_indirect() personality ptr @__gxx_personality_v0 {23  invoke void @throws() to label %end unwind label %lpad24lpad:25  %tmp = landingpad { ptr, i32 }26          catch ptr @normal_typeid27  br label %end28 29end:30  ret void31}32 33declare i32 @__gxx_personality_v0(...)34 35; CHECK: .section __IMPORT,__pointers,non_lazy_symbol_pointers36 37; CHECK-NOT: __DATA,__data38; CHECK: .indirect_symbol _hidden_typeid39; CHECK-NEXT: .long 040 41; CHECK-NOT: __DATA,__data42; CHECK: .indirect_symbol _normal_typeid43; CHECK-NEXT: .long 044