MCPcopy Create free account
hub / github.com/GANGE666/xVMP / getRealPath

Method getRealPath

src/unittests/Support/VirtualFileSystemTest.cpp:76–89  ·  view source on GitHub ↗

Map any symlink to "/symlink".

Source from the content-addressed store, hash-verified

74 }
75 // Map any symlink to "/symlink".
76 std::error_code getRealPath(const Twine &Path,
77 SmallVectorImpl<char> &Output) const override {
78 auto I = FilesAndDirs.find(Path.str());
79 if (I == FilesAndDirs.end())
80 return make_error_code(llvm::errc::no_such_file_or_directory);
81 if (I->second.isSymlink()) {
82 Output.clear();
83 Twine("/symlink").toVector(Output);
84 return std::error_code();
85 }
86 Output.clear();
87 Path.toVector(Output);
88 return std::error_code();
89 }
90
91 struct DirIterImpl : public llvm::vfs::detail::DirIterImpl {
92 std::map<std::string, vfs::Status> &FilesAndDirs;

Callers 2

TESTFunction · 0.45
TEST_FFunction · 0.45

Calls 8

isSymlinkMethod · 0.80
toVectorMethod · 0.80
make_error_codeFunction · 0.70
TwineClass · 0.50
findMethod · 0.45
strMethod · 0.45
endMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected