Convert the CFG traversal tests to file tests.

Add a "cfg_postorder:" printout to the "test domtree" file tests and use
that to check the computed CFG post-order instead of doing it manually
with Rust code.
This commit is contained in:
Jakob Stoklund Olesen
2017-12-08 13:54:19 -08:00
parent a7eb13a151
commit 7d5f2f0404
10 changed files with 125 additions and 240 deletions

View File

@@ -46,7 +46,7 @@ impl<'a> CFGPrinter<'a> {
}
fn header(&self, w: &mut Write) -> Result {
writeln!(w, "digraph {} {{", self.func.name)?;
writeln!(w, "digraph \"{}\" {{", self.func.name)?;
if let Some(entry) = self.func.layout.entry_block() {
writeln!(w, " {{rank=min; {}}}", entry)?;
}