14#ifndef LLVM_ADT_DENSEMAPINFOVARIANT_H
15#define LLVM_ADT_DENSEMAPINFOVARIANT_H
26 using FirstT = std::variant_alternative_t<0, Variant>;
33 return Variant(std::in_place_index<0>,
39 [&Val](
auto &&Alternative) {
40 using T = std::decay_t<
decltype(Alternative)>;
44 Val.index(), Alternative);
50 if (
LHS.index() !=
RHS.index())
52 if (
LHS.valueless_by_exception())
57 const void *ErasedLHS =
58 std::visit([](
const auto &
LHS) ->
const void * {
return &
LHS; },
LHS);
60 [&](
const auto &
RHS) ->
bool {
61 using T = std::remove_cv_t<std::remove_reference_t<
decltype(
RHS)>>;
This file defines DenseMapInfo traits for DenseMap.
This is an optimization pass for GlobalISel generic memory operations.
Implement std::hash so that hash_code can be used in STL containers.
static Variant getEmptyKey()
std::variant< Ts... > Variant
static unsigned getHashValue(const Variant &Val)
static bool isEqual(const Variant &LHS, const Variant &RHS)
std::variant_alternative_t< 0, Variant > FirstT
static Variant getTombstoneKey()
An information struct used to provide DenseMap with the various necessary components for a given valu...