aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/llvm14/include/llvm/Remarks/BitstreamRemarkContainer.h
diff options
context:
space:
mode:
authorvitalyisaev <vitalyisaev@yandex-team.com>2023-06-29 10:00:50 +0300
committervitalyisaev <vitalyisaev@yandex-team.com>2023-06-29 10:00:50 +0300
commit6ffe9e53658409f212834330e13564e4952558f6 (patch)
tree85b1e00183517648b228aafa7c8fb07f5276f419 /contrib/libs/llvm14/include/llvm/Remarks/BitstreamRemarkContainer.h
parent726057070f9c5a91fc10fde0d5024913d10f1ab9 (diff)
downloadydb-6ffe9e53658409f212834330e13564e4952558f6.tar.gz
YQ Connector: support managed ClickHouse
Со стороны dqrun можно обратиться к инстансу коннектора, который работает на streaming стенде, и извлечь данные из облачного CH.
Diffstat (limited to 'contrib/libs/llvm14/include/llvm/Remarks/BitstreamRemarkContainer.h')
-rw-r--r--contrib/libs/llvm14/include/llvm/Remarks/BitstreamRemarkContainer.h117
1 files changed, 117 insertions, 0 deletions
diff --git a/contrib/libs/llvm14/include/llvm/Remarks/BitstreamRemarkContainer.h b/contrib/libs/llvm14/include/llvm/Remarks/BitstreamRemarkContainer.h
new file mode 100644
index 0000000000..4872206ebe
--- /dev/null
+++ b/contrib/libs/llvm14/include/llvm/Remarks/BitstreamRemarkContainer.h
@@ -0,0 +1,117 @@
+#pragma once
+
+#ifdef __GNUC__
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wunused-parameter"
+#endif
+
+//===-- BitstreamRemarkContainer.h - Container for remarks --------------*-===//
+//
+// 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 provides declarations for things used in the various types of
+// remark containers.
+//
+//===----------------------------------------------------------------------===//
+
+#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 {
+
+/// The current version of the remark container.
+/// Note: this is different from the version of the remark entry.
+constexpr uint64_t CurrentContainerVersion = 0;
+/// The magic number used for identifying remark blocks.
+constexpr StringLiteral ContainerMagic("RMRK");
+
+/// Type of the remark container.
+/// The remark container has two modes:
+/// * separate: the metadata is separate from the remarks and points to the
+/// auxiliary file that contains the remarks.
+/// * standalone: the metadata and the remarks are emitted together.
+enum class BitstreamRemarkContainerType {
+ /// The metadata emitted separately.
+ /// This will contain the following:
+ /// * Container version and type
+ /// * String table
+ /// * External file
+ SeparateRemarksMeta,
+ /// The remarks emitted separately.
+ /// This will contain the following:
+ /// * Container version and type
+ /// * Remark version
+ SeparateRemarksFile,
+ /// Everything is emitted together.
+ /// This will contain the following:
+ /// * Container version and type
+ /// * Remark version
+ /// * String table
+ Standalone,
+ First = SeparateRemarksMeta,
+ Last = Standalone,
+};
+
+/// The possible blocks that will be encountered in a bitstream remark
+/// container.
+enum BlockIDs {
+ /// The metadata block is mandatory. It should always come after the
+ /// BLOCKINFO_BLOCK, and contains metadata that should be used when parsing
+ /// REMARK_BLOCKs.
+ /// There should always be only one META_BLOCK.
+ META_BLOCK_ID = bitc::FIRST_APPLICATION_BLOCKID,
+ /// One remark entry is represented using a REMARK_BLOCK. There can be
+ /// multiple REMARK_BLOCKs in the same file.
+ REMARK_BLOCK_ID
+};
+
+constexpr StringRef MetaBlockName = StringRef("Meta", 4);
+constexpr StringRef RemarkBlockName = StringRef("Remark", 6);
+
+/// The possible records that can be encountered in the previously described
+/// blocks.
+enum RecordIDs {
+ // Meta block records.
+ RECORD_META_CONTAINER_INFO = 1,
+ RECORD_META_REMARK_VERSION,
+ RECORD_META_STRTAB,
+ RECORD_META_EXTERNAL_FILE,
+ // Remark block records.
+ RECORD_REMARK_HEADER,
+ RECORD_REMARK_DEBUG_LOC,
+ RECORD_REMARK_HOTNESS,
+ RECORD_REMARK_ARG_WITH_DEBUGLOC,
+ RECORD_REMARK_ARG_WITHOUT_DEBUGLOC,
+ // Helpers.
+ 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);
+
+} // end namespace remarks
+} // end namespace llvm
+
+#endif // LLVM_REMARKS_BITSTREAMREMARKCONTAINER_H
+
+#ifdef __GNUC__
+#pragma GCC diagnostic pop
+#endif