summaryrefslogtreecommitdiffstats
path: root/contrib/compiler-rt/lib/ubsan/ubsan_init.h
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/compiler-rt/lib/ubsan/ubsan_init.h')
-rw-r--r--contrib/compiler-rt/lib/ubsan/ubsan_init.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/contrib/compiler-rt/lib/ubsan/ubsan_init.h b/contrib/compiler-rt/lib/ubsan/ubsan_init.h
index 18356cf..103ae24 100644
--- a/contrib/compiler-rt/lib/ubsan/ubsan_init.h
+++ b/contrib/compiler-rt/lib/ubsan/ubsan_init.h
@@ -15,9 +15,16 @@
namespace __ubsan {
-// NOTE: This function might take a lock (if .preinit_array initialization is
-// not used). It's generally a bad idea to call it on a fast path.
-void InitIfNecessary();
+// Initialize UBSan as a standalone tool. Typically should be called early
+// during initialization.
+void InitAsStandalone();
+
+// Initialize UBSan as a standalone tool, if it hasn't been initialized before.
+void InitAsStandaloneIfNecessary();
+
+// Initializes UBSan as a plugin tool. This function should be called once
+// from "parent tool" (e.g. ASan) initialization.
+void InitAsPlugin();
} // namespace __ubsan
OpenPOWER on IntegriCloud