summaryrefslogtreecommitdiff
path: root/test/InterfaceStubs
diff options
context:
space:
mode:
authorFangrui Song <maskray@google.com>2019-06-18 05:52:39 +0000
committerFangrui Song <maskray@google.com>2019-06-18 05:52:39 +0000
commit3a552dd809e0327c89b977c76d4f5372d955501b (patch)
tree0bc62b440ccf53059cb8a783900e401884d6e08f /test/InterfaceStubs
parent722377e37f66f2720842923ce7f4287d5d87bee3 (diff)
downloadclang-3a552dd809e0327c89b977c76d4f5372d955501b.tar.gz
Revert D60974 "[clang-ifs] Clang Interface Stubs, first version."
This reverts commit rC363626. clangIndex depends on clangFrontend. r363626 adds a dependency from clangFrontend to clangIndex, which creates a circular dependency. This is disallowed by -DBUILD_SHARED_LIBS=on builds: CMake Error: The inter-target dependency graph contains the following strongly connected component (cycle): "clangFrontend" of type SHARED_LIBRARY depends on "clangIndex" (weak) "clangIndex" of type SHARED_LIBRARY depends on "clangFrontend" (weak) At least one of these targets is not a STATIC_LIBRARY. Cyclic dependencies are allowed only among static libraries. Note, the dependency on clangIndex cannot be removed because libclangFrontend.so is linked with -Wl,-z,defs: a shared object must have its full direct dependencies specified on the linker command line. In -DBUILD_SHARED_LIBS=off builds, this appears to work when linking `bin/clang-9`. However, it can cause trouble to downstream clang library users. The llvm build system links libraries this way: clang main_program_object_file ... lib/libclangIndex.a ... lib/libclangFrontend.a -o exe libclangIndex.a etc are not wrapped in --start-group. If the downstream application depends on libclangFrontend.a but not any other clang libraries that depend on libclangIndex.a, this can cause undefined reference errors when the linker is ld.bfd or gold. The proper fix is to not include clangIndex files in clangFrontend. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@363649 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/InterfaceStubs')
-rw-r--r--test/InterfaceStubs/bad-format.cpp7
-rw-r--r--test/InterfaceStubs/class-template-specialization.cpp42
-rw-r--r--test/InterfaceStubs/externstatic.c29
-rw-r--r--test/InterfaceStubs/function-template-specialization.cpp41
-rw-r--r--test/InterfaceStubs/hidden-class-inheritance.cpp153
-rw-r--r--test/InterfaceStubs/inline.c67
-rw-r--r--test/InterfaceStubs/inline.h4
-rw-r--r--test/InterfaceStubs/object.cpp13
-rw-r--r--test/InterfaceStubs/template-namespace-function.cpp31
-rw-r--r--test/InterfaceStubs/virtual.cpp41
-rw-r--r--test/InterfaceStubs/visibility.cpp45
-rw-r--r--test/InterfaceStubs/weak.cpp27
12 files changed, 0 insertions, 500 deletions
diff --git a/test/InterfaceStubs/bad-format.cpp b/test/InterfaceStubs/bad-format.cpp
deleted file mode 100644
index d40b1f965b..0000000000
--- a/test/InterfaceStubs/bad-format.cpp
+++ /dev/null
@@ -1,7 +0,0 @@
-// RUN: not %clang -target x86_64-linux-gnu -o - -emit-interface-stubs \
-// RUN: -interface-stub-version=bar-format %s 2>&1 | FileCheck %s
-
-// CHECK: error: invalid value
-// CHECK: '-interface-stub-version=<experimental-tapi-elf-v1 |
-// CHECK: experimental-yaml-elf-v1>' in 'Must specify a valid interface
-// CHECK: stub format type using
diff --git a/test/InterfaceStubs/class-template-specialization.cpp b/test/InterfaceStubs/class-template-specialization.cpp
deleted file mode 100644
index d1f1d067cc..0000000000
--- a/test/InterfaceStubs/class-template-specialization.cpp
+++ /dev/null
@@ -1,42 +0,0 @@
-// RUN: %clang -target x86_64-unknown-linux-gnu -o - -emit-interface-stubs \
-// RUN: -interface-stub-version=experimental-tapi-elf-v1 %s | \
-// RUN: FileCheck -check-prefix=CHECK-TAPI %s
-
-// RUN: %clang -target x86_64-unknown-linux-gnu -o - -emit-interface-stubs \
-// RUN: -interface-stub-version=experimental-tapi-elf-v1 %s | \
-// RUN: FileCheck -check-prefix=CHECK-TAPI2 %s
-// RUN: %clang -target x86_64-unknown-linux-gnu -o - -c %s | \
-// RUN: llvm-readelf -s - 2>&1 | \
-// RUN: FileCheck -check-prefix=CHECK-SYMBOLS %s
-
-// For the following:
-// g()
-// n::S<int>::S()
-// n::S<int>::~S()
-// n::S<int>::func() const
-// n::S<int>::S(n::S<int> const&)
-
-// We expect these manglings:
-// CHECK-TAPI: Symbols:
-// CHECK-TAPI-NOT: _ZNK1n1SIiEclEv
-// CHECK-TAPI2: Symbols:
-// CHECK-TAPI2: _Z1g
-
-// CHECK-SYMBOLS-DAG: FUNC GLOBAL DEFAULT {{[0-9]}} _Z1g
-// CHECK-SYMBOLS-DAG: FUNC WEAK HIDDEN {{[0-9]}} _ZNK1n1SIiEclEv
-
-namespace n {
-template <typename T>
-struct __attribute__((__visibility__("default"))) S {
- S() = default;
- ~S() = default;
- int __attribute__((__visibility__(("default")))) func() const {
- return 1844;
- }
- int __attribute__((__visibility__(("hidden")))) operator()() const {
- return 1863;
- }
-};
-} // namespace n
-
-void g() { n::S<int>()(); }
diff --git a/test/InterfaceStubs/externstatic.c b/test/InterfaceStubs/externstatic.c
deleted file mode 100644
index 9224581ee0..0000000000
--- a/test/InterfaceStubs/externstatic.c
+++ /dev/null
@@ -1,29 +0,0 @@
-// RUN: %clang -DSTORAGE="extern" -target x86_64-unknown-linux-gnu -o - \
-// RUN: -emit-interface-stubs \
-// RUN: -interface-stub-version=experimental-yaml-elf-v1 -std=c99 -xc %s | \
-// RUN: FileCheck -check-prefix=CHECK-EXTERN %s
-// RUN: %clang -DSTORAGE="extern" -target x86_64-linux-gnu -O0 -o - -c -std=c99 \
-// RUN: -xc %s | llvm-nm - 2>&1 | FileCheck -check-prefix=CHECK-EXTERN %s
-
-// RUN: %clang -DSTORAGE="extern" -target x86_64-unknown-linux-gnu -o - \
-// RUN: -emit-interface-stubs \
-// RUN: -interface-stub-version=experimental-yaml-elf-v1 -std=c99 -xc %s | \
-// RUN: FileCheck -check-prefix=CHECK-EXTERN2 %s
-// RUN: %clang -DSTORAGE="extern" -target x86_64-linux-gnu -O0 -o - -c -std=c99 \
-// RUN: -xc %s | llvm-nm - 2>&1 | FileCheck -check-prefix=CHECK-EXTERN2 %s
-
-// RUN: %clang -DSTORAGE="static" -target x86_64-unknown-linux-gnu -o - \
-// RUN: -emit-interface-stubs \
-// RUN: -interface-stub-version=experimental-yaml-elf-v1 -std=c99 -xc %s | \
-// RUN: FileCheck -check-prefix=CHECK-STATIC %s
-// RUN: %clang -DSTORAGE="static" -target x86_64-linux-gnu -O0 -o - -c -std=c99 \
-// RUN: -xc %s | llvm-nm - 2>&1 | FileCheck -check-prefix=CHECK-STATIC %s
-
-// CHECK-EXTERN-NOT: foo
-// CHECK-STATIC-NOT: foo
-// CHECK-STATIC-NOT: bar
-
-// We want to emit extern function symbols.
-// CHECK-EXTERN2: bar
-STORAGE int foo;
-STORAGE int bar() { return 42; }
diff --git a/test/InterfaceStubs/function-template-specialization.cpp b/test/InterfaceStubs/function-template-specialization.cpp
deleted file mode 100644
index b6cf64c602..0000000000
--- a/test/InterfaceStubs/function-template-specialization.cpp
+++ /dev/null
@@ -1,41 +0,0 @@
-// RUN: %clang -target x86_64-unknown-linux-gnu -o - -emit-interface-stubs \
-// RUN: -interface-stub-version=experimental-tapi-elf-v1 %s | FileCheck %s
-
-// RUN: %clang -target x86_64-unknown-linux-gnu -o - -emit-interface-stubs \
-// RUN: -interface-stub-version=experimental-tapi-elf-v1 \
-// RUN: -DUSE_TEMPLATE_FUNCTION=1 %s | \
-// RUN: FileCheck -check-prefix=CHECK-USES-TEMPLATE-FUNCTION %s
-
-// RUN: %clang -target x86_64-unknown-linux-gnu -o - -emit-interface-stubs \
-// RUN: -interface-stub-version=experimental-tapi-elf-v1 \
-// RUN: -DSPECIALIZE_TEMPLATE_FUNCTION=1 %s | \
-// RUN: FileCheck -check-prefix=CHECK-SPECIALIZES-TEMPLATE-FUNCTION %s
-
-// RUN: %clang -target x86_64-unknown-linux-gnu -o - -c \
-// RUN: %s | llvm-nm - 2>&1 | FileCheck %s
-
-// RUN: %clang -target x86_64-unknown-linux-gnu -o - -c \
-// RUN: -DUSE_TEMPLATE_FUNCTION=1 %s | llvm-nm - 2>&1 | \
-// RUN: FileCheck -check-prefix=CHECK-USES-TEMPLATE-FUNCTION %s
-
-// RUN: %clang -target x86_64-unknown-linux-gnu -o - -c \
-// RUN: -DSPECIALIZE_TEMPLATE_FUNCTION=1 %s | llvm-nm - 2>&1 | \
-// RUN: FileCheck -check-prefix=CHECK-SPECIALIZES-TEMPLATE-FUNCTION %s
-
-// CHECK-NOT: _Z16templateFunctionIiET_S0_
-// CHECK-USES-TEMPLATE-FUNCTION-DAG: _Z16templateFunctionIiET_S0_
-// CHECK-SPECIALIZES-TEMPLATE-FUNCTION-DAG: _Z16templateFunctionIiET_S0_
-template <typename T>
-T templateFunction(T t) { return t; }
-
-#ifdef USE_TEMPLATE_FUNCTION
-int FortyTwo = templateFunction<int>(42);
-#endif
-
-#ifdef SPECIALIZE_TEMPLATE_FUNCTION
-template <>
-int templateFunction<int>(int t);
-// TODO: Make it so that -emit-interface-stubs does not emit
-// _Z16templateFunctionIiET_S0_ if there is no user of the specialization.
-int foo() { return templateFunction(42); }
-#endif
diff --git a/test/InterfaceStubs/hidden-class-inheritance.cpp b/test/InterfaceStubs/hidden-class-inheritance.cpp
deleted file mode 100644
index de4c2993c7..0000000000
--- a/test/InterfaceStubs/hidden-class-inheritance.cpp
+++ /dev/null
@@ -1,153 +0,0 @@
-// RUN: %clang -target x86_64-unknown-linux-gnu -o - -emit-interface-stubs \
-// RUN: -interface-stub-version=experimental-tapi-elf-v1 \
-// RUN: -DPARENT_CLASS_VISIBILITY="" -DCHILD_CLASS_VISIBILITY="" \
-// RUN: -DPARENT_METHOD_VISIBILITY="" -DCHILD_METHOD_VISIBILITY="" %s | \
-// RUN: FileCheck -check-prefix=CHECK-X %s
-// RUN: %clang -target x86_64-unknown-linux-gnu -o - -c \
-// RUN: -DPARENT_CLASS_VISIBILITY="" -DCHILD_CLASS_VISIBILITY="" \
-// RUN: -DPARENT_METHOD_VISIBILITY="" -DCHILD_METHOD_VISIBILITY="" %s | \
-// RUN: llvm-readelf -s - 2>&1 | \
-// RUN: FileCheck -check-prefix=CHECK-X-RE %s
-
-// RUN: %clang -target x86_64-unknown-linux-gnu -o - -emit-interface-stubs \
-// RUN: -interface-stub-version=experimental-tapi-elf-v1 \
-// RUN: -DPARENT_CLASS_VISIBILITY=HIDDEN -DCHILD_CLASS_VISIBILITY="" \
-// RUN: -DPARENT_METHOD_VISIBILITY="" -DCHILD_METHOD_VISIBILITY="" %s | \
-// RUN: FileCheck -check-prefix=CHECK-HP %s
-// RUN: %clang -target x86_64-unknown-linux-gnu -o - -emit-interface-stubs \
-// RUN: -interface-stub-version=experimental-tapi-elf-v1 \
-// RUN: -DPARENT_CLASS_VISIBILITY=HIDDEN -DCHILD_CLASS_VISIBILITY="" \
-// RUN: -DPARENT_METHOD_VISIBILITY="" -DCHILD_METHOD_VISIBILITY="" %s | \
-// RUN: FileCheck -check-prefix=CHECK-HP2 %s
-// RUN: %clang -target x86_64-unknown-linux-gnu -o - -c \
-// RUN: -DPARENT_CLASS_VISIBILITY=HIDDEN -DCHILD_CLASS_VISIBILITY="" \
-// RUN: -DPARENT_METHOD_VISIBILITY="" -DCHILD_METHOD_VISIBILITY="" %s | \
-// RUN: llvm-readelf -s - 2>&1 | \
-// RUN: FileCheck -check-prefix=CHECK-HP-RE %s
-
-// RUN: %clang -target x86_64-unknown-linux-gnu -o - -emit-interface-stubs \
-// RUN: -interface-stub-version=experimental-tapi-elf-v1 \
-// RUN: -DPARENT_CLASS_VISIBILITY="" -DCHILD_CLASS_VISIBILITY=HIDDEN \
-// RUN: -DPARENT_METHOD_VISIBILITY="" -DCHILD_METHOD_VISIBILITY="" %s | \
-// RUN: FileCheck -check-prefix=CHECK-HC %s
-// RUN: %clang -target x86_64-unknown-linux-gnu -o - -emit-interface-stubs \
-// RUN: -interface-stub-version=experimental-tapi-elf-v1 \
-// RUN: -DPARENT_CLASS_VISIBILITY="" -DCHILD_CLASS_VISIBILITY=HIDDEN \
-// RUN: -DPARENT_METHOD_VISIBILITY="" -DCHILD_METHOD_VISIBILITY="" %s | \
-// RUN: FileCheck -check-prefix=CHECK-HC2 %s
-// RUN: %clang -target x86_64-unknown-linux-gnu -o - -c \
-// RUN: -DPARENT_CLASS_VISIBILITY="" -DCHILD_CLASS_VISIBILITY=HIDDEN \
-// RUN: -DPARENT_METHOD_VISIBILITY="" -DCHILD_METHOD_VISIBILITY="" %s | \
-// RUN: llvm-readelf -s - 2>&1 | \
-// RUN: FileCheck -check-prefix=CHECK-HC-RE %s
-
-// RUN: %clang -target x86_64-unknown-linux-gnu -o - -emit-interface-stubs \
-// RUN: -interface-stub-version=experimental-tapi-elf-v1 \
-// RUN: -DPARENT_CLASS_VISIBILITY=HIDDEN -DCHILD_CLASS_VISIBILITY=HIDDEN \
-// RUN: -DPARENT_METHOD_VISIBILITY="" -DCHILD_METHOD_VISIBILITY="" %s | \
-// RUN: FileCheck -check-prefix=CHECK-HP-HC %s
-// RUN: %clang -target x86_64-unknown-linux-gnu -o - -c \
-// RUN: -DPARENT_CLASS_VISIBILITY=HIDDEN -DCHILD_CLASS_VISIBILITY=HIDDEN \
-// RUN: -DPARENT_METHOD_VISIBILITY="" -DCHILD_METHOD_VISIBILITY="" %s | \
-// RUN: llvm-readelf -s - 2>&1 | \
-// RUN: FileCheck -check-prefix=CHECK-HP-HC-RE %s
-
-// CHECK-X-DAG: _ZN1CC2Ev
-// CHECK-X-DAG: _ZN1CD0Ev
-// CHECK-X-DAG: _ZN1CD2Ev
-// CHECK-X-DAG: _ZN1SC2Ev
-// CHECK-X-DAG: _ZN1SD0Ev
-// CHECK-X-DAG: _ZN1SD2Ev
-// CHECK-X-DAG: _ZN1C1mEv
-// CHECK-X-DAG: _ZN1S1nEv
-
-// CHECK-X-RE: FUNC WEAK DEFAULT {{[0-9]+}} _ZN1C1mEv
-// CHECK-X-RE: FUNC WEAK DEFAULT {{[0-9]+}} _ZN1CC2Ev
-// CHECK-X-RE: FUNC WEAK DEFAULT {{[0-9]+}} _ZN1CD0Ev
-// CHECK-X-RE: FUNC WEAK DEFAULT {{[0-9]+}} _ZN1CD2Ev
-// CHECK-X-RE: FUNC WEAK DEFAULT {{[0-9]+}} _ZN1S1nEv
-// CHECK-X-RE: FUNC WEAK DEFAULT {{[0-9]+}} _ZN1SC2Ev
-// CHECK-X-RE: FUNC WEAK DEFAULT {{[0-9]+}} _ZN1SD0Ev
-// CHECK-X-RE: FUNC WEAK DEFAULT {{[0-9]+}} _ZN1SD2Ev
-
-// CHECK-HP2-DAG: _ZN1CC2Ev
-// CHECK-HP2-DAG: _ZN1CD0Ev
-// CHECK-HP2-DAG: _ZN1CD2Ev
-// CHECK-HP2-DAG: _ZN1C1mEv
-
-// CHECK-HP-NOT: _ZN1S1nEv
-// CHECK-HP-NOT: _ZN1SC2Ev
-// CHECK-HP-NOT: _ZN1SD0Ev
-// CHECK-HP-NOT: _ZN1SD2Ev
-
-// CHECK-HP-RE: FUNC WEAK DEFAULT {{[0-9]+}} _ZN1C1mEv
-// CHECK-HP-RE: FUNC WEAK DEFAULT {{[0-9]+}} _ZN1CC2Ev
-// CHECK-HP-RE: FUNC WEAK DEFAULT {{[0-9]+}} _ZN1CD0Ev
-// CHECK-HP-RE: FUNC WEAK DEFAULT {{[0-9]+}} _ZN1CD2Ev
-// CHECK-HP-RE: FUNC WEAK HIDDEN {{[0-9]+}} _ZN1S1nEv
-// CHECK-HP-RE: FUNC WEAK HIDDEN {{[0-9]+}} _ZN1SC2Ev
-// CHECK-HP-RE: FUNC WEAK HIDDEN {{[0-9]+}} _ZN1SD0Ev
-// CHECK-HP-RE: FUNC WEAK HIDDEN {{[0-9]+}} _ZN1SD2Ev
-
-// CHECK-HC2-DAG: _ZN1SC2Ev
-// CHECK-HC2-DAG: _ZN1SD0Ev
-// CHECK-HC2-DAG: _ZN1SD2Ev
-// CHECK-HC2-DAG: _ZN1S1nEv
-
-// CHECK-HC-NOT: _ZN1C1mEv
-// CHECK-HC-NOT: _ZN1CC2Ev
-// CHECK-HC-NOT: _ZN1CD0Ev
-// CHECK-HC-NOT: _ZN1CD2Ev
-
-// CHECK-HC-RE: FUNC WEAK HIDDEN {{[0-9]+}} _ZN1C1mEv
-// CHECK-HC-RE: FUNC WEAK HIDDEN {{[0-9]+}} _ZN1CC2Ev
-// CHECK-HC-RE: FUNC WEAK HIDDEN {{[0-9]+}} _ZN1CD0Ev
-// CHECK-HC-RE: FUNC WEAK HIDDEN {{[0-9]+}} _ZN1CD2Ev
-// CHECK-HC-RE: FUNC WEAK DEFAULT {{[0-9]+}} _ZN1S1nEv
-// CHECK-HC-RE: FUNC WEAK DEFAULT {{[0-9]+}} _ZN1SC2Ev
-// CHECK-HC-RE: FUNC WEAK DEFAULT {{[0-9]+}} _ZN1SD0Ev
-// CHECK-HC-RE: FUNC WEAK DEFAULT {{[0-9]+}} _ZN1SD2Ev
-
-// CHECK-HP-HC-NOT: _ZN1CC2Ev
-// CHECK-HP-HC-NOT: _ZN1CD0Ev
-// CHECK-HP-HC-NOT: _ZN1CD2Ev
-// CHECK-HP-HC-NOT: _ZN1SC2Ev
-// CHECK-HP-HC-NOT: _ZN1SD0Ev
-// CHECK-HP-HC-NOT: _ZN1SD2Ev
-// CHECK-HP-HC-NOT: _ZN1C1mEv
-// CHECK-HP-HC-NOT: _ZN1S1nEv
-
-// CHECK-HP-HC-RE: FUNC WEAK HIDDEN {{[0-9]+}} _ZN1C1mEv
-// CHECK-HP-HC-RE: FUNC WEAK HIDDEN {{[0-9]+}} _ZN1CC2Ev
-// CHECK-HP-HC-RE: FUNC WEAK HIDDEN {{[0-9]+}} _ZN1CD0Ev
-// CHECK-HP-HC-RE: FUNC WEAK HIDDEN {{[0-9]+}} _ZN1CD2Ev
-// CHECK-HP-HC-RE: FUNC WEAK HIDDEN {{[0-9]+}} _ZN1S1nEv
-// CHECK-HP-HC-RE: FUNC WEAK HIDDEN {{[0-9]+}} _ZN1SC2Ev
-// CHECK-HP-HC-RE: FUNC WEAK HIDDEN {{[0-9]+}} _ZN1SD0Ev
-// CHECK-HP-HC-RE: FUNC WEAK HIDDEN {{[0-9]+}} _ZN1SD2Ev
-
-// TODO: clang+llvm does not materialize complete ctors and dtors for the
-// Itanium abi. Figure out why and add the check-not for these:
-// _ZN1CC1Ev
-// _ZN1CD1Ev
-// _ZN1SC1Ev
-// _ZN1SD1Ev
-
-#define HIDDEN __attribute__((__visibility__("hidden")))
-#define DEFAULT __attribute__((__visibility__("default")))
-
-struct PARENT_CLASS_VISIBILITY S {
- virtual ~S() {}
- virtual PARENT_METHOD_VISIBILITY void n() {}
-};
-
-class CHILD_CLASS_VISIBILITY C : public S {
-public:
- virtual CHILD_METHOD_VISIBILITY void m() {}
-};
-
-void f() {
- C c;
- c.m();
- c.n();
-}
diff --git a/test/InterfaceStubs/inline.c b/test/InterfaceStubs/inline.c
deleted file mode 100644
index c64771185f..0000000000
--- a/test/InterfaceStubs/inline.c
+++ /dev/null
@@ -1,67 +0,0 @@
-// RUN: %clang -DINLINE=inline -target x86_64-unknown-linux-gnu -o - \
-// RUN: -emit-interface-stubs \
-// RUN: -interface-stub-version=experimental-yaml-elf-v1 -std=gnu89 -xc %s | \
-// RUN: FileCheck -check-prefix=CHECK-GNU %s
-// RUN: %clang -DINLINE=inline -target x86_64-linux-gnu -O0 -o - -c \
-// RUN: -std=gnu89 -xc %s | llvm-nm - | FileCheck -check-prefix=CHECK-GNU %s
-
-// RUN: %clang -DINLINE="__attribute__((always_inline))" \
-// RUN: -target x86_64-unknown-linux-gnu -o - -emit-interface-stubs \
-// RUN: -interface-stub-version=experimental-yaml-elf-v1 -xc %s | \
-// RUN: FileCheck -check-prefix=CHECK-GNU %s
-// RUN: %clang -DINLINE="__attribute__((always_inline))" \
-// RUN: -target x86_64-linux-gnu -O0 -o - -c -xc %s | \
-// RUN: llvm-nm - | FileCheck -check-prefix=CHECK-GNU %s
-
-// RUN: %clang -DINLINE=inline -target x86_64-unknown-linux-gnu -o - \
-// RUN: -emit-interface-stubs \
-// RUN: -interface-stub-version=experimental-yaml-elf-v1 -std=c99 -xc %s | \
-// RUN: FileCheck -check-prefix=CHECK-STD %s
-// RUN: %clang -DINLINE=inline -target x86_64-linux-gnu -O0 -o - -c -std=c99 \
-// RUN: -xc %s | llvm-nm - 2>&1 | FileCheck -check-prefix=CHECK-STD %s
-
-// RUN: %clang -DINLINE="__attribute__((noinline))" \
-// RUN: -target x86_64-unknown-linux-gnu -o - -emit-interface-stubs \
-// RUN: -interface-stub-version=experimental-yaml-elf-v1 -std=c99 -xc %s | \
-// RUN: FileCheck -check-prefix=CHECK-NOINLINE %s
-// RUN: %clang -DINLINE="__attribute__((noinline))" -target x86_64-linux-gnu \
-// RUN: -O0 -o - -c -std=c99 -xc %s | llvm-nm - 2>&1 | \
-// RUN: FileCheck -check-prefix=CHECK-NOINLINE %s
-
-// RUN: %clang -DINLINE="static" -target x86_64-unknown-linux-gnu -o - \
-// RUN: -emit-interface-stubs \
-// RUN: -interface-stub-version=experimental-yaml-elf-v1 -std=c99 -xc %s | \
-// RUN: FileCheck -check-prefix=CHECK-STATIC %s
-// RUN: %clang -DINLINE="static" -target x86_64-linux-gnu -O0 -o - -c \
-// RUN: -std=c99 -xc %s | llvm-nm - 2>&1 | \
-// RUN: FileCheck -check-prefix=CHECK-STATIC %s
-
-// CHECK-GNU-DAG: foo
-// CHECK-GNU-DAG: foo.var
-// CHECK-NOINLINE-DAG: foo
-// CHECK-NOINLINE-DAG: foo.var
-// CHECK-STATIC-NOT: foo
-// CHECK-STATIC-NOT: foo.var
-// CHECK-STD-NOT: foo
-#pragma clang diagnostic ignored "-Wstatic-local-in-inline"
-INLINE int foo() {
- static int var = 42;
- return var;
-}
-
-// RUN: %clang -DINLINE=inline -target x86_64-linux-gnu -o - \
-// RUN: -emit-interface-stubs -interface-stub-version=experimental-tapi-elf-v1 \
-// RUN: -std=gnu89 -xc %s | FileCheck -check-prefix=CHECK-TAPI %s
-
-// RUN: %clang -DINLINE=inline -target x86_64-linux-gnu -o - \
-// RUN: -emit-interface-stubs -interface-stub-version=experimental-tapi-elf-v1 \
-// RUN: -std=gnu89 -xc %s | FileCheck -check-prefix=CHECK-SYMBOLS %s
-// RUN: %clang -DINLINE=inline -target x86_64-linux-gnu -o - \
-// RUN: -c -std=gnu89 -xc %s | llvm-nm - 2>&1 | \
-// RUN: FileCheck -check-prefix=CHECK-SYMBOLS %s
-
-// CHECK-TAPI-DAG: foo: { Type: Func }
-// CHECK-TAPI-DAG: foo.var: { Type: Object, Size: 4 }
-// CHECK-SYMBOLS-DAG: foo
-// CHECK-SYMBOLS-DAG: foo.var
-#include "inline.h"
diff --git a/test/InterfaceStubs/inline.h b/test/InterfaceStubs/inline.h
deleted file mode 100644
index fe16519e94..0000000000
--- a/test/InterfaceStubs/inline.h
+++ /dev/null
@@ -1,4 +0,0 @@
-INLINE int bar() {
- static int var = 42;
- return var;
-}
diff --git a/test/InterfaceStubs/object.cpp b/test/InterfaceStubs/object.cpp
deleted file mode 100644
index 68b5ee781c..0000000000
--- a/test/InterfaceStubs/object.cpp
+++ /dev/null
@@ -1,13 +0,0 @@
-// RUN: %clang -target x86_64-unknown-linux-gnu -o - -emit-interface-stubs \
-// RUN: -interface-stub-version=experimental-tapi-elf-v1 %s | \
-// RUN: FileCheck -check-prefix=CHECK-TAPI %s
-
-// RUN: %clang -target x86_64-unknown-linux-gnu -o - -emit-interface-stubs \
-// RUN: -interface-stub-version=experimental-tapi-elf-v1 %s | \
-// RUN: FileCheck -check-prefix=CHECK-SYMBOLS %s
-// RUN: %clang -target x86_64-unknown-linux-gnu -o - -c %s | llvm-nm - 2>&1 | \
-// RUN: FileCheck -check-prefix=CHECK-SYMBOLS %s
-
-// CHECK-TAPI: data: { Type: Object, Size: 4 }
-// CHECK-SYMBOLS: data
-int data = 42;
diff --git a/test/InterfaceStubs/template-namespace-function.cpp b/test/InterfaceStubs/template-namespace-function.cpp
deleted file mode 100644
index 879318122b..0000000000
--- a/test/InterfaceStubs/template-namespace-function.cpp
+++ /dev/null
@@ -1,31 +0,0 @@
-// RUN: %clang -target x86_64-unknown-linux-gnu -o - -emit-interface-stubs \
-// RUN: -interface-stub-version=experimental-tapi-elf-v1 %s | \
-// RUN: FileCheck %s
-
-// RUN: %clang -target x86_64-unknown-linux-gnu -o - -c %s | llvm-nm - 2>&1 | \
-// RUN: FileCheck -check-prefix=CHECK-SYMBOLS %s
-
-// CHECK: Symbols:
-// CHECK-DAG: _ZN3qux3barEii: { Type: Func }
-// CHECK-DAG: _ZN3baz3addIiEET_S1_S1_: { Type: Func }
-// CHECK-DAG: _Z4fbarff: { Type: Func }
-// CHECK-DAG: _ZN3baz3addIfEET_S1_S1_: { Type: Func }
-
-// Same symbols just different order.
-// CHECK-SYMBOLS-DAG: _Z4fbarff
-// CHECK-SYMBOLS-DAG: _ZN3baz3addIfEET_S1_S1_
-// CHECK-SYMBOLS-DAG: _ZN3baz3addIiEET_S1_S1_
-// CHECK-SYMBOLS-DAG: _ZN3qux3barEii
-
-namespace baz {
-template <typename T>
-T add(T a, T b) {
- return a + b;
-}
-} // namespace baz
-
-namespace qux {
-int bar(int a, int b) { return baz::add<int>(a, b); }
-} // namespace qux
-
-float fbar(float a, float b) { return baz::add<float>(a, b); }
diff --git a/test/InterfaceStubs/virtual.cpp b/test/InterfaceStubs/virtual.cpp
deleted file mode 100644
index b861b7e802..0000000000
--- a/test/InterfaceStubs/virtual.cpp
+++ /dev/null
@@ -1,41 +0,0 @@
-// RUN: %clang -target x86_64-unknown-linux-gnu -o - -emit-interface-stubs \
-// RUN: -interface-stub-version=experimental-tapi-elf-v1 %s | \
-// RUN: FileCheck -check-prefix=CHECK-TAPI %s
-// RUN: %clang -target x86_64-unknown-linux-gnu -o - -emit-interface-stubs \
-// RUN: -interface-stub-version=experimental-tapi-elf-v1 %s | \
-// RUN: FileCheck -check-prefix=CHECK-TAPI2 %s
-// RUN: %clang -target x86_64-unknown-linux-gnu -o - -c %s | \
-// RUN: llvm-readelf -s - 2>&1 | FileCheck -check-prefix=CHECK-SYMBOLS %s
-
-#define HIDDEN __attribute__((__visibility__(("hidden"))))
-#define DEFAULT __attribute__((__visibility__(("default"))))
-
-// CHECK-TAPI-NOT: _ZNK1Q5func1Ev
-// CHECK-TAPI-NOT: _ZNK1Q5func2Ev
-// CHECK-SYMBOLS-DAG: NOTYPE GLOBAL HIDDEN {{.*}} _ZNK1Q5func1Ev
-// CHECK-SYMBOLS-DAG: NOTYPE GLOBAL DEFAULT {{.*}} _ZNK1Q5func2Ev
-struct Q {
- virtual HIDDEN int func1() const;
- virtual DEFAULT int func2() const;
-} q;
-
-// CHECK-TAPI-NOT: _ZNK1S5func1Ev
-// CHECK-TAPI2-DAG: _ZNK1S5func2Ev
-// CHECK-SYMBOLS-DAG: FUNC WEAK HIDDEN {{.*}} _ZNK1S5func1Ev
-// CHECK-SYMBOLS-DAG: FUNC WEAK DEFAULT {{.*}} _ZNK1S5func2Ev
-struct S {
- virtual HIDDEN int func1() const { return 42; }
- virtual DEFAULT int func2() const { return 42; }
-} s;
-
-// CHECK-TAPI-NOT: _ZNK1R5func1Ev
-// CHECK-TAPI-NOT: _ZNK1R5func2Ev
-// CHECK-SYMBOLS-NOT: _ZNK1R5func1Ev
-// CHECK-SYMBOLS-NOT: _ZNK1R5func2Ev
-struct R {
- virtual HIDDEN int func1() const = 0;
- virtual DEFAULT int func2() const = 0;
-};
-
-int a = q.func1() + q.func2();
-
diff --git a/test/InterfaceStubs/visibility.cpp b/test/InterfaceStubs/visibility.cpp
deleted file mode 100644
index 87ea7ea7bd..0000000000
--- a/test/InterfaceStubs/visibility.cpp
+++ /dev/null
@@ -1,45 +0,0 @@
-// RUN: %clang -target x86_64-unknown-linux-gnu -o - -emit-interface-stubs \
-// RUN: -interface-stub-version=experimental-tapi-elf-v1 -fvisibility=hidden \
-// RUN: %s | FileCheck --check-prefix=CHECK-CMD-HIDDEN %s
-
-// RUN: %clang -target x86_64-unknown-linux-gnu -o - -emit-interface-stubs \
-// RUN: -interface-stub-version=experimental-yaml-elf-v1 -fvisibility=hidden \
-// RUN: %s | FileCheck --check-prefix=CHECK-CMD-HIDDEN %s
-
-// RUN: %clang -target x86_64-unknown-linux-gnu -o - -emit-interface-stubs \
-// RUN: -interface-stub-version=experimental-tapi-elf-v1 %s | \
-// RUN: FileCheck --check-prefix=CHECK-CMD %s
-
-// RUN: %clang -target x86_64-unknown-linux-gnu -o - -emit-interface-stubs \
-// RUN: -interface-stub-version=experimental-yaml-elf-v1 %s | \
-// RUN: FileCheck --check-prefix=CHECK-CMD %s
-
-// RUN: %clang -target x86_64-unknown-linux-gnu -o - -emit-interface-stubs \
-// RUN: -interface-stub-version=experimental-tapi-elf-v1 %s | \
-// RUN: FileCheck --check-prefix=CHECK-CMD2 %s
-
-// RUN: %clang -target x86_64-unknown-linux-gnu -o - -emit-interface-stubs \
-// RUN: -interface-stub-version=experimental-yaml-elf-v1 %s | \
-// RUN: FileCheck --check-prefix=CHECK-CMD2 %s
-
-// RUN: %clang -target x86_64-unknown-linux-gnu -o - -c %s | llvm-readelf -s - 2>&1 | \
-// RUN: FileCheck -check-prefix=CHECK-SYMBOLS %s
-
-// Always Be Hidden:
-// CHECK-CMD-HIDDEN-NOT: _Z6hiddenv
-// CHECK-CMD2-NOT: _Z6hiddenv
-__attribute__((visibility("hidden"))) void hidden() {}
-
-// Always Be Visible:
-// CHECK-CMD-HIDDEN: _Z9nothiddenv
-// CHECK-CMD-DAG: _Z9nothiddenv
-__attribute__((visibility("default"))) void nothidden() {}
-
-// Do Whatever -fvisibility says:
-// CHECK-CMD-HIDDEN-NOT: _Z10cmdVisiblev
-// CHECK-CMD-DAG: _Z10cmdVisiblev
-void cmdVisible() {}
-
-// CHECK-SYMBOLS-DAG: DEFAULT {{.*}} _Z10cmdVisiblev
-// CHECK-SYMBOLS-DAG: HIDDEN {{.*}} _Z6hiddenv
-// CHECK-SYMBOLS-DAG: DEFAULT {{.*}} _Z9nothiddenv
diff --git a/test/InterfaceStubs/weak.cpp b/test/InterfaceStubs/weak.cpp
deleted file mode 100644
index e089225b5d..0000000000
--- a/test/InterfaceStubs/weak.cpp
+++ /dev/null
@@ -1,27 +0,0 @@
-// RUN: %clang -target x86_64-linux-gnu -o - -emit-interface-stubs \
-// RUN: -interface-stub-version=experimental-tapi-elf-v1 %s | \
-// RUN: FileCheck %s
-
-// RUN: %clang -target x86_64-linux-gnu -o - -emit-interface-stubs \
-// RUN: -interface-stub-version=experimental-yaml-elf-v1 %s | \
-// RUN: FileCheck --check-prefix=CHECK-YAML %s
-
-// RUN: %clang -target x86_64-unknown-linux-gnu -o - -c %s | llvm-nm - 2>&1 | \
-// RUN: FileCheck -check-prefix=CHECK-SYMBOLS %s
-
-// CHECK: Symbols:
-// CHECK-DAG: _Z8weakFuncv: { Type: Func, Weak: true }
-// CHECK-DAG: _Z10strongFuncv: { Type: Func }
-
-// CHECK-YAML: Symbols:
-// CHECK-YAML-DAG: - Name: _Z8weakFuncv
-// CHECK-YAML-DAG: Type: STT_FUNC
-// CHECK-YAML-DAG: Binding: STB_WEAK
-// CHECK-YAML-DAG: - Name: _Z10strongFuncv
-// CHECK-YAML-DAG: Type: STT_FUNC
-// CHECK-YAML-DAG: Binding: STB_GLOBAL
-
-// CHECK-SYMBOLS-DAG: _Z10strongFuncv
-// CHECK-SYMBOLS-DAG: _Z8weakFuncv
-__attribute__((weak)) void weakFunc() {}
-int strongFunc() { return 42; }