diff --git a/src/rose/rose_build_dump.cpp b/src/rose/rose_build_dump.cpp index 5e176c30..a33e653a 100644 --- a/src/rose/rose_build_dump.cpp +++ b/src/rose/rose_build_dump.cpp @@ -273,14 +273,18 @@ void dumpRoseGraph(const RoseBuild &build_base, const RoseEngine *t, const RoseBuildImpl &build = dynamic_cast(build_base); const Grey &grey = build.cc.grey; - if (!grey.dumpFlags) { + + /* "early" rose graphs should only be dumped if we are dumping intermediate + * graphs. Early graphs can be identified by the lack of a RoseEngine. */ + u32 flag_test = t ? Grey::DUMP_IMPL : Grey::DUMP_INT_GRAPH; + + if (!(grey.dumpFlags & flag_test)) { return; } stringstream ss; ss << grey.dumpPath << filename; - DEBUG_PRINTF("dumping graph to %s\n", ss.str().c_str()); ofstream os(ss.str()); diff --git a/src/rose/rose_in_dump.cpp b/src/rose/rose_in_dump.cpp index 899e50c4..97aefdc4 100644 --- a/src/rose/rose_in_dump.cpp +++ b/src/rose/rose_in_dump.cpp @@ -51,7 +51,7 @@ namespace ue2 { void dumpPreRoseGraph(const RoseInGraph &ig, const Grey &grey, const char *filename) { - if (!grey.dumpFlags) { + if (!(grey.dumpFlags & Grey::DUMP_INT_GRAPH)) { return; }