168d75effSDimitry Andric //===-- sanitizer_common_nolibc.cpp ---------------------------------------===// 268d75effSDimitry Andric // 368d75effSDimitry Andric // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 468d75effSDimitry Andric // See https://llvm.org/LICENSE.txt for license information. 568d75effSDimitry Andric // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 668d75effSDimitry Andric // 768d75effSDimitry Andric //===----------------------------------------------------------------------===// 868d75effSDimitry Andric // 968d75effSDimitry Andric // This file contains stubs for libc function to facilitate optional use of 1068d75effSDimitry Andric // libc in no-libcdep sources. 1168d75effSDimitry Andric //===----------------------------------------------------------------------===// 1268d75effSDimitry Andric 1368d75effSDimitry Andric #include "sanitizer_common.h" 14e8d8bef9SDimitry Andric #include "sanitizer_flags.h" 1568d75effSDimitry Andric #include "sanitizer_libc.h" 16e8d8bef9SDimitry Andric #include "sanitizer_platform.h" 1768d75effSDimitry Andric 1868d75effSDimitry Andric namespace __sanitizer { 1968d75effSDimitry Andric 2068d75effSDimitry Andric // The Windows implementations of these functions use the win32 API directly, 2168d75effSDimitry Andric // bypassing libc. 2268d75effSDimitry Andric #if !SANITIZER_WINDOWS 2368d75effSDimitry Andric #if SANITIZER_LINUX LogMessageOnPrintf(const char * str)2468d75effSDimitry Andricvoid LogMessageOnPrintf(const char *str) {} 2568d75effSDimitry Andric #endif WriteToSyslog(const char * buffer)2668d75effSDimitry Andricvoid WriteToSyslog(const char *buffer) {} Abort()2768d75effSDimitry Andricvoid Abort() { internal__exit(1); } CreateDir(const char * pathname)28349cc55cSDimitry Andricbool CreateDir(const char *pathname) { return false; } 2968d75effSDimitry Andric #endif // !SANITIZER_WINDOWS 3068d75effSDimitry Andric 31*81ad6265SDimitry Andric #if !SANITIZER_WINDOWS && !SANITIZER_APPLE init()3268d75effSDimitry Andricvoid ListOfModules::init() {} InitializePlatformCommonFlags(CommonFlags * cf)33e8d8bef9SDimitry Andricvoid InitializePlatformCommonFlags(CommonFlags *cf) {} 3468d75effSDimitry Andric #endif 3568d75effSDimitry Andric 3668d75effSDimitry Andric } // namespace __sanitizer 37