llvm-project/clang/test/CodeGenCXX/symbol-partition.cpp
Daniil Kovalev 6bb63002fc
[PAC] Fix address discrimination for type info vtable pointers (#102199)
In #99726, `-fptrauth-type-info-vtable-pointer-discrimination` was
introduced, which is intended to enable type and address discrimination
for type_info vtable pointers. However, some codegen logic for actually
enabling address discrimination was missing. This patch addresses the
issue.

Fixes #101716
2024-10-18 08:58:26 +03:00

22 lines
572 B
C++

// RUN: %clang_cc1 -triple x86_64-unknown-linux -fsymbol-partition=foo -emit-llvm -o - %s | FileCheck %s
// CHECK: @gv = {{.*}}, partition "foo"
// CHECK: @_ZTV1S = {{.*}}, partition "foo"
// CHECK: @_ZTI1S = {{.*}}, partition "foo"
// CHECK: @_ZTS1S = {{.*}}, partition "foo"
// CHECK: @_Z5ifuncv = {{.*}}, partition "foo"
// CHECK: define {{.*}} @_ZN1S1fEv({{.*}} partition "foo"
// CHECK: define {{.*}} @f({{.*}} partition "foo"
struct S {
virtual void f();
};
void S::f() {}
int gv;
extern "C" void *f() { return 0; }
void ifunc() __attribute__((ifunc("f")));