Coverage Report

Created: 2018-12-11 17:59

/Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/llvm/include/llvm/ADT/ImmutableList.h
Line
Count
Source (jump to first uncovered line)
1
//==--- ImmutableList.h - Immutable (functional) list interface --*- C++ -*-==//
2
//
3
//                     The LLVM Compiler Infrastructure
4
//
5
// This file is distributed under the University of Illinois Open Source
6
// License. See LICENSE.TXT for details.
7
//
8
//===----------------------------------------------------------------------===//
9
//
10
// This file defines the ImmutableList class.
11
//
12
//===----------------------------------------------------------------------===//
13
14
#ifndef LLVM_ADT_IMMUTABLELIST_H
15
#define LLVM_ADT_IMMUTABLELIST_H
16
17
#include "llvm/ADT/FoldingSet.h"
18
#include "llvm/Support/Allocator.h"
19
#include <cassert>
20
#include <cstdint>
21
#include <new>
22
23
namespace llvm {
24
25
template <typename T> class ImmutableListFactory;
26
27
template <typename T>
28
class ImmutableListImpl : public FoldingSetNode {
29
  friend class ImmutableListFactory<T>;
30
31
  T Head;
32
  const ImmutableListImpl* Tail;
33
34
  template <typename ElemT>
35
  ImmutableListImpl(ElemT &&head, const ImmutableListImpl *tail = nullptr)
36
2.17k
    : Head(std::forward<ElemT>(head)), Tail(tail) {}
llvm::ImmutableListImpl<clang::ento::MemRegion const*>::ImmutableListImpl<clang::ento::MemRegion const*&>(clang::ento::MemRegion const*&&&, llvm::ImmutableListImpl<clang::ento::MemRegion const*> const*)
Line
Count
Source
36
46
    : Head(std::forward<ElemT>(head)), Tail(tail) {}
UninitializedObjectChecker.cpp:llvm::ImmutableListImpl<clang::ento::FieldNode const&>::ImmutableListImpl<(anonymous namespace)::RegularField const&>((anonymous namespace)::RegularField const&&&, llvm::ImmutableListImpl<clang::ento::FieldNode const&> const*)
Line
Count
Source
36
120
    : Head(std::forward<ElemT>(head)), Tail(tail) {}
UninitializedObjectChecker.cpp:llvm::ImmutableListImpl<clang::ento::FieldNode const&>::ImmutableListImpl<(anonymous namespace)::BaseClass const&>((anonymous namespace)::BaseClass const&&&, llvm::ImmutableListImpl<clang::ento::FieldNode const&> const*)
Line
Count
Source
36
39
    : Head(std::forward<ElemT>(head)), Tail(tail) {}
UninitializedPointee.cpp:llvm::ImmutableListImpl<clang::ento::FieldNode const&>::ImmutableListImpl<(anonymous namespace)::LocField const&>((anonymous namespace)::LocField const&&&, llvm::ImmutableListImpl<clang::ento::FieldNode const&> const*)
Line
Count
Source
36
60
    : Head(std::forward<ElemT>(head)), Tail(tail) {}
UninitializedPointee.cpp:llvm::ImmutableListImpl<clang::ento::FieldNode const&>::ImmutableListImpl<(anonymous namespace)::CyclicLocField const&>((anonymous namespace)::CyclicLocField const&&&, llvm::ImmutableListImpl<clang::ento::FieldNode const&> const*)
Line
Count
Source
36
6
    : Head(std::forward<ElemT>(head)), Tail(tail) {}
UninitializedPointee.cpp:llvm::ImmutableListImpl<clang::ento::FieldNode const&>::ImmutableListImpl<(anonymous namespace)::NeedsCastLocField const&>((anonymous namespace)::NeedsCastLocField const&&&, llvm::ImmutableListImpl<clang::ento::FieldNode const&> const*)
Line
Count
Source
36
15
    : Head(std::forward<ElemT>(head)), Tail(tail) {}
llvm::ImmutableListImpl<clang::CXXBaseSpecifier const*>::ImmutableListImpl<clang::CXXBaseSpecifier const*&>(clang::CXXBaseSpecifier const*&&&, llvm::ImmutableListImpl<clang::CXXBaseSpecifier const*> const*)
Line
Count
Source
36
22
    : Head(std::forward<ElemT>(head)), Tail(tail) {}
llvm::ImmutableListImpl<clang::ento::SVal>::ImmutableListImpl<clang::ento::SVal&>(clang::ento::SVal&&&, llvm::ImmutableListImpl<clang::ento::SVal> const*)
Line
Count
Source
36
1.73k
    : Head(std::forward<ElemT>(head)), Tail(tail) {}
llvm::ImmutableListImpl<LoopState>::ImmutableListImpl<LoopState&>(LoopState&&&, llvm::ImmutableListImpl<LoopState> const*)
Line
Count
Source
36
130
    : Head(std::forward<ElemT>(head)), Tail(tail) {}
37
38
public:
39
  ImmutableListImpl(const ImmutableListImpl &) = delete;
40
  ImmutableListImpl &operator=(const ImmutableListImpl &) = delete;
41
42
17.4k
  const T& getHead() const { return Head; }
llvm::ImmutableListImpl<clang::ento::SVal>::getHead() const
Line
Count
Source
42
5.52k
  const T& getHead() const { return Head; }
llvm::ImmutableListImpl<clang::ento::MemRegion const*>::getHead() const
Line
Count
Source
42
33
  const T& getHead() const { return Head; }
llvm::ImmutableListImpl<clang::ento::FieldNode const&>::getHead() const
Line
Count
Source
42
1.04k
  const T& getHead() const { return Head; }
llvm::ImmutableListImpl<LoopState>::getHead() const
Line
Count
Source
42
10.8k
  const T& getHead() const { return Head; }
llvm::ImmutableListImpl<clang::CXXBaseSpecifier const*>::getHead() const
Line
Count
Source
42
21
  const T& getHead() const { return Head; }
43
6.47k
  const ImmutableListImpl* getTail() const { return Tail; }
llvm::ImmutableListImpl<clang::ento::MemRegion const*>::getTail() const
Line
Count
Source
43
29
  const ImmutableListImpl* getTail() const { return Tail; }
llvm::ImmutableListImpl<clang::ento::FieldNode const&>::getTail() const
Line
Count
Source
43
764
  const ImmutableListImpl* getTail() const { return Tail; }
llvm::ImmutableListImpl<LoopState>::getTail() const
Line
Count
Source
43
165
  const ImmutableListImpl* getTail() const { return Tail; }
llvm::ImmutableListImpl<clang::ento::SVal>::getTail() const
Line
Count
Source
43
5.49k
  const ImmutableListImpl* getTail() const { return Tail; }
llvm::ImmutableListImpl<clang::CXXBaseSpecifier const*>::getTail() const
Line
Count
Source
43
21
  const ImmutableListImpl* getTail() const { return Tail; }
44
45
  static inline void Profile(FoldingSetNodeID& ID, const T& H,
46
3.01k
                             const ImmutableListImpl* L){
47
3.01k
    ID.AddPointer(L);
48
3.01k
    ID.Add(H);
49
3.01k
  }
llvm::ImmutableListImpl<clang::ento::MemRegion const*>::Profile(llvm::FoldingSetNodeID&, clang::ento::MemRegion const* const&, llvm::ImmutableListImpl<clang::ento::MemRegion const*> const*)
Line
Count
Source
46
60
                             const ImmutableListImpl* L){
47
60
    ID.AddPointer(L);
48
60
    ID.Add(H);
49
60
  }
llvm::ImmutableListImpl<clang::ento::FieldNode const&>::Profile(llvm::FoldingSetNodeID&, clang::ento::FieldNode const&, llvm::ImmutableListImpl<clang::ento::FieldNode const&> const*)
Line
Count
Source
46
433
                             const ImmutableListImpl* L){
47
433
    ID.AddPointer(L);
48
433
    ID.Add(H);
49
433
  }
