Skip to content

Commit b52275c

Browse files
committed
Remove DenseMapInfo::getEmptyKey() and getTombstoneKey()
LLVM removed getEmptyKey(), as of #201998, and getTombstoneKey() as of #200959.
1 parent 9771937 commit b52275c

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

include/llvm-dialects/TableGen/Format.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232

3333
#include "llvm/ADT/DenseMap.h"
3434
#include "llvm/ADT/StringMap.h"
35+
#include "llvm/Config/llvm-config.h"
3536
#include "llvm/Support/FormatVariadic.h"
3637
#include <optional>
3738

@@ -88,12 +89,16 @@ class FmtContext {
8889
struct PHKindInfo : llvm::DenseMapInfo<PHKind> {
8990
using CharInfo = DenseMapInfo<char>;
9091

92+
#if LLVM_MAIN_REVISION && LLVM_MAIN_REVISION < 583382
9193
static inline PHKind getEmptyKey() {
9294
return static_cast<PHKind>(CharInfo::getEmptyKey());
9395
}
96+
#endif
97+
#if LLVM_MAIN_REVISION && LLVM_MAIN_REVISION < 582772
9498
static inline PHKind getTombstoneKey() {
9599
return static_cast<PHKind>(CharInfo::getTombstoneKey());
96100
}
101+
#endif
97102
static unsigned getHashValue(const PHKind &val) {
98103
return CharInfo::getHashValue(static_cast<char>(val));
99104
}

0 commit comments

Comments
 (0)