• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; ModuleID = 'bar.cpp'
2source_filename = "bar.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$_ZNK1A1fEv = comdat any
9
10$_ZTV1A = comdat any
11
12$_ZTS1A = comdat any
13
14$_ZTI1A = comdat any
15
16@_ZTV1A = linkonce_odr hidden unnamed_addr constant { [3 x i8*] } { [3 x i8*] [i8* null, i8* bitcast ({ i8*, i8* }* @_ZTI1A to i8*), i8* bitcast (i32 (%struct.A*)* @_ZNK1A1fEv to i8*)] }, comdat, align 8, !type !0, !type !1
17@_ZTVN10__cxxabiv117__class_type_infoE = external dso_local global i8*
18@_ZTS1A = linkonce_odr hidden constant [3 x i8] c"1A\00", comdat, align 1
19@_ZTI1A = linkonce_odr hidden constant { i8*, i8* } { i8* bitcast (i8** getelementptr inbounds (i8*, i8** @_ZTVN10__cxxabiv117__class_type_infoE, i64 2) to i8*), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @_ZTS1A, i32 0, i32 0) }, comdat, align 8
20
21; Function Attrs: uwtable
22define hidden i32 @_Z3barv() local_unnamed_addr #0 {
23entry:
24  %b = alloca %struct.A, align 8
25  %0 = bitcast %struct.A* %b to i8*
26  call void @llvm.lifetime.start.p0i8(i64 8, i8* nonnull %0)
27  %1 = getelementptr inbounds %struct.A, %struct.A* %b, i64 0, i32 0
28  store i32 (...)** bitcast (i8** getelementptr inbounds ({ [3 x i8*] }, { [3 x i8*] }* @_ZTV1A, i64 0, inrange i32 0, i64 2) to i32 (...)**), i32 (...)*** %1, align 8, !tbaa !4
29  %call = call i32 @_Z3fooP1A(%struct.A* nonnull %b)
30  %add = add nsw i32 %call, 10
31  call void @llvm.lifetime.end.p0i8(i64 8, i8* nonnull %0) #4
32  ret i32 %add
33}
34
35; Function Attrs: argmemonly nounwind willreturn
36declare void @llvm.lifetime.start.p0i8(i64 immarg, i8* nocapture)
37
38declare dso_local i32 @_Z3fooP1A(%struct.A*) local_unnamed_addr
39
40; Function Attrs: argmemonly nounwind willreturn
41declare void @llvm.lifetime.end.p0i8(i64 immarg, i8* nocapture)
42
43; Function Attrs: nounwind uwtable
44define linkonce_odr hidden i32 @_ZNK1A1fEv(%struct.A* %this) unnamed_addr comdat align 2 {
45entry:
46  ret i32 3
47}
48
49!llvm.module.flags = !{!2}
50!llvm.ident = !{!3}
51
52!0 = !{i64 16, !"_ZTS1A"}
53!1 = !{i64 16, !"_ZTSM1AKFivE.virtual"}
54!2 = !{i32 1, !"wchar_size", i32 4}
55!3 = !{!"clang version 10.0.0 (trunk 373596)"}
56!4 = !{!5, !5, i64 0}
57!5 = !{!"vtable pointer", !6, i64 0}
58!6 = !{!"Simple C++ TBAA"}
59