llvm::ImmutableListImpl<clang::CXXBaseSpecifier const*>::Profile(llvm::FoldingSetNodeID&, clang::CXXBaseSpecifier const* const&, llvm::ImmutableListImpl<clang::CXXBaseSpecifier const*> const*)
Line
Count
Source
46
35
                             const ImmutableListImpl* L){
47
35
    ID.AddPointer(L);
48
35
    ID.Add(H);
49
35
  }
llvm::ImmutableListImpl<clang::ento::SVal>::Profile(llvm::FoldingSetNodeID&, clang::ento::SVal const&, llvm::ImmutableListImpl<clang::ento::SVal> const*)
Line
Count
Source
46
2.23k
                             const ImmutableListImpl* L){
47
2.23k
    ID.AddPointer(L);
48
2.23k
    ID.Add(H);
49
2.23k
  }
llvm::ImmutableListImpl<LoopState>::Profile(llvm::FoldingSetNodeID&, LoopState const&, llvm::ImmutableListImpl<LoopState> const*)
Line
Count
Source
46
248
                             const ImmutableListImpl* L){
47
248
    ID.AddPointer(L);
48
248
    ID.Add(H);
49
248
  }
50
51
460
  void Profile(FoldingSetNodeID& ID) {
52
460
    Profile(ID, Head, Tail);
53
460
  }
llvm::ImmutableListImpl<clang::ento::MemRegion const*>::Profile(llvm::FoldingSetNodeID&)
Line
Count
Source
51
7
  void Profile(FoldingSetNodeID& ID) {
52
7
    Profile(ID, Head, Tail);
53
7
  }
llvm::ImmutableListImpl<clang::ento::FieldNode const&>::Profile(llvm::FoldingSetNodeID&)
Line
Count
Source
51
98
  void Profile(FoldingSetNodeID& ID) {
52
98
    Profile(ID, Head, Tail);
53
98
  }
llvm::ImmutableListImpl<clang::CXXBaseSpecifier const*>::Profile(llvm::FoldingSetNodeID&)
Line
Count
Source
51
7
  void Profile(FoldingSetNodeID& ID) {
52
7
    Profile(ID, Head, Tail);
53
7
  }
llvm::ImmutableListImpl<clang::ento::SVal>::Profile(llvm::FoldingSetNodeID&)
Line
Count
Source
51
288
  void Profile(FoldingSetNodeID& ID) {
52
288
    Profile(ID, Head, Tail);
53
288
  }
llvm::ImmutableListImpl<LoopState>::Profile(llvm::FoldingSetNodeID&)
Line
Count
Source
51
60
  void Profile(FoldingSetNodeID& ID) {
52
60
    Profile(ID, Head, Tail);
53
60
  }
