diff --git a/docs/ProgrammersManual.html b/docs/ProgrammersManual.html index 3bec325d6ce..49a76ee4147 100644 --- a/docs/ProgrammersManual.html +++ b/docs/ProgrammersManual.html @@ -64,6 +64,7 @@ option
  • <deque>
  • <list>
  • llvm/ADT/ilist.h
  • +
  • llvm/ADT/PackedVector.h
  • Other Sequential Container Options
  • Set-Like Containers (std::set, SmallSet, SetVector, etc) @@ -1067,6 +1068,44 @@ Related classes of interest are explained in the following subsections: + +

    + llvm/ADT/PackedVector.h +

    + +
    +

    +Useful for storing a vector of values using only a few number of bits for each +value. Apart from the standard operations of a vector-like container, it can +also perform an 'or' set operation. +

    + +

    For example:

    + +
    +
    +enum State {
    +    None = 0x0,
    +    FirstCondition = 0x1,
    +    SecondCondition = 0x2,
    +    Both = 0x3
    +};
    +
    +State get() {
    +    PackedVector<State, 2> Vec1;
    +    Vec1.push_back(FirstCondition);
    +
    +    PackedVector<State, 2> Vec2;
    +    Vec2.push_back(SecondCondition);
    +
    +    Vec1 |= Vec2;
    +    return Vec1[0]; // returns 'Both'.
    +}
    +
    +
    + +
    +

    ilist_traits