summaryrefslogtreecommitdiffstats
path: root/compiler-rt/test/ubsan
diff options
context:
space:
mode:
authorPeter Collingbourne <peter@pcc.me.uk>2017-09-15 20:24:12 +0000
committerPeter Collingbourne <peter@pcc.me.uk>2017-09-15 20:24:12 +0000
commitd13d61fdb4166236c77893e08a5c60c0bfa0dc0c (patch)
treea713022ae86723e19954df563192b66bf60e662a /compiler-rt/test/ubsan
parentb5ab895e2a62486d29e3bc564cc3f2edde3ff719 (diff)
downloadbcm5719-llvm-d13d61fdb4166236c77893e08a5c60c0bfa0dc0c.tar.gz
bcm5719-llvm-d13d61fdb4166236c77893e08a5c60c0bfa0dc0c.zip
ubsan: Unbreak ubsan_cxx runtime library on Windows.
This was originally broken by r258744 which introduced a weak reference from ubsan to ubsan_cxx. This reference does not work directly on Windows because COFF has no direct concept of weak symbols. The fix is to use /alternatename to create a weak external reference to ubsan_cxx. Also fix the definition (and the name, so that we drop cached values) of the cmake flag that controls whether to build ubsan_cxx. Now the user-controllable flag is always on, and we turn it off internally depending on whether we support building it. Differential Revision: https://reviews.llvm.org/D37882 llvm-svn: 313391
Diffstat (limited to 'compiler-rt/test/ubsan')
-rw-r--r--compiler-rt/test/ubsan/TestCases/TypeCheck/PR33221.cpp1
-rw-r--r--compiler-rt/test/ubsan/TestCases/TypeCheck/vptr-non-unique-typeinfo.cpp1
-rw-r--r--compiler-rt/test/ubsan/TestCases/TypeCheck/vptr-virtual-base-construction.cpp1
-rw-r--r--compiler-rt/test/ubsan/TestCases/TypeCheck/vptr-virtual-base.cpp1
-rw-r--r--compiler-rt/test/ubsan/TestCases/TypeCheck/vptr.cpp1
5 files changed, 5 insertions, 0 deletions
diff --git a/compiler-rt/test/ubsan/TestCases/TypeCheck/PR33221.cpp b/compiler-rt/test/ubsan/TestCases/TypeCheck/PR33221.cpp
index 71da06c099c..65cbf5d000d 100644
--- a/compiler-rt/test/ubsan/TestCases/TypeCheck/PR33221.cpp
+++ b/compiler-rt/test/ubsan/TestCases/TypeCheck/PR33221.cpp
@@ -2,6 +2,7 @@
// RUN: %run %t 2>&1 | FileCheck %s
// REQUIRES: cxxabi
+// UNSUPPORTED: win32
#include <string.h>
diff --git a/compiler-rt/test/ubsan/TestCases/TypeCheck/vptr-non-unique-typeinfo.cpp b/compiler-rt/test/ubsan/TestCases/TypeCheck/vptr-non-unique-typeinfo.cpp
index 8ab7bfcaa94..e8d51069474 100644
--- a/compiler-rt/test/ubsan/TestCases/TypeCheck/vptr-non-unique-typeinfo.cpp
+++ b/compiler-rt/test/ubsan/TestCases/TypeCheck/vptr-non-unique-typeinfo.cpp
@@ -3,6 +3,7 @@
// RUN: %run %t
//
// REQUIRES: cxxabi
+// UNSUPPORTED: win32
struct X {
virtual ~X() {}
diff --git a/compiler-rt/test/ubsan/TestCases/TypeCheck/vptr-virtual-base-construction.cpp b/compiler-rt/test/ubsan/TestCases/TypeCheck/vptr-virtual-base-construction.cpp
index dc27d9f39ce..a86960d12ad 100644
--- a/compiler-rt/test/ubsan/TestCases/TypeCheck/vptr-virtual-base-construction.cpp
+++ b/compiler-rt/test/ubsan/TestCases/TypeCheck/vptr-virtual-base-construction.cpp
@@ -2,6 +2,7 @@
// RUN: %run %t
// REQUIRES: cxxabi
+// UNSUPPORTED: win32
int volatile n;
diff --git a/compiler-rt/test/ubsan/TestCases/TypeCheck/vptr-virtual-base.cpp b/compiler-rt/test/ubsan/TestCases/TypeCheck/vptr-virtual-base.cpp
index f1fb111319e..aa0123c46e9 100644
--- a/compiler-rt/test/ubsan/TestCases/TypeCheck/vptr-virtual-base.cpp
+++ b/compiler-rt/test/ubsan/TestCases/TypeCheck/vptr-virtual-base.cpp
@@ -2,6 +2,7 @@
// RUN: not %run %t 2>&1 | FileCheck %s
// REQUIRES: cxxabi
+// UNSUPPORTED: win32
struct S { virtual int f() { return 0; } };
struct T : virtual S {};
diff --git a/compiler-rt/test/ubsan/TestCases/TypeCheck/vptr.cpp b/compiler-rt/test/ubsan/TestCases/TypeCheck/vptr.cpp
index 183c7b743d4..21d762ee108 100644
--- a/compiler-rt/test/ubsan/TestCases/TypeCheck/vptr.cpp
+++ b/compiler-rt/test/ubsan/TestCases/TypeCheck/vptr.cpp
@@ -26,6 +26,7 @@
// RUN: %env_ubsan_opts=suppressions='"%t.loc-supp"' not %run %t x- 2>&1 | FileCheck %s --check-prefix=CHECK-LOC-SUPPRESS
// REQUIRES: stable-runtime, cxxabi
+// UNSUPPORTED: win32
#include <new>
#include <assert.h>
#include <stdio.h>
OpenPOWER on IntegriCloud