Revert "[clang][IFS][test] Removing driver-test.c. Test is still too brittle."
authorPuyan Lotfi <puyan@puyan.org>
Wed, 20 Nov 2019 02:59:10 +0000 (21:59 -0500)
committerPuyan Lotfi <puyan@puyan.org>
Wed, 20 Nov 2019 02:59:10 +0000 (21:59 -0500)
This reverts commit f37356d6f60ae5db978611621d3a375ed87ec0f0.

clang/test/InterfaceStubs/driver-test.c [new file with mode: 0644]

diff --git a/clang/test/InterfaceStubs/driver-test.c b/clang/test/InterfaceStubs/driver-test.c
new file mode 100644 (file)
index 0000000..425d872
--- /dev/null
@@ -0,0 +1,15 @@
+// REQUIRES: x86-registered-target
+// REQUIRES: !powerpc-registered-target
+// REQUIRES: !system-darwin && !system-windows
+
+// RUN: %clang -o %t1 -target x86_64-unknown-linux-gnu \
+// RUN:   -emit-interface-stubs -emit-merged-ifs %s %S/object.c %S/weak.cpp
+// RUN: cat %t1.ifs | FileCheck %s
+
+// CHECK-DAG: data
+// CHECK-DAG: foo
+// CHECK-DAG: strongFunc
+// CHECK-DAG: weakFunc
+
+int foo(int bar) { return 42 + 1844; }
+int main() { return foo(23); }