aboutsummaryrefslogtreecommitdiff
path: root/final/ABI-Testsuite/test/s2_9/builtin_void.xpp
diff options
context:
space:
mode:
authorHans Wennborg <hans@hanshq.net>2018-09-17 11:36:51 +0000
committerHans Wennborg <hans@hanshq.net>2018-09-17 11:36:51 +0000
commita6dad9fc06764d703e153dba83aeaa0de229a38b (patch)
tree2ec460e6e4cbfc31606dc1a9c8abd5ffa8f55c26 /final/ABI-Testsuite/test/s2_9/builtin_void.xpp
parent238601aff8b1dbfa1d36477f91f02fed66c7d7cc (diff)
Creating release candidate final from release_700 branchsvn-tags/RELEASE_700
git-svn-id: https://llvm.org/svn/llvm-project/test-suite/tags/RELEASE_700@342373 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'final/ABI-Testsuite/test/s2_9/builtin_void.xpp')
-rwxr-xr-xfinal/ABI-Testsuite/test/s2_9/builtin_void.xpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/final/ABI-Testsuite/test/s2_9/builtin_void.xpp b/final/ABI-Testsuite/test/s2_9/builtin_void.xpp
new file mode 100755
index 00000000..5a31d548
--- /dev/null
+++ b/final/ABI-Testsuite/test/s2_9/builtin_void.xpp
@@ -0,0 +1,23 @@
+// This file is distributed under the University of Illinois Open Source License.
+// See LICENSE.TXT for details.
+// RUN: cxx_compiler -c cxx_rtti cxx_exceptions %s -o %t.o
+// RUN: linker %t.o -o %t%exeext
+// RUN: bindump %t.o| FileCheck %s
+
+#include <typeinfo>
+
+// Test run-time library includes support for builtin type "void"
+
+int global_int = 10;
+void const *global_ptr;
+
+// CHECK-DAG: _ZTIv
+const std::type_info &foo1() { const std::type_info &t = typeid(void); return t; }
+// CHECK-DAG: _ZTIPv
+void foo2() { throw (void *)&global_int; }
+// CHECK-DAG: _ZTIPKv
+void foo3() { try { foo2(); } catch(void const *p) { } }
+
+int main(int argc, char *argv[]) {
+ return 0;
+}