Home | History | Annotate | Download | only in DebugIR

Lines Matching defs:Path

24 #include "llvm/Support/Path.h"
56 /// Attempts to remove file at Path and returns true if it existed, or false if
58 bool removeIfExists(StringRef Path) {
61 std::error_code EC = sys::fs::remove(Path, false);
83 /// Returns a concatenated path string consisting of Dir and Filename
85 SmallVector<char, 8> Path;
86 sys::path::append(Path, Dir, Filename);
87 Path.resize(Dir.size() + Filename.size() + 2);
88 Path[Dir.size() + Filename.size() + 1] = '\0';
89 return string(Path.data());
102 string Path(getPath(Dir, File));
104 M.reset(createEmptyModule(Path));
111 ASSERT_FALSE(removeIfExists(Path)) << "Unexpected file " << Path;
120 string Path;
121 D->runOnModule(*M, Path);
124 ASSERT_TRUE(removeIfExists(Path)) << "Missing expected file at " << Path;
133 string Path;
134 D->runOnModule(*M, Path);
137 ASSERT_TRUE(removeIfExists(Path)) << "Missing expected file at " << Path;
142 // Test empty named Module that is to be output to path specified at Module
151 string Path;
152 D->runOnModule(*M, Path);
155 ASSERT_EQ(ExpectedPath, Path);
158 ASSERT_TRUE(removeIfExists(Path)) << "Missing expected file at " << Path;
161 // Test an empty unnamed module generates an output file whose path is specified
169 string Path;
170 D->runOnModule(*M, Path);
173 ASSERT_EQ(ExpectedPath, Path);
176 ASSERT_TRUE(removeIfExists(Path)) << "Missing expected file at " << Path;
179 // Test an empty named module generates an output file at the path specified
189 string Path;
190 D->runOnModule(*M, Path);
193 ASSERT_EQ(ExpectedPath, Path);
196 ASSERT_TRUE(removeIfExists(Path)) << "Missing expected file at " << Path;
198 // verify DebugIR did not generate a file at the path specified at Module
200 ASSERT_FALSE(removeIfExists(UnexpectedPath)) << "Unexpected file " << Path;
213 string Path;
214 D->runOnModule(*M, Path);
215 ASSERT_EQ(ExpectedPath, Path);
218 ASSERT_FALSE(removeIfExists(Path)) << "Unexpected file " << Path;
231 string Path;
232 D->runOnModule(*M, Path);
233 ASSERT_EQ(ExpectedPath, Path);
236 ASSERT_TRUE(removeIfExists(Path)) << "Missing expected file at " << Path;
239 // Test a non-empty unnamed module is output to a path specified at DebugIR
249 string Path;
250 D->runOnModule(*M, Path);
253 ASSERT_EQ(ExpectedPath, Path);
256 ASSERT_TRUE(removeIfExists(Path)) << "Missing expected file at " << Path;
275 string Path;
276 D->runOnModule(*M, Path);
277 ASSERT_EQ(ExpectedPath, Path);
280 ASSERT_FALSE(removeIfExists(Path)) << "Unexpected file " << Path;