[Flang] remove whole-archive option for AIX linker (#76039)
[llvm-project.git] / clang / test / CodeGenCXX / RelativeVTablesABI / available_externally-vtable.cpp
blob883d79ddabeda60f7314ff85cb7ea5b21a4c51d2
1 // Check that available_externally vtables do not receive aliases.
2 // We check this specifically under the legacy pass manager because the new pass
3 // manager seems to remove available_externally vtables from the IR entirely.
5 // RUN: %clang_cc1 %s -triple=aarch64-unknown-fuchsia -O1 -disable-llvm-passes -S -o - -emit-llvm | FileCheck %s
7 // The VTable for A is available_externally, meaning it can have a definition in
8 // IR, but is never emitted in this compilation unit. Because it won't be
9 // emitted here, we cannot make an alias, but we won't need to in the first
10 // place.
11 // CHECK: @_ZTV1A = available_externally unnamed_addr constant { [3 x i32] }
12 // CHECK-NOT: @_ZTV1A = {{.*}}alias
14 class A {
15 public:
16 virtual void foo();
18 void A_foo(A *a);
20 void func() {
21 A a;
22 A_foo(&a);