llvm/compiler-rt/lib/sanitizer_common/sanitizer_file.cpp

//===-- sanitizer_file.cpp -----------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===---------------------------------------------------------------------===//
//
// This file is shared between AddressSanitizer and ThreadSanitizer
// run-time libraries.  It defines filesystem-related interfaces.  This
// is separate from sanitizer_common.cpp so that it's simpler to disable
// all the filesystem support code for a port that doesn't use it.
//
//===---------------------------------------------------------------------===//

#include "sanitizer_platform.h"

#if !SANITIZER_FUCHSIA

#include "sanitizer_common.h"
#include "sanitizer_file.h"
#  include "sanitizer_interface_internal.h"

namespace __sanitizer {

void CatastrophicErrorWrite(const char *buffer, uptr length) {}

StaticSpinMutex report_file_mu;
ReportFile report_file =;

void RawWrite(const char *buffer) {}

void ReportFile::ReopenIfNecessary() {}

static void RecursiveCreateParentDirs(char *path) {}

void ReportFile::SetReportPath(const char *path) {}

const char *ReportFile::GetReportPath() {}

bool ReadFileToBuffer(const char *file_name, char **buff, uptr *buff_size,
                      uptr *read_len, uptr max_len, error_t *errno_p) {}

bool ReadFileToVector(const char *file_name,
                      InternalMmapVectorNoCtor<char> *buff, uptr max_len,
                      error_t *errno_p) {}

static const char kPathSeparator =;

char *FindPathToBinary(const char *name) {}

} // namespace __sanitizer

usingnamespace__sanitizer;

extern "C" {
void __sanitizer_set_report_path(const char *path) {}

void __sanitizer_set_report_fd(void *fd) {}

const char *__sanitizer_get_report_path() {}
} // extern "C"

#endif  // !SANITIZER_FUCHSIA