14#ifndef LLVM_ADT_DENSEMAPINFOVARIANT_H
15#define LLVM_ADT_DENSEMAPINFOVARIANT_H
26 using FirstT = std::variant_alternative_t<0, Variant>;
34 [&Val](
auto &&Alternative) {
35 using T = std::decay_t<
decltype(Alternative)>;
39 Val.index(), Alternative);
45 if (
LHS.index() !=
RHS.index())
47 if (
LHS.valueless_by_exception())
52 const void *ErasedLHS =
53 std::visit([](
const auto &
LHS) ->
const void * {
return &
LHS; },
LHS);
55 [&](
const auto &
RHS) ->
bool {
56 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
An information struct used to provide DenseMap with the various necessary components for a given valu...