Path: blob/main/contrib/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_common_nolibc.cpp
35233 views
//===-- sanitizer_common_nolibc.cpp ---------------------------------------===//1//2// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.3// See https://llvm.org/LICENSE.txt for license information.4// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception5//6//===----------------------------------------------------------------------===//7//8// This file contains stubs for libc function to facilitate optional use of9// libc in no-libcdep sources.10//===----------------------------------------------------------------------===//1112#include "sanitizer_common.h"13#include "sanitizer_flags.h"14#include "sanitizer_libc.h"15#include "sanitizer_platform.h"1617namespace __sanitizer {1819// The Windows implementations of these functions use the win32 API directly,20// bypassing libc.21#if !SANITIZER_WINDOWS22#if SANITIZER_LINUX23void LogMessageOnPrintf(const char *str) {}24#endif25void WriteToSyslog(const char *buffer) {}26void Abort() { internal__exit(1); }27bool CreateDir(const char *pathname) { return false; }28#endif // !SANITIZER_WINDOWS2930#if !SANITIZER_WINDOWS && !SANITIZER_APPLE31void ListOfModules::init() {}32void InitializePlatformCommonFlags(CommonFlags *cf) {}33#endif3435} // namespace __sanitizer363738