summaryrefslogtreecommitdiff
path: root/clang/test/Lexer/has_feature_cxx_abi_relative_vtable.cpp
blob: d0f0c27b09d3560247bc065c32c634d9021cf972 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// RUN: %clang_cc1 -E %s -triple x86_64-linux-gnu -x c++ -o - | FileCheck %s --check-prefix=NO-RELATIVE-VTABLE
// RUN: %clang_cc1 -E %s -triple x86_64-linux-gnu -x c++ -fexperimental-relative-c++-abi-vtables -o - | FileCheck %s --check-prefix=RELATIVE-VTABLE
// 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
// 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

#if __has_feature(cxx_abi_relative_vtable)
int has_relative_vtable();
#else
int has_no_relative_vtable();
#endif

// RELATIVE-VTABLE: has_relative_vtable
// NO-RELATIVE-VTABLE: has_no_relative_vtable