CIRCT  20.0.0git
ExportFIRRTL.cpp
Go to the documentation of this file.
1 //===- ExportFIRRTL.cpp - C Interface to ExportFIRRTL ---------------------===//
2 //
3 // Implements a C Interface for export FIRRTL.
4 //
5 //===----------------------------------------------------------------------===//
6 
7 #include "circt-c/ExportFIRRTL.h"
8 
11 #include "mlir/CAPI/IR.h"
12 #include "mlir/CAPI/Support.h"
13 #include "mlir/CAPI/Utils.h"
14 #include "llvm/Support/raw_ostream.h"
15 
16 using namespace circt;
17 using namespace firrtl;
18 
19 MlirLogicalResult mlirExportFIRRTL(MlirModule module,
20  MlirStringCallback callback,
21  void *userData) {
22  mlir::detail::CallbackOstream stream(callback, userData);
23  return wrap(exportFIRFile(unwrap(module), stream, {}, exportFIRVersion));
24 }
return wrap(CMemoryType::get(unwrap(ctx), baseType, numElements))
MlirLogicalResult mlirExportFIRRTL(MlirModule module, MlirStringCallback callback, void *userData)
Emits FIRRTL for the specified module using the provided callback and user data.
static EvaluatorValuePtr unwrap(OMEvaluatorValue c)
Definition: OM.cpp:113
mlir::LogicalResult exportFIRFile(mlir::ModuleOp module, llvm::raw_ostream &os, std::optional< size_t > targetLineLength, FIRVersion version)
constexpr FIRVersion exportFIRVersion
The version of FIRRTL that the exporter produces.
Definition: FIRParser.h:139
The InstanceGraph op interface, see InstanceGraphInterface.td for more details.
Definition: DebugAnalysis.h:21