Skip to content

Commit d35ad7d

Browse files
committed
Fix Windows CI
1 parent d94a632 commit d35ad7d

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

llvm/lib/Support/VirtualFileSystem.cpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1908,7 +1908,12 @@ class llvm::vfs::RedirectingFileSystemParser {
19081908
FullPath = FS->getOverlayFileDir();
19091909
assert(!FullPath.empty() &&
19101910
"External contents prefix directory must exist");
1911-
llvm::sys::path::append(FullPath, Value);
1911+
SmallString<256> AbsFullPath = Value;
1912+
if (FS->makeAbsolute(FullPath, AbsFullPath)) {
1913+
error(N, "failed to make 'external-contents' absolute");
1914+
return nullptr;
1915+
}
1916+
FullPath = AbsFullPath;
19121917
} else {
19131918
FullPath = Value;
19141919
}
@@ -2204,7 +2209,7 @@ RedirectingFileSystem::create(std::unique_ptr<MemoryBuffer> Buffer,
22042209
// FS->OverlayFileDir => /<absolute_path_to>/dummy.cache/vfs
22052210
//
22062211
SmallString<256> OverlayAbsDir = sys::path::parent_path(YAMLFilePath);
2207-
std::error_code EC = ExternalFS->makeAbsolute(OverlayAbsDir);
2212+
std::error_code EC = FS->makeAbsolute(OverlayAbsDir);
22082213
assert(!EC && "Overlay dir final path must be absolute");
22092214
(void)EC;
22102215
FS->setOverlayFileDir(OverlayAbsDir);

0 commit comments

Comments
 (0)