CIRCT 20.0.0git
Loading...
Searching...
No Matches
FIRAnnotations.h
Go to the documentation of this file.
1//===- FIRAnnotations.h - .fir file annotation interface --------*- 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 contains public APIs for loading annotations.
10//
11//===----------------------------------------------------------------------===//
12
13#ifndef CIRCT_DIALECT_FIRRTL_IMPORT_FIRANNOTATIONS_H
14#define CIRCT_DIALECT_FIRRTL_IMPORT_FIRANNOTATIONS_H
15
16#include "circt/Support/LLVM.h"
17
18namespace llvm {
19namespace json {
20class Path;
21class Value;
22} // namespace json
23} // namespace llvm
24
25namespace circt {
26namespace firrtl {
27
28/// Deserialize a JSON value into FIRRTL Annotations. Annotations are
29/// represented as a Target-keyed arrays of attributes. The input JSON value is
30/// checked, at runtime, to be an array of objects. Returns true if successful,
31/// false if unsuccessful.
32bool importAnnotationsFromJSONRaw(llvm::json::Value &value,
33 SmallVectorImpl<Attribute> &annotations,
34 llvm::json::Path path, MLIRContext *context);
35
36} // namespace firrtl
37} // namespace circt
38
39#endif // CIRCT_DIALECT_FIRRTL_IMPORT_FIRANNOTATIONS_H
bool importAnnotationsFromJSONRaw(llvm::json::Value &value, SmallVectorImpl< Attribute > &annotations, llvm::json::Path path, MLIRContext *context)
Deserialize a JSON value into FIRRTL Annotations.
The InstanceGraph op interface, see InstanceGraphInterface.td for more details.