llvm/compiler-rt/lib/xray/xray_utils.h

//===-- xray_utils.h --------------------------------------------*- C++ -*-===//
//
// 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 a part of XRay, a dynamic runtime instrumentation system.
//
// Some shared utilities for the XRay runtime implementation.
//
//===----------------------------------------------------------------------===//
#ifndef XRAY_UTILS_H
#define XRAY_UTILS_H

#include <cstddef>
#include <cstdint>
#include <sys/types.h>
#include <utility>

#include "sanitizer_common/sanitizer_common.h"
#if SANITIZER_FUCHSIA
#include <zircon/types.h>
#endif

namespace __xray {

class LogWriter {};

constexpr size_t gcd(size_t a, size_t b) {}

constexpr size_t lcm(size_t a, size_t b) {}

constexpr size_t nearest_boundary(size_t number, size_t multiple) {}

constexpr size_t next_pow2_helper(size_t num, size_t acc) {}

constexpr size_t next_pow2(size_t number) {}

template <class T> constexpr T &max(T &A, T &B) {}

template <class T> constexpr T &min(T &A, T &B) {}

constexpr ptrdiff_t diff(uintptr_t A, uintptr_t B) {}

} // namespace __xray

#endif // XRAY_UTILS_H