14#ifndef LLVM_ADT_DENSEMAPINFOVARIANT_H
15#define LLVM_ADT_DENSEMAPINFOVARIANT_H
26 using FirstT = std::variant_alternative_t<0, Variant>;
30 [&Val](
auto &&Alternative) {
31 using T = std::decay_t<
decltype(Alternative)>;
35 Val.index(), Alternative);
41 if (
LHS.index() !=
RHS.index())
43 if (
LHS.valueless_by_exception())
48 const void *ErasedLHS =
49 std::visit([](
const auto &
LHS) ->
const void * {
return &
LHS; },
LHS);
51 [&](
const auto &
RHS) ->
bool {
52 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.
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...