Skip to content

Commit

Permalink
[easy] Clean up temporary files
Browse files Browse the repository at this point in the history
  • Loading branch information
bertmaher authored and rdzhabarov committed Nov 8, 2018
1 parent e8d9562 commit b44b9a7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions lib/Graph/Graph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@ void Module::dumpDAG() {
llvm::SmallString<64> dotPath;
llvm::sys::fs::createTemporaryFile("dotty_graph_dump", "dot", dotPath);
dumpDAG(dotPath);
llvm::sys::fs::remove(dotPath);
}

void Module::dumpDAG(llvm::StringRef dotFilename) {
Expand Down Expand Up @@ -2177,6 +2178,7 @@ void Function::dumpDAG() {
llvm::SmallString<64> dotPath;
llvm::sys::fs::createTemporaryFile("dotty_graph_dump", "dot", dotPath);
dumpDAG(dotPath);
llvm::sys::fs::remove(dotPath);
}

void Function::dumpDAG(llvm::StringRef dotFilename) {
Expand Down
2 changes: 1 addition & 1 deletion tests/unittests/quantizationTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ void testSerialization(const std::vector<NodeQuantizationInfo> &expected) {
serializeToYaml(filePath, expected);
std::vector<NodeQuantizationInfo> deserialized =
deserializeFromYaml(filePath);

llvm::sys::fs::remove(filePath);
EXPECT_EQ(expected, deserialized);
}

Expand Down

0 comments on commit b44b9a7

Please sign in to comment.