aboutsummaryrefslogtreecommitdiff
path: root/lib/sanitizer_common/sanitizer_common_nolibc.cc
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sanitizer_common/sanitizer_common_nolibc.cc')
-rw-r--r--lib/sanitizer_common/sanitizer_common_nolibc.cc26
1 files changed, 26 insertions, 0 deletions
diff --git a/lib/sanitizer_common/sanitizer_common_nolibc.cc b/lib/sanitizer_common/sanitizer_common_nolibc.cc
new file mode 100644
index 000000000000..89c17e0797ef
--- /dev/null
+++ b/lib/sanitizer_common/sanitizer_common_nolibc.cc
@@ -0,0 +1,26 @@
+//===-- sanitizer_common_nolibc.cc ----------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// This file contains stubs for libc function to facilitate optional use of
+// libc in no-libcdep sources.
+//===----------------------------------------------------------------------===//
+
+#include "sanitizer_platform.h"
+#include "sanitizer_common.h"
+#include "sanitizer_libc.h"
+
+namespace __sanitizer {
+
+#if SANITIZER_LINUX
+bool ShouldLogAfterPrintf() { return false; }
+#endif
+void WriteToSyslog(const char *buffer) {}
+void Abort() { internal__exit(1); }
+
+} // namespace __sanitizer