CIRCT  19.0.0git
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 #include "llvm/ADT/SmallVector.h"
18 
19 namespace llvm {
20 namespace json {
21 class Path;
22 class Value;
23 } // namespace json
24 } // namespace llvm
25 
26 namespace circt {
27 namespace firrtl {
28 
29 /// Deserialize a JSON value into FIRRTL Annotations. Annotations are
30 /// represented as a Target-keyed arrays of attributes. The input JSON value is
31 /// checked, at runtime, to be an array of objects. Returns true if successful,
32 /// false if unsuccessful.
33 bool importAnnotationsFromJSONRaw(llvm::json::Value &value,
34  SmallVectorImpl<Attribute> &annotations,
35  llvm::json::Path path, MLIRContext *context);
36 
37 } // namespace firrtl
38 } // namespace circt
39 
40 #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.
Definition: DebugAnalysis.h:21