#include "llvm/Bitcode/BitcodeWriter.h"
#include "llvm/CGData/CodeGenDataReader.h"
#include "llvm/CGData/OutlinedHashTreeRecord.h"
#include "llvm/Object/ObjectFile.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/FileSystem.h"
#include "llvm/Support/WithColor.h"
#define DEBUG_TYPE …
usingnamespacellvm;
usingnamespacecgdata;
cl::opt<bool>
CodeGenDataGenerate("codegen-data-generate", cl::init(false), cl::Hidden,
cl::desc("Emit CodeGen Data into custom sections"));
cl::opt<std::string>
CodeGenDataUsePath("codegen-data-use-path", cl::init(""), cl::Hidden,
cl::desc("File path to where .cgdata file is read"));
static std::string getCGDataErrString(cgdata_error Err,
const std::string &ErrMsg = "") { … }
namespace {
class CGDataErrorCategoryType : public std::error_category { … };
}
const std::error_category &llvm::cgdata_category() { … }
std::string CGDataError::message() const { … }
char CGDataError::ID = …;
namespace {
const char *CodeGenDataSectNameCommon[] = …;
const char *CodeGenDataSectNameCoff[] = …;
const char *CodeGenDataSectNamePrefix[] = …;
}
namespace llvm {
std::string getCodeGenDataSectionName(CGDataSectKind CGSK,
Triple::ObjectFormatType OF,
bool AddSegmentInfo) { … }
std::unique_ptr<CodeGenData> CodeGenData::Instance = …;
std::once_flag CodeGenData::OnceFlag;
CodeGenData &CodeGenData::getInstance() { … }
namespace IndexedCGData {
Expected<Header> Header::readFromBuffer(const unsigned char *Curr) { … }
}
namespace cgdata {
void warn(Twine Message, std::string Whence, std::string Hint) { … }
void warn(Error E, StringRef Whence) { … }
}
}