llvm/llvm/include/llvm/CGData/CodeGenData.h

//===- CodeGenData.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 contains support for codegen data that has stable summary which
// can be used to optimize the code in the subsequent codegen.
//
//===----------------------------------------------------------------------===//

#ifndef LLVM_CGDATA_CODEGENDATA_H
#define LLVM_CGDATA_CODEGENDATA_H

#include "llvm/ADT/BitmaskEnum.h"
#include "llvm/Bitcode/BitcodeReader.h"
#include "llvm/CGData/OutlinedHashTree.h"
#include "llvm/CGData/OutlinedHashTreeRecord.h"
#include "llvm/IR/Module.h"
#include "llvm/Object/ObjectFile.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/TargetParser/Triple.h"
#include <mutex>

namespace llvm {

enum CGDataSectKind {};

std::string getCodeGenDataSectionName(CGDataSectKind CGSK,
                                      Triple::ObjectFormatType OF,
                                      bool AddSegmentInfo = true);

enum class CGDataKind {};

const std::error_category &cgdata_category();

enum class cgdata_error {};

inline std::error_code make_error_code(cgdata_error E) {}

class CGDataError : public ErrorInfo<CGDataError> {};

enum CGDataMode {};

class CodeGenData {};

namespace cgdata {

inline bool hasOutlinedHashTree() {}

inline const OutlinedHashTree *getOutlinedHashTree() {}

inline bool emitCGData() {}

inline void
publishOutlinedHashTree(std::unique_ptr<OutlinedHashTree> HashTree) {}

void warn(Error E, StringRef Whence = "");
void warn(Twine Message, std::string Whence = "", std::string Hint = "");

} // end namespace cgdata

namespace IndexedCGData {

// A signature for data validation, representing "\xffcgdata\x81" in
// little-endian order
const uint64_t Magic =;

enum CGDataVersion {};
const uint64_t Version =;

struct Header {};

} // end namespace IndexedCGData

} // end namespace llvm

#endif // LLVM_CODEGEN_PREPARE_H