summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/ubsan/ubsan_diag.cc
diff options
context:
space:
mode:
Diffstat (limited to 'compiler-rt/lib/ubsan/ubsan_diag.cc')
-rw-r--r--compiler-rt/lib/ubsan/ubsan_diag.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler-rt/lib/ubsan/ubsan_diag.cc b/compiler-rt/lib/ubsan/ubsan_diag.cc
index 0eff1f63694..2314fb6edbd 100644
--- a/compiler-rt/lib/ubsan/ubsan_diag.cc
+++ b/compiler-rt/lib/ubsan/ubsan_diag.cc
@@ -11,6 +11,8 @@
//
//===----------------------------------------------------------------------===//
+#include "ubsan_platform.h"
+#if CAN_SANITIZE_UB
#include "ubsan_diag.h"
#include "ubsan_init.h"
#include "ubsan_flags.h"
@@ -361,3 +363,5 @@ bool __ubsan::IsVptrCheckSuppressed(const char *TypeName) {
Suppression *s;
return suppression_ctx->Match(TypeName, kVptrCheck, &s);
}
+
+#endif // CAN_SANITIZE_UB
OpenPOWER on IntegriCloud