File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change 1212#include " llvm/IR/Function.h"
1313#include " llvm/IR/LLVMContext.h"
1414#include " llvm/IR/Module.h"
15+ #include " llvm/Testing/Support/SupportHelpers.h"
1516#include " llvm/Support/SourceMgr.h"
1617#include " llvm/Support/raw_ostream.h"
1718#include " gtest/gtest.h"
@@ -56,7 +57,10 @@ class GraphWriterTest : public testing::Test {
5657static void writeCFGToDotFile (Function &F, std::string Name,
5758 bool CFGOnly = false ) {
5859 std::error_code EC;
59- raw_fd_ostream File (Name + " .dot" , EC, sys::fs::OpenFlags::OF_Text);
60+ llvm::unittest::TempDir Tmp (" tmpdir" , /* Unique=*/ true );
61+ SmallString<128 > FileName (Tmp.path ().begin (), Tmp.path ().end ());
62+ sys::path::append (FileName, Name + " .dot" );
63+ raw_fd_ostream File (FileName, EC, sys::fs::OpenFlags::OF_Text);
6064
6165 DOTFuncInfo CFGInfo (&F);
6266
You can’t perform that action at this time.
0 commit comments