File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
mlir/include/mlir/Support Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -395,11 +395,12 @@ namespace llvm {
395
395
template <>
396
396
struct DenseMapInfo <mlir::TypeID> {
397
397
static inline mlir::TypeID getEmptyKey () {
398
- void *pointer = llvm::DenseMapInfo<void *>::getEmptyKey ();
398
+ // Shift by 3 to satisfy the TypeID alignment requirement.
399
+ void *pointer = reinterpret_cast <void *>(uintptr_t (-1 ) << 3 );
399
400
return mlir::TypeID::getFromOpaquePointer (pointer);
400
401
}
401
402
static inline mlir::TypeID getTombstoneKey () {
402
- void *pointer = llvm::DenseMapInfo <void *>:: getTombstoneKey ( );
403
+ void *pointer = reinterpret_cast <void *>( uintptr_t (- 2 ) << 3 );
403
404
return mlir::TypeID::getFromOpaquePointer (pointer);
404
405
}
405
406
static unsigned getHashValue (mlir::TypeID val) {
You can’t perform that action at this time.
0 commit comments