54
};
55
56
/// ImmutableList - This class represents an immutable (functional) list.
57
///  It is implemented as a smart pointer (wraps ImmutableListImpl), so it
58
///  it is intended to always be copied by value as if it were a pointer.
59
///  This interface matches ImmutableSet and ImmutableMap.  ImmutableList
60
///  objects should almost never be created directly, and instead should
61
///  be created by ImmutableListFactory objects that manage the lifetime
62
///  of a group of lists.  When the factory object is reclaimed, all lists
63
///  created by that factory are released as well.
64
template <typename T>
65
class ImmutableList {
66
public:
67
  using value_type = T;
68
  using Factory = ImmutableListFactory<T>;
69
70
  static_assert(std::is_trivially_destructible<T>::value,
71
                "T must be trivially destructible!");
72
73
private:
74
  const ImmutableListImpl<T>* X;
75
76
public:
77
  // This constructor should normally only be called by ImmutableListFactory<T>.
78
  // There may be cases, however, when one needs to extract the internal pointer
79
  // and reconstruct a list object from that pointer.
80
15.3k
  ImmutableList(const ImmutableListImpl<T>* x = nullptr) : X(x) {}
llvm::ImmutableList<clang::ento::MemRegion const*>::ImmutableList(llvm::ImmutableListImpl<clang::ento::MemRegion const*> const*)
Line
Count
Source
80
181
  ImmutableList(const ImmutableListImpl<T>* x = nullptr) : X(x) {}
llvm::ImmutableList<clang::ento::FieldNode const&>::ImmutableList(llvm::ImmutableListImpl<clang::ento::FieldNode const&> const*)
Line
Count
Source
80
1.65k
  ImmutableList(const ImmutableListImpl<T>* x = nullptr) : X(x) {}
llvm::ImmutableList<clang::CXXBaseSpecifier const*>::ImmutableList(llvm::ImmutableListImpl<clang::CXXBaseSpecifier const*> const*)
Line
Count
Source
80
71
  ImmutableList(const ImmutableListImpl<T>* x = nullptr) : X(x) {}
llvm::ImmutableList<clang::ento::SVal>::ImmutableList(llvm::ImmutableListImpl<clang::ento::SVal> const*)
Line
Count
Source
80
5.33k
  ImmutableList(const ImmutableListImpl<T>* x = nullptr) : X(x) {}
llvm::ImmutableList<LoopState>::ImmutableList(llvm::ImmutableListImpl<LoopState> const*)
Line
Count
Source
80
8.12k
  ImmutableList(const ImmutableListImpl<T>* x = nullptr) : X(x) {}
81
82
7.29k
  const ImmutableListImpl<T>* getInternalPointer() const {
83
7.29k
    return X;
84
7.29k
  }
llvm::ImmutableList<clang::ento::MemRegion const*>::getInternalPointer() const
Line
Count
Source
82
135
  const ImmutableListImpl<T>* getInternalPointer() const {
83
135
    return X;
84
135
  }
llvm::ImmutableList<clang::ento::FieldNode const&>::getInternalPointer() const
Line
Count
Source
82
1.08k
  const ImmutableListImpl<T>* getInternalPointer() const {
83
1.08k
    return X;
84
1.08k
  }
llvm::ImmutableList<clang::ento::SVal>::getInternalPointer() const
Line
Count
Source
82
5.46k
  const ImmutableListImpl<T>* getInternalPointer() const {
83
5.46k
    return X;
84
5.46k
  }
llvm::ImmutableList<clang::CXXBaseSpecifier const*>::getInternalPointer() const
Line
Count
Source
82
63
  const ImmutableListImpl<T>* getInternalPointer() const {
83
63
    return X;
84
63
  }
llvm::ImmutableList<LoopState>::getInternalPointer() const
Line
Count
Source
82
541
  const ImmutableListImpl<T>* getInternalPointer() const {
83
541
    return X;
84
541
  }
85
86
  class iterator {
87
    const ImmutableListImpl<T>* L = nullptr;
88
89
  public:
90
3.24k
    iterator() = default;
Unexecuted instantiation: llvm::ImmutableList<clang::ento::MemRegion const*>::iterator::iterator()
llvm::ImmutableList<clang::ento::FieldNode const&>::iterator::iterator()
Line
Count
Source
90
754
    iterator() = default;
llvm::ImmutableList<clang::ento::SVal>::iterator::iterator()
Line
Count
Source
90
2.48k
    iterator() = default;
llvm::ImmutableList<clang::CXXBaseSpecifier const*>::iterator::iterator()
Line
Count
Source
90
11
    iterator() = default;
91
3.25k
    iterator(ImmutableList l) : L(l.getInternalPointer()) {}
Unexecuted instantiation: llvm::ImmutableList<clang::ento::MemRegion const*>::iterator::iterator(llvm::ImmutableList<clang::ento::MemRegion const*>)
llvm::ImmutableList<clang::ento::FieldNode const&>::iterator::iterator(llvm::ImmutableList<clang::ento::FieldNode const&>)
Line
Count
Source
91
754
    iterator(ImmutableList l) : L(l.getInternalPointer()) {}
llvm::ImmutableList<clang::ento::SVal>::iterator::iterator(llvm::ImmutableList<clang::ento::SVal>)
Line
Count
Source
91
2.48k
    iterator(ImmutableList l) : L(l.getInternalPointer()) {}
llvm::ImmutableList<clang::CXXBaseSpecifier const*>::iterator::iterator(llvm::ImmutableList<clang::CXXBaseSpecifier const*>)
Line
Count
Source
91
7
    iterator(ImmutableList l) : L(l.getInternalPointer()) {}
92
93
6.00k
    iterator& operator++() { L = L->getTail(); return *this; }
Unexecuted instantiation: llvm::ImmutableList<clang::ento::MemRegion const*>::iterator::operator++()
llvm::ImmutableList<clang::ento::FieldNode const&>::iterator::operator++()
Line
Count
Source
93
482
    iterator& operator++() { L = L->getTail(); return *this; }
llvm::ImmutableList<clang::ento::SVal>::iterator::operator++()
Line
Count
Source
93
5.49k
    iterator& operator++() { L = L->getTail(); return *this; }
llvm::ImmutableList<clang::CXXBaseSpecifier const*>::iterator::operator++()
Line
Count
Source
93
21
    iterator& operator++() { L = L->getTail(); return *this; }
94
3.98k
    bool operator==(const iterator& I) const { return L == I.L; }
95
3.99k
    bool operator!=(const iterator& I) const { return L != I.L; }
Unexecuted instantiation: llvm::ImmutableList<clang::ento::MemRegion const*>::iterator::operator!=(llvm::ImmutableList<clang::ento::MemRegion const*>::iterator const&) const
llvm::ImmutableList<clang::ento::FieldNode const&>::iterator::operator!=(llvm::ImmutableList<clang::ento::FieldNode const&>::iterator const&) const
Line
Count
Source
95
1.23k
    bool operator!=(const iterator& I) const { return L != I.L; }
llvm::ImmutableList<clang::ento::SVal>::iterator::operator!=(llvm::ImmutableList<clang::ento::SVal>::iterator const&) const
Line
Count
Source
95
2.72k
    bool operator!=(const iterator& I) const { return L != I.L; }
llvm::ImmutableList<clang::CXXBaseSpecifier const*>::iterator::operator!=(llvm::ImmutableList<clang::CXXBaseSpecifier const*>::iterator const&) const
Line
Count
Source
95
30
    bool operator!=(const iterator& I) const { return L != I.L; }
96
6.03k
    const value_type& operator*() const { return L->getHead(); }
llvm::ImmutableList<clang::ento::SVal>::iterator::operator*() const
Line
Count
Source
96
5.52k
    const value_type& operator*() const { return L->getHead(); }
Unexecuted instantiation: llvm::ImmutableList<clang::ento::MemRegion const*>::iterator::operator*() const
llvm::ImmutableList<clang::ento::FieldNode const&>::iterator::operator*() const
Line
Count
Source
96
486
    const value_type& operator*() const { return L->getHead(); }
llvm::ImmutableList<clang::CXXBaseSpecifier const*>::iterator::operator*() const
Line
Count
Source
96
21
    const value_type& operator*() const { return L->getHead(); }
97
    const typename std::remove_reference<value_type>::type* operator->() const {
98
      return &L->getHead();
99
    }
100
101
    ImmutableList getList() const { return L; }
102
  };
103
104
  /// begin - Returns an iterator referring to the head of the list, or
105
  ///  an iterator denoting the end of the list if the list is empty.
106
3.25k
  iterator begin() const { return iterator(X); }
Unexecuted instantiation: llvm::ImmutableList<clang::ento::MemRegion const*>::begin() const
llvm::ImmutableList<clang::ento::FieldNode const&>::begin() const
Line
Count
Source
106
754
  iterator begin() const { return iterator(X); }
llvm::ImmutableList<clang::ento::SVal>::begin() const
Line
Count
Source
106
2.48k
  iterator begin() const { return iterator(X); }
llvm::ImmutableList<clang::CXXBaseSpecifier const*>::begin() const
Line
Count
Source
106
7
  iterator begin() const { return iterator(X); }
107
108
  /// end - Returns an iterator denoting the end of the list.  This iterator
109
  ///  does not refer to a valid list element.
110
3.24k
  iterator end() const { return iterator(); }
Unexecuted instantiation: llvm::ImmutableList<clang::ento::MemRegion const*>::end() const
llvm::ImmutableList<clang::ento::FieldNode const&>::end() const
Line
Count
Source
110
754
  iterator end() const { return iterator(); }
llvm::ImmutableList<clang::ento::SVal>::end() const
Line
Count
Source
110
2.48k
  iterator end() const { return iterator(); }
llvm::ImmutableList<clang::CXXBaseSpecifier const*>::end() const
Line
Count
Source
110
7
  iterator end() const { return iterator(); }
111
112
  /// isEmpty - Returns true if the list is empty.
113
8.23k
  bool isEmpty() const { return !X; }
llvm::ImmutableList<clang::ento::MemRegion const*>::isEmpty() const
Line
Count
Source
113
46
  bool isEmpty() const { return !X; }
llvm::ImmutableList<clang::ento::FieldNode const&>::isEmpty() const
Line
Count
Source
113
496
  bool isEmpty() const { return !X; }
llvm::ImmutableList<LoopState>::isEmpty() const
Line
Count
Source
113
7.69k
  bool isEmpty() const { return !X; }
114
115
  bool contains(const T& V) const {
116
    for (iterator I = begin(), E = end(); I != E; ++I) {
117
      if (*I == V)
118
        return true;
119
    }
120
    return false;
121
  }
122
123
  /// isEqual - Returns true if two lists are equal.  Because all lists created
124
  ///  from the same ImmutableListFactory are uniqued, this has O(1) complexity
125
  ///  because it the contents of the list do not need to be compared.  Note
126
  ///  that you should only compare two lists created from the same
127
  ///  ImmutableListFactory.
128
  bool isEqual(const ImmutableList& L) const { return X == L.X; }
129
130
  bool operator==(const ImmutableList& L) const { return isEqual(L); }
131
132
  /// getHead - Returns the head of the list.
133
11.3k
  const T& getHead() const {
134
11.3k
    assert(!isEmpty() && "Cannot get the head of an empty list.");
135
11.3k
    return X->getHead();
136
11.3k
  }
llvm::ImmutableList<clang::ento::MemRegion const*>::getHead() const
Line
Count
Source
133
33
  const T& getHead() const {
134
33
    assert(!isEmpty() && "Cannot get the head of an empty list.");
135
33
    return X->getHead();
136
33
  }
llvm::ImmutableList<clang::ento::FieldNode const&>::getHead() const
Line
Count
Source
133
554
  const T& getHead() const {
134
554
    assert(!isEmpty() && "Cannot get the head of an empty list.");
135
554
    return X->getHead();
136
554
  }
llvm::ImmutableList<LoopState>::getHead() const
Line
Count
Source
133
10.8k
  const T& getHead() const {
134
10.8k
    assert(!isEmpty() && "Cannot get the head of an empty list.");
135
10.8k
    return X->getHead();
136
10.8k
  }
137
138
  /// getTail - Returns the tail of the list, which is another (possibly empty)
139
  ///  ImmutableList.
140
476
  ImmutableList getTail() const {
141
476
    return X ? X->getTail() : 
nullptr0
;
142
476
  }
llvm::ImmutableList<clang::ento::MemRegion const*>::getTail() const
Line
Count
Source
140
29
  ImmutableList getTail() const {
141
29
    return X ? X->getTail() : 
nullptr0
;
142
29
  }
llvm::ImmutableList<clang::ento::FieldNode const&>::getTail() const
Line
Count
Source
140
282
  ImmutableList getTail() const {
141
282
    return X ? X->getTail() : 
nullptr0
;
142
282
  }
llvm::ImmutableList<LoopState>::getTail() const
Line
Count
Source
140
165
  ImmutableList getTail() const {
141
165
    return X ? X->getTail() : 
nullptr0
;
142
165
  }
143
144
  void Profile(FoldingSetNodeID& ID) const {
145
    ID.AddPointer(X);
146
  }
147
};
148
149
template <typename T>
150
class ImmutableListFactory {
151
  using ListTy = ImmutableListImpl<T>;
152
  using CacheTy = FoldingSet<ListTy>;
153
154
  CacheTy Cache;
155
  uintptr_t Allocator;
156
157
20.5k
  bool ownsAllocator() const {
158
20.5k
    return (Allocator & 0x1) == 0;
159
20.5k
  }
llvm::ImmutableListFactory<clang::ento::MemRegion const*>::ownsAllocator() const
Line
Count
Source
157
37
  bool ownsAllocator() const {
158
37
    return (Allocator & 0x1) == 0;
159
37
  }
llvm::ImmutableListFactory<clang::ento::FieldNode const&>::ownsAllocator() const
Line
Count
Source
157
254
  bool ownsAllocator() const {
158
254
    return (Allocator & 0x1) == 0;
159
254
  }
llvm::ImmutableListFactory<clang::CXXBaseSpecifier const*>::ownsAllocator() const
Line
Count
Source
157
10.0k
  bool ownsAllocator() const {
158
10.0k
    return (Allocator & 0x1) == 0;
159
10.0k
  }
llvm::ImmutableListFactory<clang::ento::SVal>::ownsAllocator() const
Line
Count
Source
157
10.0k
  bool ownsAllocator() const {
158
10.0k
    return (Allocator & 0x1) == 0;
159
10.0k
  }
llvm::ImmutableListFactory<LoopState>::ownsAllocator() const
Line
Count
Source
157
86
  bool ownsAllocator() const {
158
86
    return (Allocator & 0x1) == 0;
159
86
  }
160
161
2.42k
  BumpPtrAllocator& getAllocator() const {
162
2.42k
    return *reinterpret_cast<BumpPtrAllocator*>(Allocator & ~0x1);
163
2.42k
  }
llvm::ImmutableListFactory<clang::ento::MemRegion const*>::getAllocator() const
Line
Count
Source
161
46
  BumpPtrAllocator& getAllocator() const {
162
46
    return *reinterpret_cast<BumpPtrAllocator*>(Allocator & ~0x1);
163
46
  }
llvm::ImmutableListFactory<clang::ento::FieldNode const&>::getAllocator() const
Line
Count
Source
161
494
  BumpPtrAllocator& getAllocator() const {
162
494
    return *reinterpret_cast<BumpPtrAllocator*>(Allocator & ~0x1);
163
494
  }
llvm::ImmutableListFactory<clang::CXXBaseSpecifier const*>::getAllocator() const
Line
Count
Source
161
22
  BumpPtrAllocator& getAllocator() const {
162
22
    return *reinterpret_cast<BumpPtrAllocator*>(Allocator & ~0x1);
163
22
  }
llvm::ImmutableListFactory<clang::ento::SVal>::getAllocator() const
Line
Count
Source
161
1.73k
  BumpPtrAllocator& getAllocator() const {
162
1.73k
    return *reinterpret_cast<BumpPtrAllocator*>(Allocator & ~0x1);
163
1.73k
  }
llvm::ImmutableListFactory<LoopState>::getAllocator() const
Line
Count
Source
161
130
  BumpPtrAllocator& getAllocator() const {
162
130
    return *reinterpret_cast<BumpPtrAllocator*>(Allocator & ~0x1);
163
130
  }
164
165
public:
166
  ImmutableListFactory()
167
254
    : Allocator(reinterpret_cast<uintptr_t>(new BumpPtrAllocator())) {}
168
169
  ImmutableListFactory(BumpPtrAllocator& Alloc)
170
20.3k
  : Allocator(reinterpret_cast<uintptr_t>(&Alloc) | 0x1) {}
llvm::ImmutableListFactory<clang::ento::MemRegion const*>::ImmutableListFactory(llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096ul, 4096ul>&)
Line
Count
Source
170
37
  : Allocator(reinterpret_cast<uintptr_t>(&Alloc) | 0x1) {}
llvm::ImmutableListFactory<LoopState>::ImmutableListFactory(llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096ul, 4096ul>&)
Line
Count
Source
170
86
  : Allocator(reinterpret_cast<uintptr_t>(&Alloc) | 0x1) {}
llvm::ImmutableListFactory<clang::ento::SVal>::ImmutableListFactory(llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096ul, 4096ul>&)
Line
Count
Source
170
10.0k
  : Allocator(reinterpret_cast<uintptr_t>(&Alloc) | 0x1) {}
llvm::ImmutableListFactory<clang::CXXBaseSpecifier const*>::ImmutableListFactory(llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096ul, 4096ul>&)
Line
Count
Source
170
10.0k
  : Allocator(reinterpret_cast<uintptr_t>(&Alloc) | 0x1) {}
171
172
20.5k
  ~ImmutableListFactory() {
173
20.5k
    if (ownsAllocator()) 
delete &getAllocator()254
;
174
20.5k
  }
llvm::ImmutableListFactory<clang::ento::MemRegion const*>::~ImmutableListFactory()
Line
Count
Source
172
37
  ~ImmutableListFactory() {
173
37
    if (ownsAllocator()) 
delete &getAllocator()0
;
174
37
  }
llvm::ImmutableListFactory<clang::ento::FieldNode const&>::~ImmutableListFactory()
Line
Count
Source
172
254
  ~ImmutableListFactory() {
173
254
    if (ownsAllocator()) delete &getAllocator();
174
254
  }
llvm::ImmutableListFactory<clang::CXXBaseSpecifier const*>::~ImmutableListFactory()
Line
Count
Source
172
10.0k
  ~ImmutableListFactory() {
173
10.0k
    if (ownsAllocator()) 
delete &getAllocator()0
;
174
10.0k
  }
llvm::ImmutableListFactory<clang::ento::SVal>::~ImmutableListFactory()
Line
Count
Source
172
10.0k
  ~ImmutableListFactory() {
173
10.0k
    if (ownsAllocator()) 
delete &getAllocator()0
;
174
10.0k
  }
llvm::ImmutableListFactory<LoopState>::~ImmutableListFactory()
Line
Count
Source
172
86
  ~ImmutableListFactory() {
173
86
    if (ownsAllocator()) 
delete &getAllocator()0
;
174
86
  }
175
176
  template <typename ElemT>
177
2.55k
  LLVM_NODISCARD ImmutableList<T> concat(ElemT &&Head, ImmutableList<T> Tail) {
178
2.55k
    // Profile the new list to see if it already exists in our cache.
179
2.55k
    FoldingSetNodeID ID;
180
2.55k
    void* InsertPos;
181
2.55k
182
2.55k
    const ListTy* TailImpl = Tail.getInternalPointer();
183
2.55k
    ListTy::Profile(ID, Head, TailImpl);
184
2.55k
    ListTy* L = Cache.FindNodeOrInsertPos(ID, InsertPos);
185
2.55k
186
2.55k
    if (!L) {
187
2.17k
      // The list does not exist in our cache.  Create it.
188
2.17k
      BumpPtrAllocator& A = getAllocator();
189
2.17k
      L = (ListTy*) A.Allocate<ListTy>();
190
2.17k
      new (L) ListTy(std::forward<ElemT>(Head), TailImpl);
191
2.17k
192
2.17k
      // Insert the new list into the cache.
193
2.17k
      Cache.InsertNode(L, InsertPos);
194
2.17k
    }
195
2.55k
196
2.55k
    return L;
197
2.55k
  }
llvm::ImmutableList<clang::ento::MemRegion const*> llvm::ImmutableListFactory<clang::ento::MemRegion const*>::concat<clang::ento::MemRegion const*&>(clang::ento::MemRegion const*&&&, llvm::ImmutableList<clang::ento::MemRegion const*>)
Line
Count
Source
177
53
  LLVM_NODISCARD ImmutableList<T> concat(ElemT &&Head, ImmutableList<T> Tail) {
178
53
    // Profile the new list to see if it already exists in our cache.
179
53
    FoldingSetNodeID ID;
180
53
    void* InsertPos;
181
53
182
53
    const ListTy* TailImpl = Tail.getInternalPointer();
183
53
    ListTy::Profile(ID, Head, TailImpl);
184
53
    ListTy* L = Cache.FindNodeOrInsertPos(ID, InsertPos);
185
53
186
53
    if (!L) {
187
46
      // The list does not exist in our cache.  Create it.
188
46
      BumpPtrAllocator& A = getAllocator();
189
46
      L = (ListTy*) A.Allocate<ListTy>();
190
46
      new (L) ListTy(std::forward<ElemT>(Head), TailImpl);
191
46
192
46
      // Insert the new list into the cache.
193
46
      Cache.InsertNode(L, InsertPos);
194
46
    }
195
53
196
53
    return L;
197
53
  }
UninitializedObjectChecker.cpp:llvm::ImmutableList<clang::ento::FieldNode const&> llvm::ImmutableListFactory<clang::ento::FieldNode const&>::concat<(anonymous namespace)::RegularField const&>((anonymous namespace)::RegularField const&&&, llvm::ImmutableList<clang::ento::FieldNode const&>)
Line
Count
Source
177
160
  LLVM_NODISCARD ImmutableList<T> concat(ElemT &&Head, ImmutableList<T> Tail) {
178
160
    // Profile the new list to see if it already exists in our cache.
179
160
    FoldingSetNodeID ID;
180
160
    void* InsertPos;
181
160
182
160
    const ListTy* TailImpl = Tail.getInternalPointer();
183
160
    ListTy::Profile(ID, Head, TailImpl);
184
160
    ListTy* L = Cache.FindNodeOrInsertPos(ID, InsertPos);
185
160
186
160
    if (!L) {
187
120
      // The list does not exist in our cache.  Create it.
188
120
      BumpPtrAllocator& A = getAllocator();
189
120
      L = (ListTy*) A.Allocate<ListTy>();
190
120
      new (L) ListTy(std::forward<ElemT>(Head), TailImpl);
191
120
192
120
      // Insert the new list into the cache.
193
120
      Cache.InsertNode(L, InsertPos);
194
120
    }
195
160
196
160
    return L;
197
160
  }
UninitializedObjectChecker.cpp:llvm::ImmutableList<clang::ento::FieldNode const&> llvm::ImmutableListFactory<clang::ento::FieldNode const&>::concat<(anonymous namespace)::BaseClass const&>((anonymous namespace)::BaseClass const&&&, llvm::ImmutableList<clang::ento::FieldNode const&>)
Line
Count
Source
177
80
  LLVM_NODISCARD ImmutableList<T> concat(ElemT &&Head, ImmutableList<T> Tail) {
178
80
    // Profile the new list to see if it already exists in our cache.
179
80
    FoldingSetNodeID ID;
180
80
    void* InsertPos;
181
80
182
80
    const ListTy* TailImpl = Tail.getInternalPointer();
183
80
    ListTy::Profile(ID, Head, TailImpl);
184
80
    ListTy* L = Cache.FindNodeOrInsertPos(ID, InsertPos);
185
80
186
80
    if (!L) {
187
39
      // The list does not exist in our cache.  Create it.
188
39
      BumpPtrAllocator& A = getAllocator();
189
39
      L = (ListTy*) A.Allocate<ListTy>();
190
39
      new (L) ListTy(std::forward<ElemT>(Head), TailImpl);
191
39
192
39
      // Insert the new list into the cache.
193
39
      Cache.InsertNode(L, InsertPos);
194
39
    }
195
80
196
80
    return L;
197
80
  }
UninitializedPointee.cpp:llvm::ImmutableList<clang::ento::FieldNode const&> llvm::ImmutableListFactory<clang::ento::FieldNode const&>::concat<(anonymous namespace)::LocField const&>((anonymous namespace)::LocField const&&&, llvm::ImmutableList<clang::ento::FieldNode const&>)
Line
Count
Source
177
74
  LLVM_NODISCARD ImmutableList<T> concat(ElemT &&Head, ImmutableList<T> Tail) {
178
74
    // Profile the new list to see if it already exists in our cache.
179
74
    FoldingSetNodeID ID;
180
74
    void* InsertPos;
181
74
182
74
    const ListTy* TailImpl = Tail.getInternalPointer();
183
74
    ListTy::Profile(ID, Head, TailImpl);
184
74
    ListTy* L = Cache.FindNodeOrInsertPos(ID, InsertPos);
185
74
186
74
    if (!L) {
187
60
      // The list does not exist in our cache.  Create it.
188
60
      BumpPtrAllocator& A = getAllocator();
189
60
      L = (ListTy*) A.Allocate<ListTy>();
190
60
      new (L) ListTy(std::forward<ElemT>(Head), TailImpl);
191
60
192
60
      // Insert the new list into the cache.
193
60
      Cache.InsertNode(L, InsertPos);
194
60
    }
195
74
196
74
    return L;
197
74
  }
UninitializedPointee.cpp:llvm::ImmutableList<clang::ento::FieldNode const&> llvm::ImmutableListFactory<clang::ento::FieldNode const&>::concat<(anonymous namespace)::CyclicLocField const&>((anonymous namespace)::CyclicLocField const&&&, llvm::ImmutableList<clang::ento::FieldNode const&>)
Line
Count
Source
177
6
  LLVM_NODISCARD ImmutableList<T> concat(ElemT &&Head, ImmutableList<T> Tail) {
178
6
    // Profile the new list to see if it already exists in our cache.
179
6
    FoldingSetNodeID ID;
180
6
    void* InsertPos;
181
6
182
6
    const ListTy* TailImpl = Tail.getInternalPointer();
183
6
    ListTy::Profile(ID, Head, TailImpl);
184
6
    ListTy* L = Cache.FindNodeOrInsertPos(ID, InsertPos);
185
6
186
6
    if (!L) {
187
6
      // The list does not exist in our cache.  Create it.
188
6
      BumpPtrAllocator& A = getAllocator();
189
6
      L = (ListTy*) A.Allocate<ListTy>();
190
6
      new (L) ListTy(std::forward<ElemT>(Head), TailImpl);
191
6
192
6
      // Insert the new list into the cache.
193
6
      Cache.InsertNode(L, InsertPos);
194
6
    }
195
6
196
6
    return L;
197
6
  }
UninitializedPointee.cpp:llvm::ImmutableList<clang::ento::FieldNode const&> llvm::ImmutableListFactory<clang::ento::FieldNode const&>::concat<(anonymous namespace)::NeedsCastLocField const&>((anonymous namespace)::NeedsCastLocField const&&&, llvm::ImmutableList<clang::ento::FieldNode const&>)
Line
Count
Source
177
15
  LLVM_NODISCARD ImmutableList<T> concat(ElemT &&Head, ImmutableList<T> Tail) {
178
15
    // Profile the new list to see if it already exists in our cache.
179
15
    FoldingSetNodeID ID;
180
15
    void* InsertPos;
181
15
182
15
    const ListTy* TailImpl = Tail.getInternalPointer();
183
15
    ListTy::Profile(ID, Head, TailImpl);
184
15
    ListTy* L = Cache.FindNodeOrInsertPos(ID, InsertPos);
185
15
186
15
    if (!L) {
187
15
      // The list does not exist in our cache.  Create it.
188
15
      BumpPtrAllocator& A = getAllocator();
189
15
      L = (ListTy*) A.Allocate<ListTy>();
190
15
      new (L) ListTy(std::forward<ElemT>(Head), TailImpl);
191
15
192
15
      // Insert the new list into the cache.
193
15
      Cache.InsertNode(L, InsertPos);
194
15
    }
195
15
196
15
    return L;
197
15
  }
llvm::ImmutableList<clang::CXXBaseSpecifier const*> llvm::ImmutableListFactory<clang::CXXBaseSpecifier const*>::concat<clang::CXXBaseSpecifier const*&>(clang::CXXBaseSpecifier const*&&&, llvm::ImmutableList<clang::CXXBaseSpecifier const*>)
Line
Count
Source
177
28
  LLVM_NODISCARD ImmutableList<T> concat(ElemT &&Head, ImmutableList<T> Tail) {
178
28
    // Profile the new list to see if it already exists in our cache.
179
28
    FoldingSetNodeID ID;
180
28
    void* InsertPos;
181
28
182
28
    const ListTy* TailImpl = Tail.getInternalPointer();
183
28
    ListTy::Profile(ID, Head, TailImpl);
184
28
    ListTy* L = Cache.FindNodeOrInsertPos(ID, InsertPos);
185
28
186
28
    if (!L) {
187
22
      // The list does not exist in our cache.  Create it.
188
22
      BumpPtrAllocator& A = getAllocator();
189
22
      L = (ListTy*) A.Allocate<ListTy>();
190
22
      new (L) ListTy(std::forward<ElemT>(Head), TailImpl);
191
22
192
22
      // Insert the new list into the cache.
193
22
      Cache.InsertNode(L, InsertPos);
194
22
    }
195
28
196
28
    return L;
197
28
  }
llvm::ImmutableList<clang::ento::SVal> llvm::ImmutableListFactory<clang::ento::SVal>::concat<clang::ento::SVal&>(clang::ento::SVal&&&, llvm::ImmutableList<clang::ento::SVal>)
Line
Count
Source
177
1.94k
  LLVM_NODISCARD ImmutableList<T> concat(ElemT &&Head, ImmutableList<T> Tail) {
178
1.94k
    // Profile the new list to see if it already exists in our cache.
179
1.94k
    FoldingSetNodeID ID;
180
1.94k
    void* InsertPos;
181
1.94k
182
1.94k
    const ListTy* TailImpl = Tail.getInternalPointer();
183
1.94k
    ListTy::Profile(ID, Head, TailImpl);
184
1.94k
    ListTy* L = Cache.FindNodeOrInsertPos(ID, InsertPos);
185
1.94k
186
1.94k
    if (!L) {
187
1.73k
      // The list does not exist in our cache.  Create it.
188
1.73k
      BumpPtrAllocator& A = getAllocator();
189
1.73k
      L = (ListTy*) A.Allocate<ListTy>();
190
1.73k
      new (L) ListTy(std::forward<ElemT>(Head), TailImpl);
191
1.73k
192
1.73k
      // Insert the new list into the cache.
193
1.73k
      Cache.InsertNode(L, InsertPos);
194
1.73k
    }
195
1.94k
196
1.94k
    return L;
197
1.94k
  }
llvm::ImmutableList<LoopState> llvm::ImmutableListFactory<LoopState>::concat<LoopState&>(LoopState&&&, llvm::ImmutableList<LoopState>)
Line
Count
Source
177
188
  LLVM_NODISCARD ImmutableList<T> concat(ElemT &&Head, ImmutableList<T> Tail) {
178
188
    // Profile the new list to see if it already exists in our cache.
179
188
    FoldingSetNodeID ID;
180
188
    void* InsertPos;
181
188
182
188
    const ListTy* TailImpl = Tail.getInternalPointer();
183
188
    ListTy::Profile(ID, Head, TailImpl);
184
188
    ListTy* L = Cache.FindNodeOrInsertPos(ID, InsertPos);
185
188
186
188
    if (!L) {
187
130
      // The list does not exist in our cache.  Create it.
188
130
      BumpPtrAllocator& A = getAllocator();
189
130
      L = (ListTy*) A.Allocate<ListTy>();
190
130
      new (L) ListTy(std::forward<ElemT>(Head), TailImpl);
191
130
192
130
      // Insert the new list into the cache.
193
130
      Cache.InsertNode(L, InsertPos);
194
130
    }
195
188
196
188
    return L;
197
188
  }
198
199
  template <typename ElemT>
200
2.55k
  LLVM_NODISCARD ImmutableList<T> add(ElemT &&Data, ImmutableList<T> L) {
201
2.55k
    return concat(std::forward<ElemT>(Data), L);
202
2.55k
  }
llvm::ImmutableList<clang::ento::MemRegion const*> llvm::ImmutableListFactory<clang::ento::MemRegion const*>::add<clang::ento::MemRegion const*&>(clang::ento::MemRegion const*&&&, llvm::ImmutableList<clang::ento::MemRegion const*>)
Line
Count
Source
200
53
  LLVM_NODISCARD ImmutableList<T> add(ElemT &&Data, ImmutableList<T> L) {
201
53
    return concat(std::forward<ElemT>(Data), L);
202
53
  }
UninitializedObjectChecker.cpp:llvm::ImmutableList<clang::ento::FieldNode const&> llvm::ImmutableListFactory<clang::ento::FieldNode const&>::add<(anonymous namespace)::RegularField const&>((anonymous namespace)::RegularField const&&&, llvm::ImmutableList<clang::ento::FieldNode const&>)
Line
Count
Source
200
160
  LLVM_NODISCARD ImmutableList<T> add(ElemT &&Data, ImmutableList<T> L) {
201
160
    return concat(std::forward<ElemT>(Data), L);
202
160
  }
UninitializedObjectChecker.cpp:llvm::ImmutableList<clang::ento::FieldNode const&> llvm::ImmutableListFactory<clang::ento::FieldNode const&>::add<(anonymous namespace)::BaseClass const&>((anonymous namespace)::BaseClass const&&&, llvm::ImmutableList<clang::ento::FieldNode const&>)
Line
Count
Source
200
80
  LLVM_NODISCARD ImmutableList<T> add(ElemT &&Data, ImmutableList<T> L) {
201
80
    return concat(std::forward<ElemT>(Data), L);
202
80
  }
UninitializedPointee.cpp:llvm::ImmutableList<clang::ento::FieldNode const&> llvm::ImmutableListFactory<clang::ento::FieldNode const&>::add<(anonymous namespace)::LocField const&>((anonymous namespace)::LocField const&&&, llvm::ImmutableList<clang::ento::FieldNode const&>)
Line
Count
Source
200
74
  LLVM_NODISCARD ImmutableList<T> add(ElemT &&Data, ImmutableList<T> L) {
201
74
    return concat(std::forward<ElemT>(Data), L);
202
74
  }
UninitializedPointee.cpp:llvm::ImmutableList<clang::ento::FieldNode const&> llvm::ImmutableListFactory<clang::ento::FieldNode const&>::add<(anonymous namespace)::CyclicLocField const&>((anonymous namespace)::CyclicLocField const&&&, llvm::ImmutableList<clang::ento::FieldNode const&>)
Line
Count
Source
200
6
  LLVM_NODISCARD ImmutableList<T> add(ElemT &&Data, ImmutableList<T> L) {
201
6
    return concat(std::forward<ElemT>(Data), L);
202
6
  }
UninitializedPointee.cpp:llvm::ImmutableList<clang::ento::FieldNode const&> llvm::ImmutableListFactory<clang::ento::FieldNode const&>::add<(anonymous namespace)::NeedsCastLocField const&>((anonymous namespace)::NeedsCastLocField const&&&, llvm::ImmutableList<clang::ento::FieldNode const&>)
Line
Count
Source
200
15
  LLVM_NODISCARD ImmutableList<T> add(ElemT &&Data, ImmutableList<T> L) {
201
15
    return concat(std::forward<ElemT>(Data), L);
202
15
  }
llvm::ImmutableList<clang::CXXBaseSpecifier const*> llvm::ImmutableListFactory<clang::CXXBaseSpecifier const*>::add<clang::CXXBaseSpecifier const*&>(clang::CXXBaseSpecifier const*&&&, llvm::ImmutableList<clang::CXXBaseSpecifier const*>)
Line
Count
Source
200
28
  LLVM_NODISCARD ImmutableList<T> add(ElemT &&Data, ImmutableList<T> L) {
201
28
    return concat(std::forward<ElemT>(Data), L);
202
28
  }
llvm::ImmutableList<clang::ento::SVal> llvm::ImmutableListFactory<clang::ento::SVal>::add<clang::ento::SVal&>(clang::ento::SVal&&&, llvm::ImmutableList<clang::ento::SVal>)
Line
Count
Source
200
1.94k
  LLVM_NODISCARD ImmutableList<T> add(ElemT &&Data, ImmutableList<T> L) {
201
1.94k
    return concat(std::forward<ElemT>(Data), L);
202
1.94k
  }
llvm::ImmutableList<LoopState> llvm::ImmutableListFactory<LoopState>::add<LoopState&>(LoopState&&&, llvm::ImmutableList<LoopState>)
Line
Count
Source
200
188
  LLVM_NODISCARD ImmutableList<T> add(ElemT &&Data, ImmutableList<T> L) {
201
188
    return concat(std::forward<ElemT>(Data), L);
202
188
  }
203
204
  template <typename ...CtorArgs>
205
  LLVM_NODISCARD ImmutableList<T> emplace(ImmutableList<T> Tail,
206
                                          CtorArgs &&...Args) {
207
    return concat(T(std::forward<CtorArgs>(Args)...), Tail);
208
  }
209
210
912
  ImmutableList<T> getEmptyList() const {
211
912
    return ImmutableList<T>(nullptr);
212
912
  }
llvm::ImmutableListFactory<clang::CXXBaseSpecifier const*>::getEmptyList() const
Line
Count
Source
210
12
  ImmutableList<T> getEmptyList() const {
211
12
    return ImmutableList<T>(nullptr);
212
12
  }
llvm::ImmutableListFactory<clang::ento::SVal>::getEmptyList() const
Line
Count
Source
210
900
  ImmutableList<T> getEmptyList() const {
211
900
    return ImmutableList<T>(nullptr);
212
900
  }
213
214
  template <typename ElemT>
215
  ImmutableList<T> create(ElemT &&Data) {
216
    return concat(std::forward<ElemT>(Data), getEmptyList());
217
  }
218
};
219
220
//===----------------------------------------------------------------------===//
221
// Partially-specialized Traits.
222
//===----------------------------------------------------------------------===//
223
224
template<typename T> struct DenseMapInfo;
225
template<typename T> struct DenseMapInfo<ImmutableList<T>> {
226
  static inline ImmutableList<T> getEmptyKey() {
227
    return reinterpret_cast<ImmutableListImpl<T>*>(-1);
228
  }
229
230
  static inline ImmutableList<T> getTombstoneKey() {
231
    return reinterpret_cast<ImmutableListImpl<T>*>(-2);
232
  }
233
234
  static unsigned getHashValue(ImmutableList<T> X) {
235
    uintptr_t PtrVal = reinterpret_cast<uintptr_t>(X.getInternalPointer());
236
    return (unsigned((uintptr_t)PtrVal) >> 4) ^
237
           (unsigned((uintptr_t)PtrVal) >> 9);
238
  }
239
240
  static bool isEqual(ImmutableList<T> X1, ImmutableList<T> X2) {
241
    return X1 == X2;
242
  }
243
};
244
245
template <typename T> struct isPodLike;
246
template <typename T>
247
struct isPodLike<ImmutableList<T>> { static const bool value = true; };
248
249
} // end namespace llvm
250
251
#endif // LLVM_ADT_IMMUTABLELIST_H