Files
clang-p2996/clang/test/CodeGenCXX/RelativeVTablesABI/vtable-hidden-when-in-comdat.cpp
Leonard Chan e6f88dc01a [clang][Fuchsia] Turn on relative-vtables by default for Fuchsia
All fuchsia targets will now use the relative-vtables ABI by default.
Also remove -fexperimental-relative-c++-abi-vtables from test RUNs targeting fuchsia.

Differential Revision: https://reviews.llvm.org/D102374
2021-06-01 15:46:09 -07:00

20 lines
650 B
C++

// Check that a vtable is made hidden instead of private if the original vtable
// is not dso_local. The vtable will need to be hidden and not private so it can
// be used as acomdat key signature.
// RUN: %clang_cc1 %s -triple=aarch64-unknown-fuchsia -S -o - -emit-llvm | FileCheck %s
// CHECK: @_ZTV1B.local = linkonce_odr hidden unnamed_addr constant
// CHECK: @_ZTV1B = linkonce_odr unnamed_addr alias { [3 x i32] }, { [3 x i32] }* @_ZTV1B.local
// The VTable will be in a comdat here since it has no key function.
class B {
public:
inline virtual void func() {}
};
// This is here just to manifest the vtable for B.
void func() {
B b;
}