#ifndef LLVM_REMARKS_BITSTREAMREMARKCONTAINER_H
#define LLVM_REMARKS_BITSTREAMREMARKCONTAINER_H
#include "llvm/ADT/StringRef.h"
#include "llvm/Bitstream/BitCodes.h"
#include <cstdint>
namespace llvm {
namespace remarks {
constexpr uint64_t CurrentContainerVersion = 0;
constexpr StringLiteral ContainerMagic("RMRK");
enum class BitstreamRemarkContainerType {
SeparateRemarksMeta,
SeparateRemarksFile,
Standalone,
First = SeparateRemarksMeta,
Last = Standalone,
};
enum BlockIDs {
META_BLOCK_ID = bitc::FIRST_APPLICATION_BLOCKID,
REMARK_BLOCK_ID
};
constexpr StringRef MetaBlockName = StringRef("Meta", 4);
constexpr StringRef RemarkBlockName = StringRef("Remark", 6);
enum RecordIDs {
RECORD_META_CONTAINER_INFO = 1,
RECORD_META_REMARK_VERSION,
RECORD_META_STRTAB,
RECORD_META_EXTERNAL_FILE,
RECORD_REMARK_HEADER,
RECORD_REMARK_DEBUG_LOC,
RECORD_REMARK_HOTNESS,
RECORD_REMARK_ARG_WITH_DEBUGLOC,
RECORD_REMARK_ARG_WITHOUT_DEBUGLOC,
RECORD_FIRST = RECORD_META_CONTAINER_INFO,
RECORD_LAST = RECORD_REMARK_ARG_WITHOUT_DEBUGLOC
};
constexpr StringRef MetaContainerInfoName = StringRef("Container info", 14);
constexpr StringRef MetaRemarkVersionName = StringRef("Remark version", 14);
constexpr StringRef MetaStrTabName = StringRef("String table", 12);
constexpr StringRef MetaExternalFileName = StringRef("External File", 13);
constexpr StringRef RemarkHeaderName = StringRef("Remark header", 13);
constexpr StringRef RemarkDebugLocName = StringRef("Remark debug location", 21);
constexpr StringRef RemarkHotnessName = StringRef("Remark hotness", 14);
constexpr StringRef RemarkArgWithDebugLocName =
StringRef("Argument with debug location", 28);
constexpr StringRef RemarkArgWithoutDebugLocName = StringRef("Argument", 8);
} }
#endif