Reset prologue_location before calling code_end
[official-gcc.git] / libsanitizer / sanitizer_common / sanitizer_common_nolibc.cpp
blob487a634a16523d13904d1d7c9878eda866fc75e3
1 //===-- sanitizer_common_nolibc.cpp ---------------------------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file contains stubs for libc function to facilitate optional use of
10 // libc in no-libcdep sources.
11 //===----------------------------------------------------------------------===//
13 #include "sanitizer_common.h"
14 #include "sanitizer_flags.h"
15 #include "sanitizer_libc.h"
16 #include "sanitizer_platform.h"
18 namespace __sanitizer {
20 // The Windows implementations of these functions use the win32 API directly,
21 // bypassing libc.
22 #if !SANITIZER_WINDOWS
23 #if SANITIZER_LINUX
24 void LogMessageOnPrintf(const char *str) {}
25 #endif
26 void WriteToSyslog(const char *buffer) {}
27 void Abort() { internal__exit(1); }
28 void SleepForSeconds(int seconds) { internal_sleep(seconds); }
29 #endif // !SANITIZER_WINDOWS
31 #if !SANITIZER_WINDOWS && !SANITIZER_MAC
32 void ListOfModules::init() {}
33 void InitializePlatformCommonFlags(CommonFlags *cf) {}
34 #endif
36 } // namespace __sanitizer