Updating API usages

LLVM deprecated, renamed, and removed a bunch of APIs. This patch
contains a lot of the changes needed to deal with that.

The SetVector type changed the template parameters.

APInt updated multiple names, countPopulation became popcount,
getAllOnesValue became getAllOnes, getNullValue became getZero, etc...

Clang type nullability check stopped taking a clang AST context.

The LLVM IRGen Function type stopped exposing basic block list directly,
but gained enough API surface that the translation isn't too bad.
(GenControl.cpp, LLVMMergeFunctions.cpp)

llvm::Optional had a transform function. That was being used in a couple
of places, so I've added a new implementation under STLExtras that
transforms valid optionals, otherwise it returns nullopt.
This commit is contained in:
Evan Wilde
2023-07-11 16:07:29 -07:00
parent 88cec51070
commit 8ce6ee8dd1
19 changed files with 74 additions and 70 deletions

View File

@@ -49,6 +49,7 @@ DependencyTracker::addDependency(StringRef File, bool IsSystem) {
// dimension, which we accept and pass along to the clang DependencyCollector.
clangCollector->maybeAddDependency(File, /*FromModule=*/false,
IsSystem, /*IsModuleFile=*/false,
/* FileManager=*/ nullptr,
/*IsMissing=*/false);
}