From e3b557809604d036af6e00c60f012c2025b59a5e Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Sat, 11 Feb 2023 13:38:04 +0100 Subject: Vendor import of llvm-project main llvmorg-16-init-18548-gb0daacf58f41, the last commit before the upstream release/17.x branch was created. --- llvm/lib/Support/FileCollector.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'llvm/lib/Support/FileCollector.cpp') 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( -- cgit v1.2.3