Update LLVM and fix related breaks (#3237)

Updates to a recent LLVM commit.

The patch file changes because there's now an upstream BUILD.bazel for
compiler-rt in the overlay, although it still doesn't expose the
libfuzzer target, so we need to keep patching it.

Clang's FileManager API changed slightly so we update migrate_cpp for
that.
This commit is contained in:
Jon Ross-Perkins
2023-09-15 00:03:05 +00:00
committed by GitHub
parent 4bed4887b4
commit c66283b7c8
3 changed files with 20 additions and 20 deletions
+3 -3
View File
@@ -17,10 +17,10 @@ static void InitReplacements(RefactoringTool* tool) {
clang::FileManager& files = tool->getFiles();
Carbon::Matcher::ReplacementMap& repl = tool->getReplacements();
for (const std::string& path : tool->getSourcePaths()) {
llvm::ErrorOr<const clang::FileEntry*> file = files.getFile(path);
if (file.getError()) {
llvm::Expected<clang::FileEntryRef> file = files.getFileRef(path);
if (!file) {
llvm::report_fatal_error(llvm::Twine("Error accessing `") + path +
"`: " + file.getError().message() + "\n");
"`: " + llvm::toString(file.takeError()) + "\n");
}
repl.insert({files.getCanonicalName(*file).str(), {}});
}