| /llvm-project-15.0.7/compiler-rt/test/cfi/cross-dso/ |
| H A D | target_out_of_bounds.cpp | 34 void *vtable = mmap(nullptr, 4096, PROT_NONE, MAP_PRIVATE | MAP_ANONYMOUS, 0, 0); in main() local 36 *(uintptr_t *)p = (uintptr_t)vtable + 64; in main() 46 void *vtable = calloc(1, 128); in main() local 47 *(uintptr_t *)p = (uintptr_t)vtable + 64; in main() 57 void *vtable = calloc(1, 128); in main() local 58 memset(vtable, 0xFE, 128); in main() 59 *(uintptr_t *)p = (uintptr_t)vtable + 64; in main()
|
| /llvm-project-15.0.7/llvm/test/CodeGen/X86/ |
| H A D | x86-64-plt-relative-reloc.ll | 3 @vtable = constant [5 x i32] [i32 0, 4 …oint (ptr @fn1 to i64), i64 ptrtoint (ptr getelementptr ([5 x i32], ptr @vtable, i32 0, i32 1) to … 5 …oint (ptr @fn2 to i64), i64 ptrtoint (ptr getelementptr ([5 x i32], ptr @vtable, i32 0, i32 1) to … 6 …oint (ptr @fn3 to i64), i64 ptrtoint (ptr getelementptr ([5 x i32], ptr @vtable, i32 0, i32 1) to … 7 … (ptr @global4 to i64), i64 ptrtoint (ptr getelementptr ([5 x i32], ptr @vtable, i32 0, i32 1) to … 16 ; CHECK-NEXT: .long (fn1@PLT-vtable)-4 17 ; CHECK-NEXT: .long (fn2@PLT-vtable)-4 18 ; CHECK-NEXT: .long (fn3-vtable)-4 19 ; CHECK-NEXT: .long (global4-vtable)-4
|
| H A D | musttail-indirect.ll | 33 %vtable = load ptr, ptr %this 34 %1 = load ptr, ptr %vtable 46 %vtable = load ptr, ptr %this 60 %vtable = load ptr, ptr %this 73 %vtable = load ptr, ptr %this 86 %vtable = load ptr, ptr %this 99 %vtable = load ptr, ptr %this 112 %vtable = load ptr, ptr %this 124 %vtable = load ptr, ptr %this 139 %vtable = load ptr, ptr %this [all …]
|
| H A D | x86-plt-relative-reloc.ll | 3 @vtable = constant [4 x i32] [i32 0, 4 …oint (ptr @fn1 to i32), i32 ptrtoint (ptr getelementptr ([4 x i32], ptr @vtable, i32 0, i32 1) to … 5 …oint (ptr @fn2 to i32), i32 ptrtoint (ptr getelementptr ([4 x i32], ptr @vtable, i32 0, i32 1) to … 6 …oint (ptr @fn3 to i32), i32 ptrtoint (ptr getelementptr ([4 x i32], ptr @vtable, i32 0, i32 1) to … 14 ; CHECK-NEXT: .long (fn1@PLT-vtable)-4 15 ; CHECK-NEXT: .long (fn2@PLT-vtable)-4 16 ; CHECK-NEXT: .long (fn3-vtable)-4
|
| /llvm-project-15.0.7/llvm/test/DebugInfo/PDB/ |
| H A D | pdb-resolve-forward-refs.test | 9 ; CHECK: vtable: <no type>, base list: <no type>, field list: 0x1007 13 ; CHECK: vtable: <no type>, base list: <no type>, field list: 0x1007 17 ; CHECK: vtable: <no type>, base list: <no type>, field list: <no type> 21 ; CHECK: vtable: <no type>, base list: <no type>, field list: 0x1055 25 ; CHECK: vtable: <no type>, base list: <no type>, field list: 0x1007 33 ; CHECK: vtable: <no type>, base list: <no type>, field list: 0x105B 37 ; CHECK: vtable: <no type>, base list: <no type>, field list: 0x1007 49 ; CHECK: vtable: <no type>, base list: <no type>, field list: 0x1063 61 ; CHECK: vtable: <no type>, base list: <no type>, field list: 0x106A 65 ; CHECK: vtable: <no type>, base list: <no type>, field list: 0x1007 [all …]
|
| /llvm-project-15.0.7/llvm/test/Transforms/GlobalDCE/ |
| H A D | virtual-functions-relative-pointers.ll | 7 ; A vtable with "relative pointers", slots don't contain pointers to implementations, but instead h… 8 @vtable = internal unnamed_addr constant { [2 x i32] } { [2 x i32] [ 9 …(void ()* @vfunc1_live to i64), i64 ptrtoint ({ [2 x i32] }* @vtable to i64)) to i32), 10 … (void ()* @vfunc2_dead to i64), i64 ptrtoint ({ [2 x i32] }* @vtable to i64)) to i32) 15 ; CHECK: @vtable = internal unnamed_addr constant { [2 x i32] } { [2 x i32] [ 16 …(void ()* @vfunc1_live to i64), i64 ptrtoint ({ [2 x i32] }* @vtable to i64)) to i32), 26 ; (2) vfunc2_dead is never referenced, gets removed and vtable slot is null'd 33 %1 = ptrtoint { [2 x i32] }* @vtable to i64 ; to keep @vtable alive
|
| H A D | virtual-functions-relative-pointers-gep.ll | 7 ; A vtable with "relative pointers", slots don't contain pointers to implementations, but instead h… 8 @vtable = internal unnamed_addr constant { [4 x i32] } { [4 x i32] [ 11 …64 ptrtoint (i32* getelementptr inbounds ({ [4 x i32] }, { [4 x i32] }* @vtable, i32 0, i32 0, i32… 12 …64 ptrtoint (i32* getelementptr inbounds ({ [4 x i32] }, { [4 x i32] }* @vtable, i32 0, i32 0, i32… 17 ; CHECK: @vtable = internal unnamed_addr constant { [4 x i32] } { [4 x i32] [ 18 …64 ptrtoint (i32* getelementptr inbounds ({ [4 x i32] }, { [4 x i32] }* @vtable, i32 0, i32 0, i32… 28 ; (2) vfunc2_dead is never referenced, gets removed and vtable slot is null'd 35 %1 = ptrtoint { [4 x i32] }* @vtable to i64 ; to keep @vtable alive
|
| H A D | virtual-functions-relative-pointers-bad.ll | 7 @vtable = internal unnamed_addr constant { [3 x i32] } { [3 x i32] [ 8 …oint (void ()* @vfunc1 to i64), i64 ptrtoint ({ [3 x i32] }* @vtable to i64)) to i32), 9 …oint (void ()* @vfunc2 to i64), i64 ptrtoint ({ [3 x i32] }* @vtable to i64)) to i32), 11 ; a "bad" relative pointer because it's base is not the @vtable symbol 17 ; CHECK: @vtable = internal unnamed_addr constant { [3 x i32] } zeroinitializer, align 8, !typ… 25 %1 = ptrtoint { [3 x i32] }* @vtable to i64 ; to keep @vtable alive
|
| /llvm-project-15.0.7/llvm/test/CodeGen/ARM/ |
| H A D | plt-relative-reloc.ll | 3 @vtable = constant [4 x i32] [i32 0, 4 …* @fn1 to i32), i32 ptrtoint (i32* getelementptr ([4 x i32], [4 x i32]* @vtable, i32 0, i32 1) to … 5 …* @fn2 to i32), i32 ptrtoint (i32* getelementptr ([4 x i32], [4 x i32]* @vtable, i32 0, i32 1) to … 6 …* @fn3 to i32), i32 ptrtoint (i32* getelementptr ([4 x i32], [4 x i32]* @vtable, i32 0, i32 1) to … 14 ; CHECK-NEXT: .long (fn1(prel31)-vtable)-4 15 ; CHECK-NEXT: .long (fn2(prel31)-vtable)-4 16 ; CHECK-NEXT: .long (fn3-vtable)-4
|
| /llvm-project-15.0.7/llvm/test/Transforms/WholeProgramDevirt/ |
| H A D | unique-retval-same-vtable.ll | 2 ; in the same vtable. Both calls are optimized to a comparison of 3 ; this's vptr against the address of the vtable. When nesting these 5 ; but that assumption does not hold if both checks refer to the same vtable. 9 ; RUN: -wholeprogramdevirt-read-summary=%p/Inputs/unique-retval-same-vtable.yaml \ 27 %vtable = load i1 (%class.C*)**, i1 (%class.C*)*** %0 28 %1 = bitcast i1 (%class.C*)** %vtable to i8* 31 %vfn = getelementptr inbounds i1 (%class.C*)*, i1 (%class.C*)** %vtable, i64 2 44 ; the branch above both return true in the same vtable and only that 45 ; vtable. Therefore, if this call is reached, we must select
|
| H A D | struct-vtable.ll | 17 %vtable = load [1 x i8*]*, [1 x i8*]** %vtableptr 18 %vtablei8 = bitcast [1 x i8*]* %vtable to i8* 21 %fptrptr = getelementptr [1 x i8*], [1 x i8*]* %vtable, i32 0, i32 0 32 %vtable = load [1 x i8*]*, [1 x i8*]** %vtableptr 33 %vtablei8 = bitcast [1 x i8*]* %vtable to i8* 36 %fptrptr = getelementptr [1 x i8*], [1 x i8*]* %vtable, i32 0, i32 4 47 %vtable = load [1 x i8*]*, [1 x i8*]** %vtableptr 48 %vtablei8 = bitcast [1 x i8*]* %vtable to i8*
|
| H A D | vcp-type-mismatch.ll | 26 %vtable = load [1 x i8*]*, [1 x i8*]** %vtableptr 27 %vtablei8 = bitcast [1 x i8*]* %vtable to i8* 30 %fptrptr = getelementptr [1 x i8*], [1 x i8*]* %vtable, i32 0, i32 0 41 %vtable = load [1 x i8*]*, [1 x i8*]** %vtableptr 42 %vtablei8 = bitcast [1 x i8*]* %vtable to i8* 45 %fptrptr = getelementptr [1 x i8*], [1 x i8*]* %vtable, i32 0, i32 0 56 %vtable = load [1 x i8*]*, [1 x i8*]** %vtableptr 57 %vtablei8 = bitcast [1 x i8*]* %vtable to i8* 60 %fptrptr = getelementptr [1 x i8*], [1 x i8*]* %vtable, i32 0, i32 0
|
| H A D | unique-retval.ll | 30 %vtable = load [1 x i8*]*, [1 x i8*]** %vtableptr 31 %vtablei8 = bitcast [1 x i8*]* %vtable to i8* 34 %fptrptr = getelementptr [1 x i8*], [1 x i8*]* %vtable, i32 0, i32 0 37 ; CHECK: [[RES1:%[^ ]*]] = icmp eq [1 x i8*]* %vtable, @vt3 46 %vtable = load [1 x i8*]*, [1 x i8*]** %vtableptr 47 %vtablei8 = bitcast [1 x i8*]* %vtable to i8* 50 %fptrptr = getelementptr [1 x i8*], [1 x i8*]* %vtable, i32 0, i32 0 54 ; CHECK: [[RES2:%[^ ]*]] = icmp ne [1 x i8*]* %vtable, @vt2
|
| H A D | bad-read-from-vtable.ll | 16 %vtable = load [1 x i8*]*, [1 x i8*]** %vtableptr 17 %vtablei8 = bitcast [1 x i8*]* %vtable to i8* 32 %vtable = load [1 x i8*]*, [1 x i8*]** %vtableptr 33 %vtablei8 = bitcast [1 x i8*]* %vtable to i8* 48 %vtable = load [1 x i8*]*, [1 x i8*]** %vtableptr 49 %vtablei8 = bitcast [1 x i8*]* %vtable to i8* 64 %vtable = load [1 x i8*]*, [1 x i8*]** %vtableptr 65 %vtablei8 = bitcast [1 x i8*]* %vtable to i8*
|
| H A D | soa-vtable.ll | 21 %vtable = load [1 x i8*]*, [1 x i8*]** %vtableptr 22 %vtablei8 = bitcast [1 x i8*]* %vtable to i8* 25 %fptrptr = getelementptr [1 x i8*], [1 x i8*]* %vtable, i32 0, i32 0 36 %vtable = load [1 x i8*]*, [1 x i8*]** %vtableptr 37 %vtablei8 = bitcast [1 x i8*]* %vtable to i8* 40 %fptrptr = getelementptr [1 x i8*], [1 x i8*]* %vtable, i32 0, i32 0
|
| H A D | import-no-dominating-assume.ll | 8 %vtable = load [3 x i8*]*, [3 x i8*]** %vtableptr 13 %vtablei8_1 = bitcast [3 x i8*]* %vtable to i8* 16 %fptrptr1 = getelementptr [3 x i8*], [3 x i8*]* %vtable, i32 0, i32 0 25 %vtablei8_2 = bitcast [3 x i8*]* %vtable to i8* 28 %fptrptr2 = getelementptr [3 x i8*], [3 x i8*]* %vtable, i32 0, i32 0
|
| H A D | vcp-too-wide-ints.ll | 34 %vtable = load [1 x i8*]*, [1 x i8*]** %vtableptr 35 %vtablei8 = bitcast [1 x i8*]* %vtable to i8* 38 %fptrptr = getelementptr [1 x i8*], [1 x i8*]* %vtable, i32 0, i32 0 49 %vtable = load [1 x i8*]*, [1 x i8*]** %vtableptr 50 %vtablei8 = bitcast [1 x i8*]* %vtable to i8* 53 %fptrptr = getelementptr [1 x i8*], [1 x i8*]* %vtable, i32 0, i32 0
|
| H A D | vcp-accesses-memory.ll | 35 %vtable = load [1 x i8*]*, [1 x i8*]** %vtableptr 36 %vtablei8 = bitcast [1 x i8*]* %vtable to i8* 39 %fptrptr = getelementptr [1 x i8*], [1 x i8*]* %vtable, i32 0, i32 0 53 %vtable = load [1 x i8*]*, [1 x i8*]** %vtableptr 54 %vtablei8 = bitcast [1 x i8*]* %vtable to i8* 57 %fptrptr = getelementptr [1 x i8*], [1 x i8*]* %vtable, i32 0, i32 1
|
| /llvm-project-15.0.7/llvm/test/DebugInfo/Generic/ |
| H A D | containing-type-extension.ll | 4 ; Check that any type can have a vtable holder. 8 ; CHECK: DW_AT_name {{.*}}"vtable" 34 …positeType(tag: DW_TAG_structure_type, name: "vtable", size: 8, align: 8, elements: !2, identifier… 36 !14 = !DIGlobalVariable(name: "vtable", linkageName: "vtable", scope: null, file: !1, line: 1, type…
|
| /llvm-project-15.0.7/llvm/test/CodeGen/AVR/ |
| H A D | rust-trait-object.ll | 9 ; CHECK-ASM-LABEL: vtable.0: 15 ; CHECK-OBJ-LABEL: <vtable.0>: 21 @vtable.0 = private constant { 35 ; CHECK-ASM-LABEL: vtable.1: 41 ; CHECK-OBJ-LABEL: <vtable.1>: 47 @vtable.1 = private constant { 70 }* @vtable.0 to [3 x i16]*), 76 }* @vtable.1 to [3 x i16]*)
|
| /llvm-project-15.0.7/llvm/docs/ |
| H A D | TypeMetadata.rst | 9 valid vtable or function pointer for a given class or function type, and its 75 B is constructed, the address of ``&B::f`` is stored in the vtable pointer. In 76 this way, the vtable in B's virtual table object is compatible with A's vtable. 79 virtual table object contains two vtables, one compatible with A's vtable and 80 the other compatible with C's vtable. Objects of type D contain two virtual 82 the vtable compatible with A's vtable, and the other belonging to the C 83 subobject and containing the address of the vtable compatible with C's vtable. 87 address point within that class's vtable and the name of one of the classes 253 load from the vtable for ``B`` (using the object pointer), and then call 260 attached to vtable objects, with the following values: [all …]
|
| /llvm-project-15.0.7/llvm/test/Transforms/NewGVN/ |
| H A D | assume-equal-xfail.ll | 9 ; assuming that %vtable == @_ZTV1A (with alignment). 19 %vtable = load i8**, i8*** %1, align 8 20 …%cmp.vtables = icmp eq i8** %vtable, getelementptr inbounds ([4 x i8*], [4 x i8*]* @_ZTV1A, i64 0,… 25 %vtable1.cast = bitcast i8** %vtable to i32 (%struct.A*)** 34 %vfn47 = getelementptr inbounds i8*, i8** %vtable, i64 1 55 %vtable = load i8**, i8*** %1, align 8, !invariant.group !0 56 …%cmp.vtables = icmp eq i8** %vtable, getelementptr inbounds ([4 x i8*], [4 x i8*]* @_ZTV1A, i64 0,… 61 %vtable1.cast = bitcast i8** %vtable to i32 (%struct.A*)** 88 %vfn47 = getelementptr inbounds i8*, i8** %vtable, i64 1 111 %vtable = load i8**, i8*** %1, align 8 [all …]
|
| /llvm-project-15.0.7/llvm/test/Bitcode/ |
| H A D | thinlto-type-vcalls.ll | 30 define void @f1([3 x i8*]* %vtable) { 31 %vtablei8 = bitcast [3 x i8*]* %vtable to i8* 34 %fptrptr = getelementptr [3 x i8*], [3 x i8*]* %vtable, i32 0, i32 2 42 define void @f2([3 x i8*]* %vtable, [3 x i8*]* %vtable2) { 43 %vtablei8 = bitcast [3 x i8*]* %vtable to i8* 46 %fptrptr = getelementptr [3 x i8*], [3 x i8*]* %vtable, i32 0, i32 3 63 define void @f3(i8* %vtable) { 73 define void @f4([3 x i8*]* %vtable, [3 x i8*]* %vtable2) { 74 %vtablei8 = bitcast [3 x i8*]* %vtable to i8* 93 define void @f5(i8* %vtable) { [all …]
|
| /llvm-project-15.0.7/lld/docs/ |
| H A D | missingkeyfunction.rst | 6 foo.cc:28: error: undefined reference to 'vtable for C' 7 the vtable symbol may be undefined because the class is missing its key function 13 When a class has a key function, the compiler emits the vtable (and some other 15 if you're missing the key function, you'll also be missing the vtable. If no other 17 for it, but you will see undefined references to the vtable symbol. 20 function, and the compiler is forced to emit the vtable in every translation unit 42 not emit the vtable for ``B``, and you'll get an undefined reference to "vtable 70 and as a result, the vtable for ``A`` is not emitted, because the compiler is
|
| /llvm-project-15.0.7/libcxxabi/src/ |
| H A D | private_typeinfo.cpp | 64 static inline ptrdiff_t update_offset_to_base(const char* vtable, in update_offset_to_base() argument 68 return *reinterpret_cast<const int32_t*>(vtable + offset_to_base); in update_offset_to_base() 70 return *reinterpret_cast<const ptrdiff_t*>(vtable + offset_to_base); in update_offset_to_base() 310 offset_to_base = update_offset_to_base(vtable, offset_to_base); in has_unambiguous_public_base() 631 const int32_t* vtable = in __dynamic_cast() local 633 int32_t offset_to_derived = vtable[-2]; in __dynamic_cast() 637 int32_t offset_to_ti_proxy = vtable[-1]; in __dynamic_cast() 639 reinterpret_cast<const uint8_t*>(vtable) + offset_to_ti_proxy; in __dynamic_cast() 643 void **vtable = *static_cast<void ** const *>(static_ptr); in __dynamic_cast() 1296 offset_to_base = update_offset_to_base(vtable, offset_to_base); in search_above_dst() [all …]
|