RemarkFormat.h revision 351278
111819Sjulian//===-- llvm/Remarks/RemarkFormat.h - The format of remarks -----*- C++/-*-===//
211819Sjulian//
311819Sjulian// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
411819Sjulian// See https://llvm.org/LICENSE.txt for license information.
511819Sjulian// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
611819Sjulian//
711819Sjulian//===----------------------------------------------------------------------===//
811819Sjulian//
911819Sjulian// This file defines utilities to deal with the format of remarks.
1011819Sjulian//
1111819Sjulian//===----------------------------------------------------------------------===//
1211819Sjulian
1311819Sjulian#ifndef LLVM_REMARKS_REMARK_FORMAT_H
1411819Sjulian#define LLVM_REMARKS_REMARK_FORMAT_H
1511819Sjulian
1611819Sjulian#include "llvm/ADT/StringRef.h"
1711819Sjulian#include "llvm/Support/Error.h"
1811819Sjulian
1911819Sjuliannamespace llvm {
2011819Sjuliannamespace remarks {
2111819Sjulian
2211819Sjulianconstexpr StringRef Magic("REMARKS", 7);
2311819Sjulian
2411819Sjulian/// The format used for serializing/deserializing remarks.
2511819Sjulianenum class Format { Unknown, YAML };
2611819Sjulian
2711819Sjulian/// Parse and validate a string for the remark format.
2811819SjulianExpected<Format> parseFormat(StringRef FormatStr);
2911819Sjulian
3011819Sjulian} // end namespace remarks
3111819Sjulian} // end namespace llvm
3211819Sjulian
3311819Sjulian#endif /* LLVM_REMARKS_REMARK_FORMAT_H */
3412057Sjulian