xref: /llvm-project/clang/test/Lexer/has_feature_cxx_abi_relative_vtable.cpp (revision 64c0792946b792839b2f39e4e208fdd7398aaea0)
1*64c07929SLeonard Chan // RUN: %clang_cc1 -E %s -triple x86_64-linux-gnu -x c++ -o - | FileCheck %s --check-prefix=NO-RELATIVE-VTABLE
2*64c07929SLeonard Chan // RUN: %clang_cc1 -E %s -triple x86_64-linux-gnu -x c++ -fexperimental-relative-c++-abi-vtables -o - | FileCheck %s --check-prefix=RELATIVE-VTABLE
3*64c07929SLeonard Chan // RUN: %clang_cc1 -E %s -triple x86_64-linux-gnu -x c++ -fno-experimental-relative-c++-abi-vtables -o - | FileCheck %s --check-prefix=NO-RELATIVE-VTABLE
4*64c07929SLeonard Chan // RUN: %clang_cc1 -E %s -triple x86_64-linux-gnu -x c -fexperimental-relative-c++-abi-vtables -o - | FileCheck %s --check-prefix=NO-RELATIVE-VTABLE
5*64c07929SLeonard Chan 
6*64c07929SLeonard Chan #if __has_feature(cxx_abi_relative_vtable)
7*64c07929SLeonard Chan int has_relative_vtable();
8*64c07929SLeonard Chan #else
9*64c07929SLeonard Chan int has_no_relative_vtable();
10*64c07929SLeonard Chan #endif
11*64c07929SLeonard Chan 
12*64c07929SLeonard Chan // RELATIVE-VTABLE: has_relative_vtable
13*64c07929SLeonard Chan // NO-RELATIVE-VTABLE: has_no_relative_vtable
14