+/* Magic number to detect file format and endianness.
+ * Use 255 at one end, since no UTF-8 file can use that character. Avoid 0,
+ * so that utilities, like strings, don't grab it as a string. 129 is also
+ * invalid UTF-8, and high enough to be interesting.
+ * Use "lprofr" in the centre to stand for "LLVM Profile Raw", or "lprofR"
+ * for 32-bit platforms.
+ * The magic and version need to be kept in sync with
+ * projects/compiler-rt/lib/profile/InstrProfiling.c
+ */
+#define INSTR_PROF_RAW_MAGIC_64 uint64_t(255) << 56 | uint64_t('l') << 48 | \
+ uint64_t('p') << 40 | uint64_t('r') << 32 | uint64_t('o') << 24 | \
+ uint64_t('f') << 16 | uint64_t('r') << 8 | uint64_t(129)
+#define INSTR_PROF_RAW_MAGIC_32 uint64_t(255) << 56 | uint64_t('l') << 48 | \
+ uint64_t('p') << 40 | uint64_t('r') << 32 | uint64_t('o') << 24 | \
+ uint64_t('f') << 16 | uint64_t('R') << 8 | uint64_t(129)
+
+/* Raw profile format version. */
+#define INSTR_PROF_RAW_VERSION 2