aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Support/FileCollector.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2023-02-11 12:38:04 +0000
committerDimitry Andric <dim@FreeBSD.org>2023-02-11 12:38:11 +0000
commite3b557809604d036af6e00c60f012c2025b59a5e (patch)
tree8a11ba2269a3b669601e2fd41145b174008f4da8 /llvm/lib/Support/FileCollector.cpp
parent08e8dd7b9db7bb4a9de26d44c1cbfd24e869c014 (diff)
Diffstat (limited to 'llvm/lib/Support/FileCollector.cpp')
-rw-r--r--llvm/lib/Support/FileCollector.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/Support/FileCollector.cpp b/llvm/lib/Support/FileCollector.cpp
index 5854baeebbb9..c0ce6b5d74e8 100644
--- a/llvm/lib/Support/FileCollector.cpp
+++ b/llvm/lib/Support/FileCollector.cpp
@@ -50,7 +50,9 @@ static bool isCaseSensitivePath(StringRef Path) {
}
FileCollector::FileCollector(std::string Root, std::string OverlayRoot)
- : Root(std::move(Root)), OverlayRoot(std::move(OverlayRoot)) {
+ : Root(Root), OverlayRoot(OverlayRoot) {
+ assert(sys::path::is_absolute(Root) && "Root not absolute");
+ assert(sys::path::is_absolute(OverlayRoot) && "OverlayRoot not absolute");
}
void FileCollector::PathCanonicalizer::updateWithRealPath(