[BuildSystem] Fix the check for dbPath relativeness.
- Also, support URL style dbPath arguments, in particular for using in hitting
SQLite's in memory implementation. In the future we might also want to
standardize on URL style arguments as a way to get to alternate backing
databases.
diff --git a/lib/BuildSystem/BuildSystemFrontend.cpp b/lib/BuildSystem/BuildSystemFrontend.cpp
index 24f0003..a2a0aae 100644
--- a/lib/BuildSystem/BuildSystemFrontend.cpp
+++ b/lib/BuildSystem/BuildSystemFrontend.cpp
@@ -434,7 +434,7 @@
// file.
SmallString<256> tmp;
StringRef dbPath = invocation.dbPath;
- if (llvm::sys::path::has_relative_path(invocation.dbPath)) {
+ if (llvm::sys::path::is_relative(invocation.dbPath) && dbPath.find("://") == StringRef::npos && !dbPath.startswith(":")) {
llvm::sys::path::append(
tmp, llvm::sys::path::parent_path(invocation.buildFilePath),
invocation.dbPath);