40 lines · plain
1; Test summary parsing of index-based WPD related summary fields2; RUN: llvm-as %s -o - | llvm-dis -o %t.ll3; RUN: grep "^\^" %s >%t24; RUN: grep "^\^" %t.ll >%t35; Expect that the summary information is the same after round-trip through6; llvm-as and llvm-dis.7; RUN: diff -b %t2 %t38 9source_filename = "thinlto-vtable-summary.ll"10target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"11target triple = "x86_64-grtev4-linux-gnu"12 13%struct.A = type { ptr }14%struct.B = type { %struct.A }15%struct.C = type { %struct.A }16 17@_ZTV1B = constant { [4 x ptr] } { [4 x ptr] [ptr null, ptr undef, ptr @_ZN1B1fEi, ptr @_ZN1A1nEi] }, !type !0, !type !118@_ZTV1C = constant { [4 x ptr] } { [4 x ptr] [ptr null, ptr undef, ptr @_ZN1C1fEi, ptr @_ZN1A1nEi] }, !type !0, !type !219 20declare i32 @_ZN1B1fEi(ptr, i32)21 22declare i32 @_ZN1A1nEi(ptr, i32)23 24declare i32 @_ZN1C1fEi(ptr, i32)25 26!0 = !{i64 16, !"_ZTS1A"}27!1 = !{i64 16, !"_ZTS1B"}28!2 = !{i64 16, !"_ZTS1C"}29 30^0 = module: (path: "<stdin>", hash: (0, 0, 0, 0, 0))31^1 = gv: (name: "_ZN1A1nEi") ; guid = 162156328792943225732^2 = gv: (name: "_ZTV1B", summaries: (variable: (module: ^0, flags: (linkage: external, visibility: default, notEligibleToImport: 0, live: 0, dsoLocal: 0, canAutoHide: 0, importType: definition), varFlags: (readonly: 0, writeonly: 0, constant: 0, vcall_visibility: 0), vTableFuncs: ((virtFunc: ^3, offset: 16), (virtFunc: ^1, offset: 24)), refs: (^3, ^1)))) ; guid = 528357682152279036733^3 = gv: (name: "_ZN1B1fEi") ; guid = 716204636881641439434^4 = gv: (name: "_ZTV1C", summaries: (variable: (module: ^0, flags: (linkage: external, visibility: default, notEligibleToImport: 0, live: 0, dsoLocal: 0, canAutoHide: 0, importType: definition), varFlags: (readonly: 0, writeonly: 0, constant: 0, vcall_visibility: 0), vTableFuncs: ((virtFunc: ^5, offset: 16), (virtFunc: ^1, offset: 24)), refs: (^1, ^5)))) ; guid = 1362402378555584629635^5 = gv: (name: "_ZN1C1fEi") ; guid = 1487627256566220755636^6 = typeidCompatibleVTable: (name: "_ZTS1A", summary: ((offset: 16, ^2), (offset: 16, ^4))) ; guid = 700415534949925377837^7 = typeidCompatibleVTable: (name: "_ZTS1B", summary: ((offset: 16, ^2))) ; guid = 620381414906336397638^8 = typeidCompatibleVTable: (name: "_ZTS1C", summary: ((offset: 16, ^4))) ; guid = 188492185010501958439^9 = blockcount: 040