LLVM
15.0.0git
include
llvm
Remarks
RemarkFormat.h
Go to the documentation of this file.
1
//===-- llvm/Remarks/RemarkFormat.h - The format of remarks -----*- C++/-*-===//
2
//
3
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
// See https://llvm.org/LICENSE.txt for license information.
5
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
//
7
//===----------------------------------------------------------------------===//
8
//
9
// This file defines utilities to deal with the format of remarks.
10
//
11
//===----------------------------------------------------------------------===//
12
13
#ifndef LLVM_REMARKS_REMARKFORMAT_H
14
#define LLVM_REMARKS_REMARKFORMAT_H
15
16
#include "
llvm/ADT/StringRef.h
"
17
#include "
llvm/Support/Error.h
"
18
19
namespace
llvm
{
20
namespace
remarks
{
21
22
constexpr
StringLiteral
Magic
(
"REMARKS"
);
23
24
/// The format used for serializing/deserializing remarks.
25
enum class
Format
{
Unknown
,
YAML
,
YAMLStrTab
,
Bitstream
};
26
27
/// Parse and validate a string for the remark format.
28
Expected<Format>
parseFormat
(
StringRef
FormatStr);
29
30
/// Parse and validate a magic number to a remark format.
31
Expected<Format>
magicToFormat
(
StringRef
Magic
);
32
33
}
// end namespace remarks
34
}
// end namespace llvm
35
36
#endif // LLVM_REMARKS_REMARKFORMAT_H
llvm::remarks::Format::Unknown
@ Unknown
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition:
AddressRanges.h:17
llvm::remarks::magicToFormat
Expected< Format > magicToFormat(StringRef Magic)
Parse and validate a magic number to a remark format.
Definition:
RemarkFormat.cpp:35
llvm::remarks::Format::Bitstream
@ Bitstream
StringRef.h
Error.h
llvm::remarks::Magic
constexpr StringLiteral Magic("REMARKS")
llvm::Expected
Tagged union holding either a T or a Error.
Definition:
APFloat.h:41
llvm::remarks::parseFormat
Expected< Format > parseFormat(StringRef FormatStr)
Parse and validate a string for the remark format.
Definition:
RemarkFormat.cpp:20
remarks
annotation remarks
Definition:
AnnotationRemarks.cpp:114
llvm::remarks::Format::YAML
@ YAML
llvm::remarks::Format::YAMLStrTab
@ YAMLStrTab
llvm::StringRef
StringRef - Represent a constant reference to a string, i.e.
Definition:
StringRef.h:58
StringLiteral
Definition:
ItaniumDemangle.h:2203
llvm::remarks::Format
Format
The format used for serializing/deserializing remarks.
Definition:
RemarkFormat.h:25
Generated on Fri Jul 1 2022 00:07:33 for LLVM by
1.8.17