llvm/llvm/include/llvm/ProfileData/SampleProfWriter.h

//===- SampleProfWriter.h - Write LLVM sample profile data ------*- 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 contains definitions needed for writing sample profiles.
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_PROFILEDATA_SAMPLEPROFWRITER_H
#define LLVM_PROFILEDATA_SAMPLEPROFWRITER_H

#include "llvm/ADT/MapVector.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/IR/ProfileSummary.h"
#include "llvm/ProfileData/SampleProf.h"
#include "llvm/Support/ErrorOr.h"
#include "llvm/Support/raw_ostream.h"
#include <cstdint>
#include <memory>
#include <set>
#include <system_error>

namespace llvm {
namespace sampleprof {

enum SectionLayout {};

/// When writing a profile with size limit, user may want to use a different
/// strategy to reduce function count other than dropping functions with fewest
/// samples first. In this case a class implementing the same interfaces should
/// be provided to SampleProfileWriter::writeWithSizeLimit().
class FunctionPruningStrategy {};

class DefaultFunctionPruningStrategy : public FunctionPruningStrategy {};

/// Sample-based profile writer. Base class.
class SampleProfileWriter {};

/// Sample-based profile writer (text format).
class SampleProfileWriterText : public SampleProfileWriter {};

/// Sample-based profile writer (binary format).
class SampleProfileWriterBinary : public SampleProfileWriter {};

class SampleProfileWriterRawBinary : public SampleProfileWriterBinary {};

const std::array<SmallVector<SecHdrTableEntry, 8>, NumOfLayout>
    ExtBinaryHdrLayoutTable =;

class SampleProfileWriterExtBinaryBase : public SampleProfileWriterBinary {};

class SampleProfileWriterExtBinary : public SampleProfileWriterExtBinaryBase {};

} // end namespace sampleprof
} // end namespace llvm

#endif // LLVM_PROFILEDATA_SAMPLEPROFWRITER_H