20 lines · cpp
1// Check that a vtable is made hidden instead of private if the original vtable2// is not dso_local. The vtable will need to be hidden and not private so it can3// be used as acomdat key signature.4 5// RUN: %clang_cc1 %s -triple=aarch64-unknown-fuchsia -o - -emit-llvm | FileCheck %s6 7// CHECK: @_ZTV1B.local = linkonce_odr hidden unnamed_addr constant8// CHECK: @_ZTV1B = linkonce_odr unnamed_addr alias { [3 x i32] }, ptr @_ZTV1B.local9 10// The VTable will be in a comdat here since it has no key function.11class B {12public:13 inline virtual void func() {}14};15 16// This is here just to manifest the vtable for B.17void func() {18 B b;19}20