llvm::ImutAVLFactory::splitLookup

Splits T around key K into lesser and greater trees.

Synopsis

Declared in <llvm/ADT/ImmutableSet.h>

void
splitLookup(
    TreeTy* T,
    key_type_ref K,
    TreeTy*& L,
    value_type const*& Match,
    TreeTy*& R);

Description

L receives all keys less than K and R all keys greater than K. If K is present in T, Match is set to point at its element (which is dropped from L and R); otherwise Match is null.

Parameters

NameDescription
TTree to split (may be null).
KSplit key.
LSet to the tree of keys less than K.
MatchSet to the matched element, or null if absent.
RSet to the tree of keys greater than K.