asan/msan: fix "unused function 'OnExit'" warning
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@191904 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/asan/asan_interceptors.cc b/lib/asan/asan_interceptors.cc
index 3664ed0..b45266d 100644
--- a/lib/asan/asan_interceptors.cc
+++ b/lib/asan/asan_interceptors.cc
@@ -94,7 +94,7 @@
asanThreadRegistry().SetThreadName(t->tid(), name);
}
-static int OnExit() {
+int OnExit() {
// FIXME: ask frontend whether we need to return failure.
return 0;
}
diff --git a/lib/msan/msan_interceptors.cc b/lib/msan/msan_interceptors.cc
index 34bb31b..b616b98 100644
--- a/lib/msan/msan_interceptors.cc
+++ b/lib/msan/msan_interceptors.cc
@@ -1112,11 +1112,15 @@
bool in_interceptor_scope;
};
-static int OnExit() {
+namespace __msan {
+
+int OnExit() {
// FIXME: ask frontend whether we need to return failure.
return 0;
}
+} // namespace __msan
+
// A version of CHECK_UNPOISED using a saved scope value. Used in common
// interceptors.
#define CHECK_UNPOISONED_CTX(ctx, x, n) \