1 ; Check that we don't crash when processing declaration with type metadata
2 ; RUN: opt -S -passes=wholeprogramdevirt -whole-program-visibility %s
4 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
5 target triple = "x86_64-none-linux-gnu"
7 declare i1 @llvm.type.test(ptr, metadata)
8 declare void @llvm.assume(i1)
10 @_ZTVN3foo3barE = external dso_local unnamed_addr constant { [8 x ptr] }, align 8, !type !0
12 define i1 @call1(ptr %obj) {
13 %vtable = load ptr, ptr %obj
14 %p = call i1 @llvm.type.test(ptr %vtable, metadata !"typeid")
15 call void @llvm.assume(i1 %p)
16 %fptr = load ptr, ptr %vtable
17 %result = call i1 %fptr(ptr %obj)
21 !0 = !{i64 16, !"_ZTSN3foo3barE"}