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 12
12
#include " llvm/IR/Function.h"
13
13
#include " llvm/IR/LLVMContext.h"
14
14
#include " llvm/IR/Module.h"
15
+ #include " llvm/Testing/Support/SupportHelpers.h"
15
16
#include " llvm/Support/SourceMgr.h"
16
17
#include " llvm/Support/raw_ostream.h"
17
18
#include " gtest/gtest.h"
@@ -56,7 +57,10 @@ class GraphWriterTest : public testing::Test {
56
57
static void writeCFGToDotFile (Function &F, std::string Name,
57
58
bool CFGOnly = false ) {
58
59
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);
60
64
61
65
DOTFuncInfo CFGInfo (&F);
62
66
You can’t perform that action at this time.
0 commit comments