versioner: Port to clang-r344140
This commit updates bionic versioner to use clang-r344140. To be
specific, this commit renames `clang::vfs::FileSystem` to
`llvm::vfs::FileSystem` and updates the headers.
Bug: 111759196
Test: bionic/tools/versioner/run_tests.py
Change-Id: I304ecae79da5a1638ae755dac92b52e314019cf1
diff --git a/tools/versioner/src/Driver.cpp b/tools/versioner/src/Driver.cpp
index 7c4aa23..8ba3d42 100644
--- a/tools/versioner/src/Driver.cpp
+++ b/tools/versioner/src/Driver.cpp
@@ -29,7 +29,6 @@
#include <clang/AST/ASTConsumer.h>
#include <clang/Basic/Diagnostic.h>
#include <clang/Basic/TargetInfo.h>
-#include <clang/Basic/VirtualFileSystem.h>
#include <clang/Driver/Compilation.h>
#include <clang/Driver/Driver.h>
#include <clang/Frontend/CompilerInstance.h>
@@ -42,6 +41,7 @@
#include <llvm/ADT/IntrusiveRefCntPtr.h>
#include <llvm/ADT/SmallVector.h>
#include <llvm/ADT/StringRef.h>
+#include <llvm/Support/VirtualFileSystem.h>
#include "Arch.h"
#include "DeclarationDatabase.h"
@@ -93,7 +93,7 @@
// Run it once to generate flags for each target, and memoize the results.
static std::unordered_map<CompilationType, std::vector<std::string>> cc1_flags;
static const char* filename_placeholder = "__VERSIONER_PLACEHOLDER__";
-static void generateTargetCC1Flags(llvm::IntrusiveRefCntPtr<clang::vfs::FileSystem> vfs,
+static void generateTargetCC1Flags(llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem> vfs,
CompilationType type,
const std::vector<std::string>& include_dirs) {
std::vector<std::string> cmd = { "versioner" };
@@ -207,7 +207,7 @@
return result;
}
-void initializeTargetCC1FlagCache(llvm::IntrusiveRefCntPtr<clang::vfs::FileSystem> vfs,
+void initializeTargetCC1FlagCache(llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem> vfs,
const std::set<CompilationType>& types,
const std::unordered_map<Arch, CompilationRequirements>& reqs) {
if (!cc1_flags.empty()) {
@@ -242,7 +242,7 @@
}
}
-void compileHeader(llvm::IntrusiveRefCntPtr<clang::vfs::FileSystem> vfs,
+void compileHeader(llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem> vfs,
HeaderDatabase* header_database, CompilationType type,
const std::string& filename) {
auto diags = constructDiags();