Migrating LLVM API usage on main

This patch migrates the compiler off of the deprecated LLVM APIs where I
can.

 - APInt::getAllOnesValue -> APInt::getAllOnes
 - APInt::getNullValue -> APInt::getZero
 - APInt::isNullValue -> APInt::isZero
 - APInt::getMinSignedBits -> APInt::getSignificantBits
 - clang::Module::submodule_{begin,end} -> clang::Module::submodules
This commit is contained in:
Evan Wilde
2023-07-13 11:22:35 -07:00
parent 1cf3b64e22
commit 83b044f5fb
10 changed files with 29 additions and 30 deletions

View File

@@ -31,10 +31,10 @@ struct WidthPreservingAPIntDenseMapInfo {
// for the value, then use a parser that always produces values with
// minimal bit-widths so that we don't get a conflict.
static inline APInt getEmptyKey() {
return APInt::getAllOnesValue(/*bitwidth*/2);
return APInt::getAllOnes(/*bitwidth*/2);
}
static inline APInt getTombstoneKey() {
return APInt::getAllOnesValue(/*bitwidth*/3);
return APInt::getAllOnes(/*bitwidth*/3);
}
static unsigned getHashValue(const APInt &Key) {