1; ModuleID = 'foo.cpp' 2source_filename = "foo.cpp" 3target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" 4target triple = "x86_64-unknown-linux-gnu" 5 6%struct.A = type { i32 (...)** } 7 8; Function Attrs: uwtable 9define hidden i32 @_Z3fooP1A(%struct.A* %pA) local_unnamed_addr { 10entry: 11 %0 = bitcast %struct.A* %pA to i32 (%struct.A*)*** 12 %vtable = load i32 (%struct.A*)**, i32 (%struct.A*)*** %0, align 8, !tbaa !2 13 %1 = bitcast i32 (%struct.A*)** %vtable to i8* 14 %2 = tail call i1 @llvm.type.test(i8* %1, metadata !"_ZTS1A") 15 tail call void @llvm.assume(i1 %2) 16 %3 = load i32 (%struct.A*)*, i32 (%struct.A*)** %vtable, align 8 17 %call = tail call i32 %3(%struct.A* %pA) 18 %add = add nsw i32 %call, 10 19 ret i32 %add 20} 21 22; Function Attrs: nounwind readnone willreturn 23declare i1 @llvm.type.test(i8*, metadata) 24 25; Function Attrs: nounwind willreturn 26declare void @llvm.assume(i1) 27 28!llvm.module.flags = !{!0} 29!llvm.ident = !{!1} 30 31!0 = !{i32 1, !"wchar_size", i32 4} 32!1 = !{!"clang version 10.0.0 (trunk 373596)"} 33!2 = !{!3, !3, i64 0} 34!3 = !{!"vtable pointer", !4, i64 0} 35!4 = !{!"Simple C++ TBAA"} 36