15#define GEN_PASS_DEF_PRINTTESTNAMESPASS
16#include "circt/Dialect/RTG/Transforms/RTGPasses.h.inc"
28struct PrintTestNamesPass
29 :
public rtg::impl::PrintTestNamesPassBase<PrintTestNamesPass> {
31 void runOnOperation()
override;
35void PrintTestNamesPass::runOnOperation() {
37 return mlir::emitError(UnknownLoc::get(&getContext()));
40 return signalPassFailure();
42 llvm::raw_ostream &os = output->os();
44 for (
auto testOp : getOperation().getOps<
rtg::TestOp>())
45 os << testOp.getSymName() <<
"," << testOp.getTemplateName() <<
"\n";
48 markAllAnalysesPreserved();
The InstanceGraph op interface, see InstanceGraphInterface.td for more details.
std::unique_ptr< llvm::ToolOutputFile > createOutputFile(StringRef filename, StringRef dirname, function_ref< InFlightDiagnostic()> emitError)
Creates an output file with the given filename in the specified directory.