13cab2bb3Spatrick //===-- sanitizer_common_nolibc.cpp ---------------------------------------===// 23cab2bb3Spatrick // 33cab2bb3Spatrick // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 43cab2bb3Spatrick // See https://llvm.org/LICENSE.txt for license information. 53cab2bb3Spatrick // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 63cab2bb3Spatrick // 73cab2bb3Spatrick //===----------------------------------------------------------------------===// 83cab2bb3Spatrick // 93cab2bb3Spatrick // This file contains stubs for libc function to facilitate optional use of 103cab2bb3Spatrick // libc in no-libcdep sources. 113cab2bb3Spatrick //===----------------------------------------------------------------------===// 123cab2bb3Spatrick 133cab2bb3Spatrick #include "sanitizer_common.h" 14d89ec533Spatrick #include "sanitizer_flags.h" 153cab2bb3Spatrick #include "sanitizer_libc.h" 16d89ec533Spatrick #include "sanitizer_platform.h" 173cab2bb3Spatrick 183cab2bb3Spatrick namespace __sanitizer { 193cab2bb3Spatrick 203cab2bb3Spatrick // The Windows implementations of these functions use the win32 API directly, 213cab2bb3Spatrick // bypassing libc. 223cab2bb3Spatrick #if !SANITIZER_WINDOWS 233cab2bb3Spatrick #if SANITIZER_LINUX LogMessageOnPrintf(const char * str)243cab2bb3Spatrickvoid LogMessageOnPrintf(const char *str) {} 253cab2bb3Spatrick #endif WriteToSyslog(const char * buffer)263cab2bb3Spatrickvoid WriteToSyslog(const char *buffer) {} Abort()273cab2bb3Spatrickvoid Abort() { internal__exit(1); } CreateDir(const char * pathname)28*810390e3Srobertbool CreateDir(const char *pathname) { return false; } 293cab2bb3Spatrick #endif // !SANITIZER_WINDOWS 303cab2bb3Spatrick 31*810390e3Srobert #if !SANITIZER_WINDOWS && !SANITIZER_APPLE init()323cab2bb3Spatrickvoid ListOfModules::init() {} InitializePlatformCommonFlags(CommonFlags * cf)33d89ec533Spatrickvoid InitializePlatformCommonFlags(CommonFlags *cf) {} 343cab2bb3Spatrick #endif 353cab2bb3Spatrick 363cab2bb3Spatrick } // namespace __sanitizer 37