make rose responsible for dumping its bytecode

This commit is contained in:
Alex Coyte
2017-03-16 15:30:33 +11:00
committed by Matthew Barr
parent aeba9bc42c
commit de52b30c3e
6 changed files with 65 additions and 86 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, Intel Corporation
* Copyright (c) 2015-2017, Intel Corporation
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -29,30 +29,40 @@
#ifndef ROSE_BUILD_DUMP_H
#define ROSE_BUILD_DUMP_H
#include <string>
#include <vector>
struct RoseEngine;
namespace ue2 {
class RoseBuild;
class RoseBuildImpl;
struct Grey;
struct hwlmLiteral;
#ifdef DUMP_SUPPORT
// Dump the Rose graph in graphviz representation.
void dumpRoseGraph(const RoseBuild &build, const RoseEngine *t,
void dumpRoseGraph(const RoseBuildImpl &build, const RoseEngine *t,
const char *filename);
void dumpRose(const RoseBuild &build_base, const RoseEngine *t,
const Grey &grey);
void dumpRose(const RoseBuildImpl &build, const RoseEngine *t);
void dumpMatcherLiterals(const std::vector<hwlmLiteral> &lits,
const std::string &name, const Grey &grey);
#else
static UNUSED
void dumpRoseGraph(const RoseBuild &, const RoseEngine *, const char *) {
void dumpRoseGraph(const RoseBuildImpl &, const RoseEngine *, const char *) {
}
static UNUSED
void dumpRose(const RoseBuild &, const RoseEngine *, const Grey &) {
void dumpRose(const RoseBuildImpl &, const RoseEngine *) {
}
static UNUSED
void dumpMatcherLiterals(const std::vector<hwlmLiteral> &, const std::string &,
const Grey &) {
}
#endif
} // namespace ue2