llvm-project/clang/test/Driver/relative-vtables-flag.cpp
Leonard Chan 70af0bf6fe [clang][Driver] Expose -fexperimental-relative-c++-abi-vtables flag
Initially, this flag was meant to only be used through cc1 and not directly
through the clang driver. However, we accidentally ended up using this flag
as a driver flag already for selecting multilibs within the fuchsia toolchain.
We're currently in an awkward state where it's only accepted as a driver flag
when targeting Fuchsia, and all other instances it can only be added via
-Xclang. Since we're ready to use this in Fuchsia, we can just expose this to
the driver for simplicity.

Differential Revision: https://reviews.llvm.org/D98375
2021-03-10 16:28:40 -08:00

8 lines
596 B
C++

// RUN: %clangxx --target=aarch64-unknown-fuchsia -fexperimental-relative-c++-abi-vtables -c %s -### 2>&1 | FileCheck %s --check-prefix=RV
// RUN: %clangxx --target=aarch64-unknown-fuchsia -fno-experimental-relative-c++-abi-vtables -c %s -### 2>&1 | FileCheck %s --check-prefix=NO-RV
// RUN: %clangxx --target=aarch64-unknown-fuchsia -c %s -### 2>&1 | FileCheck %s --check-prefix=NO-RV
// RUN: %clangxx --target=aarch64-unknown-linux-gnu -c %s -### 2>&1 | FileCheck %s --check-prefix=NO-RV
// RV: "-fexperimental-relative-c++-abi-vtables"
// NO-RV-NOT: "-fexperimental-relative-c++-abi-vtables"