171568a9eSLeonard Chan // Check that a vtable is made hidden instead of private if the original vtable
271568a9eSLeonard Chan // is not dso_local. The vtable will need to be hidden and not private so it can
371568a9eSLeonard Chan // be used as acomdat key signature.
471568a9eSLeonard Chan 
5*532dc62bSNikita Popov // RUN: %clang_cc1 -no-opaque-pointers %s -triple=aarch64-unknown-fuchsia -S -o - -emit-llvm | FileCheck %s
671568a9eSLeonard Chan 
771568a9eSLeonard Chan // CHECK: @_ZTV1B.local = linkonce_odr hidden unnamed_addr constant
871568a9eSLeonard Chan // CHECK: @_ZTV1B = linkonce_odr unnamed_addr alias { [3 x i32] }, { [3 x i32] }* @_ZTV1B.local
971568a9eSLeonard Chan 
1071568a9eSLeonard Chan // The VTable will be in a comdat here since it has no key function.
1171568a9eSLeonard Chan class B {
1271568a9eSLeonard Chan public:
func()1371568a9eSLeonard Chan   inline virtual void func() {}
1471568a9eSLeonard Chan };
1571568a9eSLeonard Chan 
1671568a9eSLeonard Chan // This is here just to manifest the vtable for B.
func()1771568a9eSLeonard Chan void func() {
1871568a9eSLeonard Chan   B b;
1971568a9eSLeonard Chan }
20