Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-10 08:44:25

0001 //===-- llvm/Remarks/RemarkFormat.h - The format of remarks -----*- C++/-*-===//
0002 //
0003 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
0004 // See https://llvm.org/LICENSE.txt for license information.
0005 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
0006 //
0007 //===----------------------------------------------------------------------===//
0008 //
0009 // This file defines utilities to deal with the format of remarks.
0010 //
0011 //===----------------------------------------------------------------------===//
0012 
0013 #ifndef LLVM_REMARKS_REMARKFORMAT_H
0014 #define LLVM_REMARKS_REMARKFORMAT_H
0015 
0016 #include "llvm/ADT/StringRef.h"
0017 #include "llvm/Support/Error.h"
0018 
0019 namespace llvm {
0020 namespace remarks {
0021 
0022 constexpr StringLiteral Magic("REMARKS");
0023 
0024 /// The format used for serializing/deserializing remarks.
0025 enum class Format { Unknown, YAML, YAMLStrTab, Bitstream };
0026 
0027 /// Parse and validate a string for the remark format.
0028 Expected<Format> parseFormat(StringRef FormatStr);
0029 
0030 /// Parse and validate a magic number to a remark format.
0031 Expected<Format> magicToFormat(StringRef Magic);
0032 
0033 } // end namespace remarks
0034 } // end namespace llvm
0035 
0036 #endif // LLVM_REMARKS_REMARKFORMAT_H