Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / CodeGenCXX / RelativeVTablesABI / vtable-hidden-when-in-comdat.cpp
blob1852b0c151d55c94bec876ed7a494c923c48cb34
1 // Check that a vtable is made hidden instead of private if the original vtable
2 // is not dso_local. The vtable will need to be hidden and not private so it can
3 // be used as acomdat key signature.
5 // RUN: %clang_cc1 %s -triple=aarch64-unknown-fuchsia -S -o - -emit-llvm | FileCheck %s
7 // CHECK: @_ZTV1B.local = linkonce_odr hidden unnamed_addr constant
8 // CHECK: @_ZTV1B = linkonce_odr unnamed_addr alias { [3 x i32] }, ptr @_ZTV1B.local
10 // The VTable will be in a comdat here since it has no key function.
11 class B {
12 public:
13 inline virtual void func() {}
16 // This is here just to manifest the vtable for B.
17 void func() {
18 B b;