Coverage Report

Created: 2020-06-26 05:44

/home/arjun/llvm-project/llvm/include/llvm/ADT/ArrayRef.h
Line
Count
Source (jump to first uncovered line)
1
//===- ArrayRef.h - Array Reference Wrapper ---------------------*- C++ -*-===//
2
//
3
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
// See https://llvm.org/LICENSE.txt for license information.
5
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
//
7
//===----------------------------------------------------------------------===//
8
9
#ifndef LLVM_ADT_ARRAYREF_H
10
#define LLVM_ADT_ARRAYREF_H
11
12
#include "llvm/ADT/Hashing.h"
13
#include "llvm/ADT/None.h"
14
#include "llvm/ADT/SmallVector.h"
15
#include "llvm/ADT/STLExtras.h"
16
#include "llvm/Support/Compiler.h"
17
#include <algorithm>
18
#include <array>
19
#include <cassert>
20
#include <cstddef>
21
#include <initializer_list>
22
#include <iterator>
23
#include <memory>
24
#include <type_traits>
25
#include <vector>
26
27
namespace llvm {
28
29
  /// ArrayRef - Represent a constant reference to an array (0 or more elements
30
  /// consecutively in memory), i.e. a start pointer and a length.  It allows
31
  /// various APIs to take consecutive elements easily and conveniently.
32
  ///
33
  /// This class does not own the underlying data, it is expected to be used in
34
  /// situations where the data resides in some other buffer, whose lifetime
35
  /// extends past that of the ArrayRef. For this reason, it is not in general
36
  /// safe to store an ArrayRef.
37
  ///
38
  /// This is intended to be trivially copyable, so it should be passed by
39
  /// value.
40
  template<typename T>
41
  class LLVM_GSL_POINTER LLVM_NODISCARD ArrayRef {
42
  public:
43
    using iterator = const T *;
44
    using const_iterator = const T *;
45
    using size_type = size_t;
46
    using reverse_iterator = std::reverse_iterator<iterator>;
47
48
  private:
49
    /// The start of the array, in an external buffer.
50
    const T *Data = nullptr;
51
52
    /// The number of elements.
53
    size_type Length = 0;
54
55
  public:
56
    /// @name Constructors
57
    /// @{
58
59
    /// Construct an empty ArrayRef.
60
31
    /*implicit*/ ArrayRef() = default;
_ZN4llvm8ArrayRefINS_8OptionalIN4mlir5ValueEEEEC2Ev
Line
Count
Source
60
31
    /*implicit*/ ArrayRef() = default;
Unexecuted instantiation: _ZN4llvm8ArrayRefINS_7SMRangeEEC2Ev
Unexecuted instantiation: _ZN4llvm8ArrayRefINS_7SMFixItEEC2Ev
Unexecuted instantiation: _ZN4llvm8ArrayRefIcEC2Ev
Unexecuted instantiation: _ZN4llvm8ArrayRefINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEC2Ev
Unexecuted instantiation: _ZN4llvm8ArrayRefINS_9StringRefEEC2Ev
Unexecuted instantiation: _ZN4llvm8ArrayRefIN4mlir5ValueEEC2Ev
Unexecuted instantiation: _ZN4llvm8ArrayRefIN4mlir10AffineExprEEC2Ev
Unexecuted instantiation: _ZN4llvm8ArrayRefIN4mlir9OpOperandEEC2Ev
Unexecuted instantiation: _ZN4llvm8ArrayRefIN4mlir11OpAsmParser11OperandTypeEEC2Ev
Unexecuted instantiation: _ZN4llvm8ArrayRefIN4mlir4TypeEEC2Ev
Unexecuted instantiation: _ZN4llvm8ArrayRefImEC2Ev
Unexecuted instantiation: _ZN4llvm8ArrayRefISt4pairIN4mlir10IdentifierENS2_9AttributeEEEC2Ev
Unexecuted instantiation: _ZN4llvm8ArrayRefIiEC2Ev
Unexecuted instantiation: _ZN4llvm8ArrayRefIN4mlir6detail12ExpectedDiagEEC2Ev
Unexecuted instantiation: _ZN4llvm8ArrayRefIN4mlir9AffineMapEEC2Ev
61
62
    /// Construct an empty ArrayRef from None.
63
0
    /*implicit*/ ArrayRef(NoneType) {}
Unexecuted instantiation: _ZN4llvm8ArrayRefINS_7SMRangeEEC2ENS_8NoneTypeE
Unexecuted instantiation: _ZN4llvm8ArrayRefINS_7SMFixItEEC2ENS_8NoneTypeE
Unexecuted instantiation: _ZN4llvm8ArrayRefIN4mlir5ValueEEC2ENS_8NoneTypeE
Unexecuted instantiation: _ZN4llvm8ArrayRefIN4mlir9AttributeEEC2ENS_8NoneTypeE
Unexecuted instantiation: _ZN4llvm8ArrayRefISt4pairIjS1_IN4mlir10IdentifierENS2_9AttributeEEEEC2ENS_8NoneTypeE
Unexecuted instantiation: _ZN4llvm8ArrayRefIN4mlir11OpAsmParser11OperandTypeEEC2ENS_8NoneTypeE
Unexecuted instantiation: _ZN4llvm8ArrayRefIN4mlir4TypeEEC2ENS_8NoneTypeE
Unexecuted instantiation: _ZN4llvm8ArrayRefISt4pairIN4mlir10IdentifierENS2_9AttributeEEEC2ENS_8NoneTypeE
Unexecuted instantiation: _ZN4llvm8ArrayRefIN4mlir17FlatSymbolRefAttrEEC2ENS_8NoneTypeE
Unexecuted instantiation: _ZN4llvm8ArrayRefIcEC2ENS_8NoneTypeE
Unexecuted instantiation: _ZN4llvm8ArrayRefIlEC2ENS_8NoneTypeE
Unexecuted instantiation: _ZN4llvm8ArrayRefIN4mlir9AffineMapEEC2ENS_8NoneTypeE
64
65
    /// Construct an ArrayRef from a single element.
66
    /*implicit*/ ArrayRef(const T &OneElt)
67
0
      : Data(&OneElt), Length(1) {}
Unexecuted instantiation: _ZN4llvm8ArrayRefINS_7SMRangeEEC2ERKS1_
Unexecuted instantiation: _ZN4llvm8ArrayRefINS_9StringRefEEC2ERKS1_
Unexecuted instantiation: _ZN4llvm8ArrayRefIN4mlir10AffineExprEEC2ERKS2_
Unexecuted instantiation: _ZN4llvm8ArrayRefIbEC2ERKb
Unexecuted instantiation: _ZN4llvm8ArrayRefIN4mlir11OpAsmParser11OperandTypeEEC2ERKS3_
Unexecuted instantiation: _ZN4llvm8ArrayRefIN4mlir4TypeEEC2ERKS2_
Unexecuted instantiation: _ZN4llvm8ArrayRefIN4mlir6RegionEEC2ERKS2_
Unexecuted instantiation: _ZN4llvm8ArrayRefINS_7APFloatEEC2ERKS1_
Unexecuted instantiation: _ZN4llvm8ArrayRefINS_5APIntEEC2ERKS1_
Unexecuted instantiation: _ZN4llvm8ArrayRefIN4mlir9AffineMapEEC2ERKS2_
Unexecuted instantiation: _ZN4llvm8ArrayRefISt4pairIjS1_IN4mlir10IdentifierENS2_9AttributeEEEEC2ERKS6_
Unexecuted instantiation: _ZN4llvm8ArrayRefIcEC2ERKc
Unexecuted instantiation: _ZN4llvm8ArrayRefImEC2ERKm
Unexecuted instantiation: _ZN4llvm8ArrayRefIlEC2ERKl
Unexecuted instantiation: _ZN4llvm8ArrayRefIN4mlir9AttributeEEC2ERKS2_
68
69
    /// Construct an ArrayRef from a pointer and length.
70
    /*implicit*/ ArrayRef(const T *data, size_t length)
71
472
      : Data(data), Length(length) {}
_ZN4llvm8ArrayRefIlEC2EPKlm
Line
Count
Source
71
472
      : Data(data), Length(length) {}
Unexecuted instantiation: _ZN4llvm8ArrayRefIcEC2EPKcm
Unexecuted instantiation: _ZN4llvm8ArrayRefImEC2EPKmm
Unexecuted instantiation: _ZN4llvm8ArrayRefINS_3vfs12YAMLVFSEntryEEC2EPKS2_m
Unexecuted instantiation: _ZN4llvm8ArrayRefIhEC2EPKhm
Unexecuted instantiation: _ZN4llvm8ArrayRefINS_9StringRefEEC2EPKS1_m
Unexecuted instantiation: _ZN4llvm8ArrayRefINS_8OptionalIN4mlir5ValueEEEEC2EPKS4_m
Unexecuted instantiation: _ZN4llvm8ArrayRefIN4mlir6RegionEEC2EPKS2_m
Unexecuted instantiation: _ZN4llvm8ArrayRefIN4mlir10AffineExprEEC2EPKS2_m
Unexecuted instantiation: _ZN4llvm8ArrayRefIN4mlir9OpOperandEEC2EPKS2_m
Unexecuted instantiation: _ZN4llvm8ArrayRefIN4mlir5ValueEEC2EPKS2_m
Unexecuted instantiation: _ZN4llvm8ArrayRefIN4mlir12BlockOperandEEC2EPKS2_m
Unexecuted instantiation: _ZN4llvm8ArrayRefISt4pairIN4mlir10IdentifierENS2_9AttributeEEEC2EPKS5_m
Unexecuted instantiation: _ZN4llvm8ArrayRefIN4mlir17FlatSymbolRefAttrEEC2EPKS2_m
Unexecuted instantiation: _ZN4llvm8ArrayRefIN4mlir9AttributeEEC2EPKS2_m
Unexecuted instantiation: _ZN4llvm8ArrayRefINS_5APIntEEC2EPKS1_m
Unexecuted instantiation: _ZN4llvm8ArrayRefINS_7APFloatEEC2EPKS1_m
Unexecuted instantiation: _ZN4llvm8ArrayRefIN4mlir8LocationEEC2EPKS2_m
Unexecuted instantiation: _ZN4llvm8ArrayRefIbEC2EPKbm
Unexecuted instantiation: _ZN4llvm8ArrayRefIN4mlir4TypeEEC2EPKS2_m
Unexecuted instantiation: _ZN4llvm8ArrayRefIN4mlir9AffineMapEEC2EPKS2_m
Unexecuted instantiation: _ZN4llvm8ArrayRefISt4pairINS_11SmallVectorIiLj1EEEN4mlir13SymbolRefAttrEEEC2EPKS6_m
72
73
    /// Construct an ArrayRef from a range.
74
    ArrayRef(const T *begin, const T *end)
75
0
      : Data(begin), Length(end - begin) {}
Unexecuted instantiation: _ZN4llvm8ArrayRefIcEC2EPKcS3_
Unexecuted instantiation: _ZN4llvm8ArrayRefISt4pairIN4mlir10IdentifierENS2_9AttributeEEEC2EPKS5_S8_
Unexecuted instantiation: _ZN4llvm8ArrayRefISt4pairINS_11SmallVectorIiLj1EEEN4mlir13SymbolRefAttrEEEC2EPKS6_S9_
76
77
    /// Construct an ArrayRef from a SmallVector. This is templated in order to
78
    /// avoid instantiating SmallVectorTemplateCommon<T> whenever we
79
    /// copy-construct an ArrayRef.
80
    template<typename U>
81
    /*implicit*/ ArrayRef(const SmallVectorTemplateCommon<T, U> &Vec)
82
725
      : Data(Vec.data()), Length(Vec.size()) {
83
725
    }
_ZN4llvm8ArrayRefIlEC2IvEERKNS_25SmallVectorTemplateCommonIlT_EE
Line
Count
Source
82
677
      : Data(Vec.data()), Length(Vec.size()) {
83
677
    }
Unexecuted instantiation: _ZN4llvm8ArrayRefImEC2IvEERKNS_25SmallVectorTemplateCommonImT_EE
Unexecuted instantiation: _ZN4llvm8ArrayRefINS_7SMFixItEEC2IvEERKNS_25SmallVectorTemplateCommonIS1_T_EE
Unexecuted instantiation: _ZN4llvm8ArrayRefISt4pairIjjEEC2IvEERKNS_25SmallVectorTemplateCommonIS2_T_EE
Unexecuted instantiation: _ZN4llvm8ArrayRefINS_9StringRefEEC2IvEERKNS_25SmallVectorTemplateCommonIS1_T_EE
Unexecuted instantiation: _ZN4llvm8ArrayRefIN4mlir10AffineExprEEC2IvEERKNS_25SmallVectorTemplateCommonIS2_T_EE
Unexecuted instantiation: _ZN4llvm8ArrayRefIN4mlir5ValueEEC2IvEERKNS_25SmallVectorTemplateCommonIS2_T_EE
Unexecuted instantiation: _ZN4llvm8ArrayRefINS_8OptionalIN4mlir5ValueEEEEC2IvEERKNS_25SmallVectorTemplateCommonIS4_T_EE
Unexecuted instantiation: _ZN4llvm8ArrayRefIbEC2IvEERKNS_25SmallVectorTemplateCommonIbT_EE
Unexecuted instantiation: _ZN4llvm8ArrayRefIN4mlir9AttributeEEC2IvEERKNS_25SmallVectorTemplateCommonIS2_T_EE
Unexecuted instantiation: _ZN4llvm8ArrayRefIN4mlir4TypeEEC2IvEERKNS_25SmallVectorTemplateCommonIS2_T_EE
Unexecuted instantiation: _ZN4llvm8ArrayRefIN4mlir11OpAsmParser11OperandTypeEEC2IvEERKNS_25SmallVectorTemplateCommonIS3_T_EE
_ZN4llvm8ArrayRefIN4mlir7Simplex7UnknownEEC2IvEERKNS_25SmallVectorTemplateCommonIS3_T_EE
Line
Count
Source
82
48
      : Data(Vec.data()), Length(Vec.size()) {
83
48
    }
Unexecuted instantiation: _ZN4llvm8ArrayRefIiEC2IvEERKNS_25SmallVectorTemplateCommonIiT_EE
Unexecuted instantiation: _ZN4llvm8ArrayRefINS_7APFloatEEC2IvEERKNS_25SmallVectorTemplateCommonIS1_T_EE
Unexecuted instantiation: _ZN4llvm8ArrayRefINS_5APIntEEC2IvEERKNS_25SmallVectorTemplateCommonIS1_T_EE
Unexecuted instantiation: _ZN4llvm8ArrayRefISt4pairIN4mlir10IdentifierENS2_9AttributeEEEC2IvEERKNS_25SmallVectorTemplateCommonIS5_T_EE
Unexecuted instantiation: _ZN4llvm8ArrayRefIcEC2IvEERKNS_25SmallVectorTemplateCommonIcT_EE
Unexecuted instantiation: _ZN4llvm8ArrayRefIN4mlir18DiagnosticArgumentEEC2IvEERKNS_25SmallVectorTemplateCommonIS2_T_EE
Unexecuted instantiation: _ZN4llvm8ArrayRefIN4mlir6detail12ExpectedDiagEEC2IvEERKNS_25SmallVectorTemplateCommonIS3_T_EE
Unexecuted instantiation: _ZN4llvm8ArrayRefIN4mlir8LocationEEC2IvEERKNS_25SmallVectorTemplateCommonIS2_T_EE
Unexecuted instantiation: _ZN4llvm8ArrayRefIN4mlir21MutableDictionaryAttrEEC2IvEERKNS_25SmallVectorTemplateCommonIS2_T_EE
Unexecuted instantiation: _ZN4llvm8ArrayRefIN4mlir13NamedAttrListEEC2IvEERKNS_25SmallVectorTemplateCommonIS2_T_EE
Unexecuted instantiation: _ZN4llvm8ArrayRefINS0_ISt4pairIN4mlir10IdentifierENS2_9AttributeEEEEEC2IvEERKNS_25SmallVectorTemplateCommonIS6_T_EE
Unexecuted instantiation: _ZN4llvm8ArrayRefIPN4mlir5BlockEEC2IvEERKNS_25SmallVectorTemplateCommonIS3_T_EE
Unexecuted instantiation: _ZN4llvm8ArrayRefISt10unique_ptrIN4mlir6RegionESt14default_deleteIS3_EEEC2IvEERKNS_25SmallVectorTemplateCommonIS6_T_EE
Unexecuted instantiation: _ZN4llvm8ArrayRefISt4pairIjS1_IN4mlir10IdentifierENS2_9AttributeEEEEC2IvEERKNS_25SmallVectorTemplateCommonIS6_T_EE
Unexecuted instantiation: _ZN4llvm8ArrayRefIN4mlir9AffineMapEEC2IvEERKNS_25SmallVectorTemplateCommonIS2_T_EE
Unexecuted instantiation: _ZN4llvm8ArrayRefIN4mlir17FlatSymbolRefAttrEEC2IvEERKNS_25SmallVectorTemplateCommonIS2_T_EE
Unexecuted instantiation: _ZN4llvm8ArrayRefISt4pairINS_11SmallVectorIiLj1EEEN4mlir13SymbolRefAttrEEEC2IvEERKNS_25SmallVectorTemplateCommonIS6_T_EE
84
85
    /// Construct an ArrayRef from a std::vector.
86
    template<typename A>
87
    /*implicit*/ ArrayRef(const std::vector<T, A> &Vec)
88
0
      : Data(Vec.data()), Length(Vec.size()) {}
Unexecuted instantiation: _ZN4llvm8ArrayRefINS_3vfs12YAMLVFSEntryEEC2ISaIS2_EEERKSt6vectorIS2_T_E
Unexecuted instantiation: _ZN4llvm8ArrayRefIN4mlir13BlockArgumentEEC2ISaIS2_EEERKSt6vectorIS2_T_E
Unexecuted instantiation: _ZN4llvm8ArrayRefIcEC2ISaIcEEERKSt6vectorIcT_E
Unexecuted instantiation: _ZN4llvm8ArrayRefISt4pairIN4mlir10IdentifierENS2_9AttributeEEEC2ISaIS5_EEERKSt6vectorIS5_T_E
89
90
    /// Construct an ArrayRef from a std::array
91
    template <size_t N>
92
    /*implicit*/ constexpr ArrayRef(const std::array<T, N> &Arr)
93
0
        : Data(Arr.data()), Length(N) {}
94
95
    /// Construct an ArrayRef from a C array.
96
    template <size_t N>
97
0
    /*implicit*/ constexpr ArrayRef(const T (&Arr)[N]) : Data(Arr), Length(N) {}
Unexecuted instantiation: _ZN4llvm8ArrayRefImEC2ILm2EEERAT__Km
Unexecuted instantiation: _ZN4llvm8ArrayRefINS_3sys16UnicodeCharRangeEEC2ILm548EEERAT__KS2_
Unexecuted instantiation: _ZN4llvm8ArrayRefINS_3sys16UnicodeCharRangeEEC2ILm218EEERAT__KS2_
Unexecuted instantiation: _ZN4llvm8ArrayRefINS_3sys16UnicodeCharRangeEEC2ILm15EEERAT__KS2_
Unexecuted instantiation: _ZN4llvm8ArrayRefINS_9StringRefEEC2ILm4EEERAT__KS1_
Unexecuted instantiation: _ZN4llvm8ArrayRefINS_8OptionalINS_9StringRefEEEEC2ILm3EEERAT__KS3_
Unexecuted instantiation: _ZN4llvm8ArrayRefIN4mlir6TypeIDEEC2ILm2EEERAT__KS2_
Unexecuted instantiation: _ZN4llvm8ArrayRefIN4mlir6TypeIDEEC2ILm5EEERAT__KS2_
Unexecuted instantiation: _ZN4llvm8ArrayRefIN4mlir6TypeIDEEC2ILm7EEERAT__KS2_
Unexecuted instantiation: _ZN4llvm8ArrayRefIN4mlir6TypeIDEEC2ILm6EEERAT__KS2_
Unexecuted instantiation: _ZN4llvm8ArrayRefIN4mlir6TypeIDEEC2ILm4EEERAT__KS2_
Unexecuted instantiation: _ZN4llvm8ArrayRefIN4mlir11OpAsmParser11OperandTypeEEC2ILm1EEERAT__KS3_
Unexecuted instantiation: _ZN4llvm8ArrayRefIN4mlir4TypeEEC2ILm1EEERAT__KS2_
Unexecuted instantiation: _ZN4llvm8ArrayRefIN4mlir6TypeIDEEC2ILm8EEERAT__KS2_
Unexecuted instantiation: _ZN4llvm8ArrayRefIN4mlir4TypeEEC2ILm2EEERAT__KS2_
Unexecuted instantiation: _ZN4llvm8ArrayRefIN4mlir4TypeEEC2ILm3EEERAT__KS2_
Unexecuted instantiation: _ZN4llvm8ArrayRefIN4mlir6TypeIDEEC2ILm9EEERAT__KS2_
98
99
    /// Construct an ArrayRef from a std::initializer_list.
100
#if LLVM_GNUC_PREREQ(9, 0, 0)
101
// Disable gcc's warning in this constructor as it generates an enormous amount
102
// of messages. Anyone using ArrayRef should already be aware of the fact that
103
// it does not do lifetime extension.
104
#pragma GCC diagnostic push
105
#pragma GCC diagnostic ignored "-Winit-list-lifetime"
106
#endif
107
    /*implicit*/ ArrayRef(const std::initializer_list<T> &Vec)
108
    : Data(Vec.begin() == Vec.end() ? (T*)nullptr : Vec.begin()),
109
4
      Length(Vec.size()) {}
Unexecuted instantiation: _ZN4llvm8ArrayRefIN4mlir10AffineExprEEC2ERKSt16initializer_listIS2_E
Unexecuted instantiation: _ZN4llvm8ArrayRefIN4mlir5ValueEEC2ERKSt16initializer_listIS2_E
Unexecuted instantiation: _ZN4llvm8ArrayRefINS_9StringRefEEC2ERKSt16initializer_listIS1_E
Unexecuted instantiation: _ZN4llvm8ArrayRefIN4mlir4TypeEEC2ERKSt16initializer_listIS2_E
Unexecuted instantiation: _ZN4llvm8ArrayRefIN4mlir9AttributeEEC2ERKSt16initializer_listIS2_E
Unexecuted instantiation: _ZN4llvm8ArrayRefIiEC2ERKSt16initializer_listIiE
_ZN4llvm8ArrayRefIlEC2ERKSt16initializer_listIlE
Line
Count
Source
109
4
      Length(Vec.size()) {}
Unexecuted instantiation: _ZN4llvm8ArrayRefIN4mlir9AffineMapEEC2ERKSt16initializer_listIS2_E
110
#if LLVM_GNUC_PREREQ(9, 0, 0)
111
#pragma GCC diagnostic pop
112
#endif
113
114
    /// Construct an ArrayRef<const T*> from ArrayRef<T*>. This uses SFINAE to
115
    /// ensure that only ArrayRefs of pointers can be converted.
116
    template <typename U>
117
    ArrayRef(const ArrayRef<U *> &A,
118
             std::enable_if_t<std::is_convertible<U *const *, T const *>::value>
119
                 * = nullptr)
120
        : Data(A.data()), Length(A.size()) {}
121
122
    /// Construct an ArrayRef<const T*> from a SmallVector<T*>. This is
123
    /// templated in order to avoid instantiating SmallVectorTemplateCommon<T>
124
    /// whenever we copy-construct an ArrayRef.
125
    template <typename U, typename DummyT>
126
    /*implicit*/ ArrayRef(
127
        const SmallVectorTemplateCommon<U *, DummyT> &Vec,
128
        std::enable_if_t<std::is_convertible<U *const *, T const *>::value> * =
129
            nullptr)
130
        : Data(Vec.data()), Length(Vec.size()) {}
131
132
    /// Construct an ArrayRef<const T*> from std::vector<T*>. This uses SFINAE
133
    /// to ensure that only vectors of pointers can be converted.
134
    template <typename U, typename A>
135
    ArrayRef(const std::vector<U *, A> &Vec,
136
             std::enable_if_t<std::is_convertible<U *const *, T const *>::value>
137
                 * = 0)
138
        : Data(Vec.data()), Length(Vec.size()) {}
139
140
    /// @}
141
    /// @name Simple Operations
142
    /// @{
143
144
769
    iterator begin() const { return Data; }
Unexecuted instantiation: _ZNK4llvm8ArrayRefINS_8OptionalIN4mlir5ValueEEEE5beginEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefIcE5beginEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefIN4mlir9AttributeEE5beginEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefISt4pairIN4mlir10IdentifierENS2_9AttributeEEE5beginEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefIN4mlir4TypeEE5beginEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefIPN4mlir5BlockEE5beginEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefIhE5beginEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefImE5beginEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefIPKNS_2cl14OptionCategoryEE5beginEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefINS_3vfs12YAMLVFSEntryEE5beginEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefINS_7SMFixItEE5beginEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefINS_3sys16UnicodeCharRangeEE5beginEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefINS_9StringRefEE5beginEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE5beginEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefIPKcE5beginEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefIN4mlir10AffineExprEE5beginEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefIN4mlir5ValueEE5beginEv
_ZNK4llvm8ArrayRefIlE5beginEv
Line
Count
Source
144
721
    iterator begin() const { return Data; }
Unexecuted instantiation: _ZNK4llvm8ArrayRefIN4mlir11OpAsmParser11OperandTypeEE5beginEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefIN4mlir6TypeIDEE5beginEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefIPN4mlir9OperationEE5beginEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefIN4mlir11AffineForOpEE5beginEv
_ZNK4llvm8ArrayRefIN4mlir7Simplex7UnknownEE5beginEv
Line
Count
Source
144
48
    iterator begin() const { return Data; }
Unexecuted instantiation: _ZNK4llvm8ArrayRefIN4mlir9AffineMapEE5beginEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefIjE5beginEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefINS0_IN4mlir10AffineExprEEEE5beginEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefINS_11SmallVectorIN4mlir10AffineExprELj4EEEE5beginEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefIN4mlir17FlatSymbolRefAttrEE5beginEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefIN4mlir8LocationEE5beginEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefIiE5beginEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefINS_7APFloatEE5beginEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefINS_5APIntEE5beginEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefIbE5beginEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefIfE5beginEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefIdE5beginEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefIN4mlir18DiagnosticArgumentEE5beginEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefINS0_ISt4pairIN4mlir10IdentifierENS2_9AttributeEEEEE5beginEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefISt4pairIjS1_IN4mlir10IdentifierENS2_9AttributeEEEE5beginEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefISt4pairINS_11SmallVectorIiLj1EEEN4mlir13SymbolRefAttrEEE5beginEv
145
769
    iterator end() const { return Data + Length; }
Unexecuted instantiation: _ZNK4llvm8ArrayRefINS_8OptionalIN4mlir5ValueEEEE3endEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefIcE3endEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefIN4mlir9AttributeEE3endEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefISt4pairIN4mlir10IdentifierENS2_9AttributeEEE3endEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefIN4mlir4TypeEE3endEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefIPN4mlir5BlockEE3endEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefImE3endEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefIPKNS_2cl14OptionCategoryEE3endEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefINS_3vfs12YAMLVFSEntryEE3endEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefINS_7SMFixItEE3endEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefINS_3sys16UnicodeCharRangeEE3endEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefIhE3endEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefINS_9StringRefEE3endEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE3endEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefIPKcE3endEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefIN4mlir10AffineExprEE3endEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefIN4mlir5ValueEE3endEv
_ZNK4llvm8ArrayRefIlE3endEv
Line
Count
Source
145
721
    iterator end() const { return Data + Length; }
Unexecuted instantiation: _ZNK4llvm8ArrayRefIN4mlir11OpAsmParser11OperandTypeEE3endEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefIN4mlir6TypeIDEE3endEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefIPN4mlir9OperationEE3endEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefIN4mlir11AffineForOpEE3endEv
_ZNK4llvm8ArrayRefIN4mlir7Simplex7UnknownEE3endEv
Line
Count
Source
145
48
    iterator end() const { return Data + Length; }
Unexecuted instantiation: _ZNK4llvm8ArrayRefIN4mlir9AffineMapEE3endEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefIjE3endEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefINS0_IN4mlir10AffineExprEEEE3endEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefINS_11SmallVectorIN4mlir10AffineExprELj4EEEE3endEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefIN4mlir17FlatSymbolRefAttrEE3endEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefIN4mlir8LocationEE3endEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefIiE3endEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefINS_7APFloatEE3endEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefINS_5APIntEE3endEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefIbE3endEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefIfE3endEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefIdE3endEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefIN4mlir18DiagnosticArgumentEE3endEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefINS0_ISt4pairIN4mlir10IdentifierENS2_9AttributeEEEEE3endEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefISt4pairIjS1_IN4mlir10IdentifierENS2_9AttributeEEEE3endEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefISt4pairINS_11SmallVectorIiLj1EEEN4mlir13SymbolRefAttrEEE3endEv
146
147
0
    reverse_iterator rbegin() const { return reverse_iterator(end()); }
Unexecuted instantiation: _ZNK4llvm8ArrayRefIN4mlir8LocationEE6rbeginEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefIN4mlir10AffineExprEE6rbeginEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefIlE6rbeginEv
148
0
    reverse_iterator rend() const { return reverse_iterator(begin()); }
Unexecuted instantiation: _ZNK4llvm8ArrayRefIN4mlir8LocationEE4rendEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefIN4mlir10AffineExprEE4rendEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefIlE4rendEv
149
150
    /// empty - Check if the array is empty.
151
834
    bool empty() const { return Length == 0; }
_ZNK4llvm8ArrayRefINS_8OptionalIN4mlir5ValueEEEE5emptyEv
Line
Count
Source
151
62
    bool empty() const { return Length == 0; }
_ZNK4llvm8ArrayRefIlE5emptyEv
Line
Count
Source
151
772
    bool empty() const { return Length == 0; }
Unexecuted instantiation: _ZNK4llvm8ArrayRefIcE5emptyEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefIN4mlir17FlatSymbolRefAttrEE5emptyEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefImE5emptyEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefINS_3vfs12YAMLVFSEntryEE5emptyEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefINS_7SMFixItEE5emptyEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefIhE5emptyEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefINS_8OptionalINS_9StringRefEEEE5emptyEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefINS_9StringRefEE5emptyEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefIN4mlir10AffineExprEE5emptyEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefIN4mlir5ValueEE5emptyEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefIN4mlir4TypeEE5emptyEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefIN4mlir9AttributeEE5emptyEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefIN4mlir9AffineMapEE5emptyEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefIjE5emptyEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefINS0_IN4mlir10AffineExprEEEE5emptyEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefINS_11SmallVectorIN4mlir10AffineExprELj4EEEE5emptyEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefIiE5emptyEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefISt4pairIN4mlir10IdentifierENS2_9AttributeEEE5emptyEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefIN4mlir8LocationEE5emptyEv
152
153
0
    const T *data() const { return Data; }
Unexecuted instantiation: _ZNK4llvm8ArrayRefIcE4dataEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefIN4mlir9OpOperandEE4dataEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefIN4mlir13BlockArgumentEE4dataEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefIN4mlir6RegionEE4dataEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefIN4mlir12BlockOperandEE4dataEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefImE4dataEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefItE4dataEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefINS_3vfs12YAMLVFSEntryEE4dataEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefIhE4dataEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefINS_9StringRefEE4dataEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefINS_8OptionalIN4mlir5ValueEEEE4dataEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefIlE4dataEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefIN4mlir10AffineExprEE4dataEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefIN4mlir5ValueEE4dataEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefIN4mlir9AttributeEE4dataEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefISt4pairIN4mlir10IdentifierENS2_9AttributeEEE4dataEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefIN4mlir17FlatSymbolRefAttrEE4dataEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefISt7complexINS_5APIntEEE4dataEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefISt7complexINS_7APFloatEEE4dataEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefIiE4dataEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefIN4mlir6detail12ExpectedDiagEE4dataEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefIN4mlir8LocationEE4dataEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefIN4mlir4TypeEE4dataEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefIN4mlir9AffineMapEE4dataEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefISt10unique_ptrIN4mlir6RegionESt14default_deleteIS3_EEE4dataEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefISt4pairINS_11SmallVectorIiLj1EEEN4mlir13SymbolRefAttrEEE4dataEv
154
155
    /// size - Get the array size.
156
1.31k
    size_t size() const { return Length; }
Unexecuted instantiation: _ZNK4llvm8ArrayRefINS_8OptionalIN4mlir5ValueEEEE4sizeEv
_ZNK4llvm8ArrayRefIlE4sizeEv
Line
Count
Source
156
1.26k
    size_t size() const { return Length; }
Unexecuted instantiation: _ZNK4llvm8ArrayRefIcE4sizeEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefIN4mlir9AttributeEE4sizeEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefIN4mlir9OpOperandEE4sizeEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefIN4mlir13BlockArgumentEE4sizeEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefIN4mlir6RegionEE4sizeEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefIN4mlir12BlockOperandEE4sizeEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefIN4mlir5ValueEE4sizeEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefIhE4sizeEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefImE4sizeEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefItE4sizeEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefIPNS_6detail14format_adapterEE4sizeEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefINS_3vfs12YAMLVFSEntryEE4sizeEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefINS_7SMRangeEE4sizeEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefINS_9StringRefEE4sizeEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefINS_8OptionalINS_9StringRefEEEE4sizeEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefIPKcE4sizeEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefIN4mlir10AffineExprEE4sizeEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefIN4mlir9AffineMapEE4sizeEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefIN4mlir11OpAsmParser11OperandTypeEE4sizeEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefIN4mlir4TypeEE4sizeEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefIN4mlir11AffineForOpEE4sizeEv
_ZNK4llvm8ArrayRefIN4mlir7Simplex7UnknownEE4sizeEv
Line
Count
Source
156
48
    size_t size() const { return Length; }
Unexecuted instantiation: _ZNK4llvm8ArrayRefISt4pairIN4mlir10IdentifierENS2_9AttributeEEE4sizeEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefINS0_IN4mlir10AffineExprEEEE4sizeEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefINS_11SmallVectorIN4mlir10AffineExprELj4EEEE4sizeEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefIjE4sizeEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefIiE4sizeEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefIN4mlir17FlatSymbolRefAttrEE4sizeEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefIbE4sizeEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefINS_5APIntEE4sizeEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefISt7complexINS_5APIntEEE4sizeEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefINS_7APFloatEE4sizeEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefISt7complexINS_7APFloatEEE4sizeEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefIN4mlir6detail12ExpectedDiagEE4sizeEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefIN4mlir8LocationEE4sizeEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefIN4mlir21MutableDictionaryAttrEE4sizeEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefIN4mlir13NamedAttrListEE4sizeEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefIPN4mlir5BlockEE4sizeEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefISt10unique_ptrIN4mlir6RegionESt14default_deleteIS3_EEE4sizeEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefISt4pairINS_11SmallVectorIiLj1EEEN4mlir13SymbolRefAttrEEE4sizeEv
157
158
    /// front - Get the first element.
159
0
    const T &front() const {
160
0
      assert(!empty());
161
0
      return Data[0];
162
0
    }
Unexecuted instantiation: _ZNK4llvm8ArrayRefINS_3vfs12YAMLVFSEntryEE5frontEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefIN4mlir4TypeEE5frontEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefIlE5frontEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefIN4mlir9AttributeEE5frontEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefIN4mlir9AffineMapEE5frontEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefINS_9StringRefEE5frontEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefIcE5frontEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefIN4mlir8LocationEE5frontEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefISt4pairIN4mlir10IdentifierENS2_9AttributeEEE5frontEv
163
164
    /// back - Get the last element.
165
772
    const T &back() const {
166
772
      assert(!empty());
167
772
      return Data[Length-1];
168
772
    }
_ZNK4llvm8ArrayRefIlE4backEv
Line
Count
Source
165
772
    const T &back() const {
166
772
      assert(!empty());
167
772
      return Data[Length-1];
168
772
    }
Unexecuted instantiation: _ZNK4llvm8ArrayRefIN4mlir9AttributeEE4backEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefIiE4backEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefIN4mlir17FlatSymbolRefAttrEE4backEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefIcE4backEv
Unexecuted instantiation: _ZNK4llvm8ArrayRefIN4mlir8LocationEE4backEv
169
170
    // copy - Allocate copy in Allocator and return ArrayRef<T> to it.
171
    template <typename Allocator> ArrayRef<T> copy(Allocator &A) {
172
      T *Buff = A.template Allocate<T>(Length);
173
      std::uninitialized_copy(begin(), end(), Buff);
174
      return ArrayRef<T>(Buff, Length);
175
    }
176
177
    /// equals - Check for element-wise equality.
178
0
    bool equals(ArrayRef RHS) const {
179
0
      if (Length != RHS.Length)
180
0
        return false;
181
0
      return std::equal(begin(), end(), RHS.begin());
182
0
    }
Unexecuted instantiation: _ZNK4llvm8ArrayRefImE6equalsES1_
Unexecuted instantiation: _ZNK4llvm8ArrayRefIlE6equalsES1_
Unexecuted instantiation: _ZNK4llvm8ArrayRefINS_8OptionalIN4mlir5ValueEEEE6equalsES5_
Unexecuted instantiation: _ZNK4llvm8ArrayRefIN4mlir9AffineMapEE6equalsES3_
Unexecuted instantiation: _ZNK4llvm8ArrayRefIN4mlir4TypeEE6equalsES3_
Unexecuted instantiation: _ZNK4llvm8ArrayRefIN4mlir9AttributeEE6equalsES3_
Unexecuted instantiation: _ZNK4llvm8ArrayRefISt4pairIN4mlir10IdentifierENS2_9AttributeEEE6equalsES6_
Unexecuted instantiation: _ZNK4llvm8ArrayRefIN4mlir17FlatSymbolRefAttrEE6equalsES3_
Unexecuted instantiation: _ZNK4llvm8ArrayRefINS_9StringRefEE6equalsES2_
Unexecuted instantiation: _ZNK4llvm8ArrayRefIcE6equalsES1_
Unexecuted instantiation: _ZNK4llvm8ArrayRefIN4mlir8LocationEE6equalsES3_
Unexecuted instantiation: _ZNK4llvm8ArrayRefIN4mlir10AffineExprEE6equalsES3_
Unexecuted instantiation: _ZNK4llvm8ArrayRefIbE6equalsES1_
183
184
    /// slice(n, m) - Chop off the first N elements of the array, and keep M
185
    /// elements in the array.
186
0
    ArrayRef<T> slice(size_t N, size_t M) const {
187
0
      assert(N+M <= size() && "Invalid specifier");
188
0
      return ArrayRef<T>(data()+N, M);
189
0
    }
Unexecuted instantiation: _ZNK4llvm8ArrayRefINS_3vfs12YAMLVFSEntryEE5sliceEmm
Unexecuted instantiation: _ZNK4llvm8ArrayRefIhE5sliceEmm
Unexecuted instantiation: _ZNK4llvm8ArrayRefIcE5sliceEmm
Unexecuted instantiation: _ZNK4llvm8ArrayRefINS_9StringRefEE5sliceEmm
Unexecuted instantiation: _ZNK4llvm8ArrayRefINS_8OptionalIN4mlir5ValueEEEE5sliceEmm
Unexecuted instantiation: _ZNK4llvm8ArrayRefIN4mlir10AffineExprEE5sliceEmm
Unexecuted instantiation: _ZNK4llvm8ArrayRefIN4mlir5ValueEE5sliceEmm
Unexecuted instantiation: _ZNK4llvm8ArrayRefIN4mlir8LocationEE5sliceEmm
Unexecuted instantiation: _ZNK4llvm8ArrayRefIN4mlir4TypeEE5sliceEmm
Unexecuted instantiation: _ZNK4llvm8ArrayRefIlE5sliceEmm
Unexecuted instantiation: _ZNK4llvm8ArrayRefIN4mlir17FlatSymbolRefAttrEE5sliceEmm
Unexecuted instantiation: _ZNK4llvm8ArrayRefISt4pairINS_11SmallVectorIiLj1EEEN4mlir13SymbolRefAttrEEE5sliceEmm
190
191
    /// slice(n) - Chop off the first N elements of the array.
192
0
    ArrayRef<T> slice(size_t N) const { return slice(N, size() - N); }
193
194
    /// Drop the first \p N elements of the array.
195
0
    ArrayRef<T> drop_front(size_t N = 1) const {
196
0
      assert(size() >= N && "Dropping more elements than exist");
197
0
      return slice(N, size() - N);
198
0
    }
Unexecuted instantiation: _ZNK4llvm8ArrayRefIhE10drop_frontEm
Unexecuted instantiation: _ZNK4llvm8ArrayRefIcE10drop_frontEm
Unexecuted instantiation: _ZNK4llvm8ArrayRefINS_9StringRefEE10drop_frontEm
Unexecuted instantiation: _ZNK4llvm8ArrayRefIN4mlir10AffineExprEE10drop_frontEm
Unexecuted instantiation: _ZNK4llvm8ArrayRefIN4mlir5ValueEE10drop_frontEm
Unexecuted instantiation: _ZNK4llvm8ArrayRefIN4mlir4TypeEE10drop_frontEm
Unexecuted instantiation: _ZNK4llvm8ArrayRefISt4pairINS_11SmallVectorIiLj1EEEN4mlir13SymbolRefAttrEEE10drop_frontEm
199
200
    /// Drop the last \p N elements of the array.
201
0
    ArrayRef<T> drop_back(size_t N = 1) const {
202
0
      assert(size() >= N && "Dropping more elements than exist");
203
0
      return slice(0, size() - N);
204
0
    }
Unexecuted instantiation: _ZNK4llvm8ArrayRefIhE9drop_backEm
Unexecuted instantiation: _ZNK4llvm8ArrayRefIcE9drop_backEm
Unexecuted instantiation: _ZNK4llvm8ArrayRefINS_9StringRefEE9drop_backEm
Unexecuted instantiation: _ZNK4llvm8ArrayRefIN4mlir8LocationEE9drop_backEm
Unexecuted instantiation: _ZNK4llvm8ArrayRefIlE9drop_backEm
Unexecuted instantiation: _ZNK4llvm8ArrayRefIN4mlir17FlatSymbolRefAttrEE9drop_backEm
205
206
    /// Return a copy of *this with the first N elements satisfying the
207
    /// given predicate removed.
208
    template <class PredicateT> ArrayRef<T> drop_while(PredicateT Pred) const {
209
      return ArrayRef<T>(find_if_not(*this, Pred), end());
210
    }
211
212
    /// Return a copy of *this with the first N elements not satisfying
213
    /// the given predicate removed.
214
    template <class PredicateT> ArrayRef<T> drop_until(PredicateT Pred) const {
215
      return ArrayRef<T>(find_if(*this, Pred), end());
216
    }
217
218
    /// Return a copy of *this with only the first \p N elements.
219
0
    ArrayRef<T> take_front(size_t N = 1) const {
220
0
      if (N >= size())
221
0
        return *this;
222
0
      return drop_back(size() - N);
223
0
    }
Unexecuted instantiation: _ZNK4llvm8ArrayRefIhE10take_frontEm
Unexecuted instantiation: _ZNK4llvm8ArrayRefIcE10take_frontEm
Unexecuted instantiation: _ZNK4llvm8ArrayRefINS_9StringRefEE10take_frontEm
Unexecuted instantiation: _ZNK4llvm8ArrayRefIlE10take_frontEm
Unexecuted instantiation: _ZNK4llvm8ArrayRefIN4mlir17FlatSymbolRefAttrEE10take_frontEm
224
225
    /// Return a copy of *this with only the last \p N elements.
226
0
    ArrayRef<T> take_back(size_t N = 1) const {
227
0
      if (N >= size())
228
0
        return *this;
229
0
      return drop_front(size() - N);
230
0
    }
Unexecuted instantiation: _ZNK4llvm8ArrayRefIN4mlir10AffineExprEE9take_backEm
Unexecuted instantiation: _ZNK4llvm8ArrayRefIN4mlir5ValueEE9take_backEm
231
232
    /// Return the first N elements of this Array that satisfy the given
233
    /// predicate.
234
0
    template <class PredicateT> ArrayRef<T> take_while(PredicateT Pred) const {
235
0
      return ArrayRef<T>(begin(), find_if_not(*this, Pred));
236
0
    }
Unexecuted instantiation: SymbolTable.cpp:_ZNK4llvm8ArrayRefISt4pairINS_11SmallVectorIiLj1EEEN4mlir13SymbolRefAttrEEE10take_whileIZZL20rebuildAttrAfterRAUWNS4_9AttributeES7_jENK3$_0clINS_14iterator_rangeINS_15mapped_iteratorIPS1_INS4_10IdentifierES9_EZNS_17make_second_rangeIRNS2_ISF_Lj4EEEEEDaOT_EUlRSF_E_RS9_EEEEEEDaSL_EUlTyRSK_E_EES7_SK_
Unexecuted instantiation: SymbolTable.cpp:_ZNK4llvm8ArrayRefISt4pairINS_11SmallVectorIiLj1EEEN4mlir13SymbolRefAttrEEE10take_whileIZZL20rebuildAttrAfterRAUWNS4_9AttributeES7_jENK3$_0clIRNS2_IS9_Lj4EEEEEDaOT_EUlTyRSE_E_EES7_SE_
237
238
    /// Return the first N elements of this Array that don't satisfy the
239
    /// given predicate.
240
    template <class PredicateT> ArrayRef<T> take_until(PredicateT Pred) const {
241
      return ArrayRef<T>(begin(), find_if(*this, Pred));
242
    }
243
244
    /// @}
245
    /// @name Operator Overloads
246
    /// @{
247
4.54k
    const T &operator[](size_t Index) const {
248
4.54k
      assert(Index < Length && "Invalid index!");
249
4.54k
      return Data[Index];
250
4.54k
    }
_ZNK4llvm8ArrayRefIlEixEm
Line
Count
Source
247
4.54k
    const T &operator[](size_t Index) const {
248
4.54k
      assert(Index < Length && "Invalid index!");
249
4.54k
      return Data[Index];
250
4.54k
    }
Unexecuted instantiation: _ZNK4llvm8ArrayRefIN4mlir4TypeEEixEm
Unexecuted instantiation: _ZNK4llvm8ArrayRefIN4mlir5ValueEEixEm
Unexecuted instantiation: _ZNK4llvm8ArrayRefIcEixEm
Unexecuted instantiation: _ZNK4llvm8ArrayRefImEixEm
Unexecuted instantiation: _ZNK4llvm8ArrayRefIPNS_6detail14format_adapterEEixEm
Unexecuted instantiation: _ZNK4llvm8ArrayRefINS_7SMRangeEEixEm
Unexecuted instantiation: _ZNK4llvm8ArrayRefIhEixEm
Unexecuted instantiation: _ZNK4llvm8ArrayRefINS_8OptionalINS_9StringRefEEEEixEm
Unexecuted instantiation: _ZNK4llvm8ArrayRefIN4mlir10AffineExprEEixEm
Unexecuted instantiation: _ZNK4llvm8ArrayRefIbEixEm
Unexecuted instantiation: _ZNK4llvm8ArrayRefIN4mlir9AffineMapEEixEm
Unexecuted instantiation: _ZNK4llvm8ArrayRefIN4mlir11OpAsmParser11OperandTypeEEixEm
Unexecuted instantiation: _ZNK4llvm8ArrayRefIN4mlir9AttributeEEixEm
Unexecuted instantiation: _ZNK4llvm8ArrayRefINS0_IN4mlir10AffineExprEEEEixEm
Unexecuted instantiation: _ZNK4llvm8ArrayRefINS_11SmallVectorIN4mlir10AffineExprELj4EEEEixEm
Unexecuted instantiation: _ZNK4llvm8ArrayRefINS_9StringRefEEixEm
Unexecuted instantiation: _ZNK4llvm8ArrayRefIiEixEm
Unexecuted instantiation: _ZNK4llvm8ArrayRefISt4pairIN4mlir10IdentifierENS2_9AttributeEEEixEm
Unexecuted instantiation: _ZNK4llvm8ArrayRefIN4mlir21MutableDictionaryAttrEEixEm
Unexecuted instantiation: _ZNK4llvm8ArrayRefINS0_ISt4pairIN4mlir10IdentifierENS2_9AttributeEEEEEixEm
Unexecuted instantiation: _ZNK4llvm8ArrayRefIN4mlir13NamedAttrListEEixEm
Unexecuted instantiation: _ZNK4llvm8ArrayRefIPN4mlir5BlockEEixEm
Unexecuted instantiation: _ZNK4llvm8ArrayRefISt4pairINS_11SmallVectorIiLj1EEEN4mlir13SymbolRefAttrEEEixEm
251
252
    /// Disallow accidental assignment from a temporary.
253
    ///
254
    /// The declaration here is extra complicated so that "arrayRef = {}"
255
    /// continues to select the move assignment operator.
256
    template <typename U>
257
    std::enable_if_t<std::is_same<U, T>::value, ArrayRef<T>> &
258
    operator=(U &&Temporary) = delete;
259
260
    /// Disallow accidental assignment from a temporary.
261
    ///
262
    /// The declaration here is extra complicated so that "arrayRef = {}"
263
    /// continues to select the move assignment operator.
264
    template <typename U>
265
    std::enable_if_t<std::is_same<U, T>::value, ArrayRef<T>> &
266
    operator=(std::initializer_list<U>) = delete;
267
268
    /// @}
269
    /// @name Expensive Operations
270
    /// @{
271
0
    std::vector<T> vec() const {
272
0
      return std::vector<T>(Data, Data+Length);
273
0
    }
274
275
    /// @}
276
    /// @name Conversion operators
277
    /// @{
278
    operator std::vector<T>() const {
279
      return std::vector<T>(Data, Data+Length);
280
    }
281
282
    /// @}
283
  };
284
285
  /// MutableArrayRef - Represent a mutable reference to an array (0 or more
286
  /// elements consecutively in memory), i.e. a start pointer and a length.  It
287
  /// allows various APIs to take and modify consecutive elements easily and
288
  /// conveniently.
289
  ///
290
  /// This class does not own the underlying data, it is expected to be used in
291
  /// situations where the data resides in some other buffer, whose lifetime
292
  /// extends past that of the MutableArrayRef. For this reason, it is not in
293
  /// general safe to store a MutableArrayRef.
294
  ///
295
  /// This is intended to be trivially copyable, so it should be passed by
296
  /// value.
297
  template<typename T>
298
  class LLVM_NODISCARD MutableArrayRef : public ArrayRef<T> {
299
  public:
300
    using iterator = T *;
301
    using reverse_iterator = std::reverse_iterator<iterator>;
302
303
    /// Construct an empty MutableArrayRef.
304
0
    /*implicit*/ MutableArrayRef() = default;
Unexecuted instantiation: _ZN4llvm15MutableArrayRefIN4mlir9OpOperandEEC2Ev
Unexecuted instantiation: _ZN4llvm15MutableArrayRefImEC2Ev
305
306
    /// Construct an empty MutableArrayRef from None.
307
0
    /*implicit*/ MutableArrayRef(NoneType) : ArrayRef<T>() {}
308
309
    /// Construct a MutableArrayRef from a single element.
310
0
    /*implicit*/ MutableArrayRef(T &OneElt) : ArrayRef<T>(OneElt) {}
311
312
    /// Construct a MutableArrayRef from a pointer and length.
313
    /*implicit*/ MutableArrayRef(T *data, size_t length)
314
0
      : ArrayRef<T>(data, length) {}
Unexecuted instantiation: _ZN4llvm15MutableArrayRefIcEC2EPcm
Unexecuted instantiation: _ZN4llvm15MutableArrayRefIN4mlir6RegionEEC2EPS2_m
Unexecuted instantiation: _ZN4llvm15MutableArrayRefINS_8OptionalIN4mlir5ValueEEEEC2EPS4_m
Unexecuted instantiation: _ZN4llvm15MutableArrayRefIN4mlir9OpOperandEEC2EPS2_m
Unexecuted instantiation: _ZN4llvm15MutableArrayRefImEC2EPmm
Unexecuted instantiation: _ZN4llvm15MutableArrayRefIN4mlir12BlockOperandEEC2EPS2_m
Unexecuted instantiation: _ZN4llvm15MutableArrayRefINS_9StringRefEEC2EPS1_m
315
316
    /// Construct a MutableArrayRef from a range.
317
0
    MutableArrayRef(T *begin, T *end) : ArrayRef<T>(begin, end) {}
318
319
    /// Construct a MutableArrayRef from a SmallVector.
320
    /*implicit*/ MutableArrayRef(SmallVectorImpl<T> &Vec)
321
0
    : ArrayRef<T>(Vec) {}
Unexecuted instantiation: _ZN4llvm15MutableArrayRefImEC2ERNS_15SmallVectorImplImEE
Unexecuted instantiation: _ZN4llvm15MutableArrayRefIN4mlir6detail12ExpectedDiagEEC2ERNS_15SmallVectorImplIS3_EE
Unexecuted instantiation: _ZN4llvm15MutableArrayRefIN4mlir10AffineExprEEC2ERNS_15SmallVectorImplIS2_EE
322
323
    /// Construct a MutableArrayRef from a std::vector.
324
    /*implicit*/ MutableArrayRef(std::vector<T> &Vec)
325
0
    : ArrayRef<T>(Vec) {}
326
327
    /// Construct a MutableArrayRef from a std::array
328
    template <size_t N>
329
    /*implicit*/ constexpr MutableArrayRef(std::array<T, N> &Arr)
330
        : ArrayRef<T>(Arr) {}
331
332
    /// Construct a MutableArrayRef from a C array.
333
    template <size_t N>
334
    /*implicit*/ constexpr MutableArrayRef(T (&Arr)[N]) : ArrayRef<T>(Arr) {}
335
336
0
    T *data() const { return const_cast<T*>(ArrayRef<T>::data()); }
Unexecuted instantiation: _ZNK4llvm15MutableArrayRefIN4mlir13BlockArgumentEE4dataEv
Unexecuted instantiation: _ZNK4llvm15MutableArrayRefIN4mlir9OpOperandEE4dataEv
Unexecuted instantiation: _ZNK4llvm15MutableArrayRefIN4mlir6RegionEE4dataEv
Unexecuted instantiation: _ZNK4llvm15MutableArrayRefIN4mlir12BlockOperandEE4dataEv
Unexecuted instantiation: _ZNK4llvm15MutableArrayRefImE4dataEv
Unexecuted instantiation: _ZNK4llvm15MutableArrayRefIcE4dataEv
Unexecuted instantiation: _ZNK4llvm15MutableArrayRefINS_8OptionalIN4mlir5ValueEEEE4dataEv
Unexecuted instantiation: _ZNK4llvm15MutableArrayRefINS_9StringRefEE4dataEv
Unexecuted instantiation: _ZNK4llvm15MutableArrayRefIN4mlir6detail12ExpectedDiagEE4dataEv
Unexecuted instantiation: _ZNK4llvm15MutableArrayRefISt10unique_ptrIN4mlir6RegionESt14default_deleteIS3_EEE4dataEv
Unexecuted instantiation: _ZNK4llvm15MutableArrayRefIN4mlir10AffineExprEE4dataEv
337
338
0
    iterator begin() const { return data(); }
Unexecuted instantiation: _ZNK4llvm15MutableArrayRefIN4mlir13BlockArgumentEE5beginEv
Unexecuted instantiation: _ZNK4llvm15MutableArrayRefIN4mlir9OpOperandEE5beginEv
Unexecuted instantiation: _ZNK4llvm15MutableArrayRefImE5beginEv
Unexecuted instantiation: _ZNK4llvm15MutableArrayRefINS_8OptionalIN4mlir5ValueEEEE5beginEv
Unexecuted instantiation: _ZNK4llvm15MutableArrayRefIN4mlir6RegionEE5beginEv
Unexecuted instantiation: _ZNK4llvm15MutableArrayRefIN4mlir6detail12ExpectedDiagEE5beginEv
Unexecuted instantiation: _ZNK4llvm15MutableArrayRefIN4mlir12BlockOperandEE5beginEv
Unexecuted instantiation: _ZNK4llvm15MutableArrayRefISt10unique_ptrIN4mlir6RegionESt14default_deleteIS3_EEE5beginEv
339
0
    iterator end() const { return data() + this->size(); }
Unexecuted instantiation: _ZNK4llvm15MutableArrayRefIN4mlir13BlockArgumentEE3endEv
Unexecuted instantiation: _ZNK4llvm15MutableArrayRefIN4mlir9OpOperandEE3endEv
Unexecuted instantiation: _ZNK4llvm15MutableArrayRefImE3endEv
Unexecuted instantiation: _ZNK4llvm15MutableArrayRefIN4mlir6RegionEE3endEv
Unexecuted instantiation: _ZNK4llvm15MutableArrayRefIN4mlir6detail12ExpectedDiagEE3endEv
Unexecuted instantiation: _ZNK4llvm15MutableArrayRefIN4mlir12BlockOperandEE3endEv
Unexecuted instantiation: _ZNK4llvm15MutableArrayRefISt10unique_ptrIN4mlir6RegionESt14default_deleteIS3_EEE3endEv
340
341
0
    reverse_iterator rbegin() const { return reverse_iterator(end()); }
Unexecuted instantiation: _ZNK4llvm15MutableArrayRefIN4mlir13BlockArgumentEE6rbeginEv
Unexecuted instantiation: _ZNK4llvm15MutableArrayRefIN4mlir9OpOperandEE6rbeginEv
342
0
    reverse_iterator rend() const { return reverse_iterator(begin()); }
343
344
    /// front - Get the first element.
345
    T &front() const {
346
      assert(!this->empty());
347
      return data()[0];
348
    }
349
350
    /// back - Get the last element.
351
    T &back() const {
352
      assert(!this->empty());
353
      return data()[this->size()-1];
354
    }
355
356
    /// slice(n, m) - Chop off the first N elements of the array, and keep M
357
    /// elements in the array.
358
0
    MutableArrayRef<T> slice(size_t N, size_t M) const {
359
0
      assert(N + M <= this->size() && "Invalid specifier");
360
0
      return MutableArrayRef<T>(this->data() + N, M);
361
0
    }
Unexecuted instantiation: _ZNK4llvm15MutableArrayRefImE5sliceEmm
Unexecuted instantiation: _ZNK4llvm15MutableArrayRefIcE5sliceEmm
Unexecuted instantiation: _ZNK4llvm15MutableArrayRefINS_8OptionalIN4mlir5ValueEEEE5sliceEmm
Unexecuted instantiation: _ZNK4llvm15MutableArrayRefIN4mlir9OpOperandEE5sliceEmm
362
363
    /// slice(n) - Chop off the first N elements of the array.
364
    MutableArrayRef<T> slice(size_t N) const {
365
      return slice(N, this->size() - N);
366
    }
367
368
    /// Drop the first \p N elements of the array.
369
0
    MutableArrayRef<T> drop_front(size_t N = 1) const {
370
0
      assert(this->size() >= N && "Dropping more elements than exist");
371
0
      return slice(N, this->size() - N);
372
0
    }
Unexecuted instantiation: _ZNK4llvm15MutableArrayRefImE10drop_frontEm
Unexecuted instantiation: _ZNK4llvm15MutableArrayRefIcE10drop_frontEm
373
374
0
    MutableArrayRef<T> drop_back(size_t N = 1) const {
375
0
      assert(this->size() >= N && "Dropping more elements than exist");
376
0
      return slice(0, this->size() - N);
377
0
    }
Unexecuted instantiation: _ZNK4llvm15MutableArrayRefImE9drop_backEm
Unexecuted instantiation: _ZNK4llvm15MutableArrayRefIN4mlir9OpOperandEE9drop_backEm
378
379
    /// Return a copy of *this with the first N elements satisfying the
380
    /// given predicate removed.
381
    template <class PredicateT>
382
    MutableArrayRef<T> drop_while(PredicateT Pred) const {
383
      return MutableArrayRef<T>(find_if_not(*this, Pred), end());
384
    }
385
386
    /// Return a copy of *this with the first N elements not satisfying
387
    /// the given predicate removed.
388
    template <class PredicateT>
389
    MutableArrayRef<T> drop_until(PredicateT Pred) const {
390
      return MutableArrayRef<T>(find_if(*this, Pred), end());
391
    }
392
393
    /// Return a copy of *this with only the first \p N elements.
394
0
    MutableArrayRef<T> take_front(size_t N = 1) const {
395
0
      if (N >= this->size())
396
0
        return *this;
397
0
      return drop_back(this->size() - N);
398
0
    }
Unexecuted instantiation: _ZNK4llvm15MutableArrayRefImE10take_frontEm
Unexecuted instantiation: _ZNK4llvm15MutableArrayRefIN4mlir9OpOperandEE10take_frontEm
399
400
    /// Return a copy of *this with only the last \p N elements.
401
    MutableArrayRef<T> take_back(size_t N = 1) const {
402
      if (N >= this->size())
403
        return *this;
404
      return drop_front(this->size() - N);
405
    }
406
407
    /// Return the first N elements of this Array that satisfy the given
408
    /// predicate.
409
    template <class PredicateT>
410
    MutableArrayRef<T> take_while(PredicateT Pred) const {
411
      return MutableArrayRef<T>(begin(), find_if_not(*this, Pred));
412
    }
413
414
    /// Return the first N elements of this Array that don't satisfy the
415
    /// given predicate.
416
    template <class PredicateT>
417
    MutableArrayRef<T> take_until(PredicateT Pred) const {
418
      return MutableArrayRef<T>(begin(), find_if(*this, Pred));
419
    }
420
421
    /// @}
422
    /// @name Operator Overloads
423
    /// @{
424
0
    T &operator[](size_t Index) const {
425
0
      assert(Index < this->size() && "Invalid index!");
426
0
      return data()[Index];
427
0
    }
Unexecuted instantiation: _ZNK4llvm15MutableArrayRefIN4mlir9OpOperandEEixEm
Unexecuted instantiation: _ZNK4llvm15MutableArrayRefIN4mlir6RegionEEixEm
Unexecuted instantiation: _ZNK4llvm15MutableArrayRefIN4mlir12BlockOperandEEixEm
Unexecuted instantiation: _ZNK4llvm15MutableArrayRefImEixEm
Unexecuted instantiation: _ZNK4llvm15MutableArrayRefINS_9StringRefEEixEm
Unexecuted instantiation: _ZNK4llvm15MutableArrayRefIN4mlir10AffineExprEEixEm
428
  };
429
430
  /// This is a MutableArrayRef that owns its array.
431
  template <typename T> class OwningArrayRef : public MutableArrayRef<T> {
432
  public:
433
    OwningArrayRef() = default;
434
    OwningArrayRef(size_t Size) : MutableArrayRef<T>(new T[Size], Size) {}
435
436
    OwningArrayRef(ArrayRef<T> Data)
437
        : MutableArrayRef<T>(new T[Data.size()], Data.size()) {
438
      std::copy(Data.begin(), Data.end(), this->begin());
439
    }
440
441
    OwningArrayRef(OwningArrayRef &&Other) { *this = std::move(Other); }
442
443
    OwningArrayRef &operator=(OwningArrayRef &&Other) {
444
      delete[] this->data();
445
      this->MutableArrayRef<T>::operator=(Other);
446
      Other.MutableArrayRef<T>::operator=(MutableArrayRef<T>());
447
      return *this;
448
    }
449
450
    ~OwningArrayRef() { delete[] this->data(); }
451
  };
452
453
  /// @name ArrayRef Convenience constructors
454
  /// @{
455
456
  /// Construct an ArrayRef from a single element.
457
  template<typename T>
458
0
  ArrayRef<T> makeArrayRef(const T &OneElt) {
459
0
    return OneElt;
460
0
  }
461
462
  /// Construct an ArrayRef from a pointer and length.
463
  template<typename T>
464
0
  ArrayRef<T> makeArrayRef(const T *data, size_t length) {
465
0
    return ArrayRef<T>(data, length);
466
0
  }
Unexecuted instantiation: _ZN4llvm12makeArrayRefIcEENS_8ArrayRefIT_EEPKS2_m
Unexecuted instantiation: _ZN4llvm12makeArrayRefImEENS_8ArrayRefIT_EEPKS2_m
Unexecuted instantiation: _ZN4llvm12makeArrayRefIhEENS_8ArrayRefIT_EEPKS2_m
467
468
  /// Construct an ArrayRef from a range.
469
  template<typename T>
470
  ArrayRef<T> makeArrayRef(const T *begin, const T *end) {
471
    return ArrayRef<T>(begin, end);
472
  }
473
474
  /// Construct an ArrayRef from a SmallVector.
475
  template <typename T>
476
  ArrayRef<T> makeArrayRef(const SmallVectorImpl<T> &Vec) {
477
    return Vec;
478
  }
479
480
  /// Construct an ArrayRef from a SmallVector.
481
  template <typename T, unsigned N>
482
0
  ArrayRef<T> makeArrayRef(const SmallVector<T, N> &Vec) {
483
0
    return Vec;
484
0
  }
Unexecuted instantiation: _ZN4llvm12makeArrayRefINS_9StringRefELj16EEENS_8ArrayRefIT_EERKNS_11SmallVectorIS3_XT0_EEE
Unexecuted instantiation: _ZN4llvm12makeArrayRefISt4pairIN4mlir10IdentifierENS2_9AttributeEELj8EEENS_8ArrayRefIT_EERKNS_11SmallVectorIS7_XT0_EEE
Unexecuted instantiation: _ZN4llvm12makeArrayRefIiLj8EEENS_8ArrayRefIT_EERKNS_11SmallVectorIS2_XT0_EEE
485
486
  /// Construct an ArrayRef from a std::vector.
487
  template<typename T>
488
  ArrayRef<T> makeArrayRef(const std::vector<T> &Vec) {
489
    return Vec;
490
  }
491
492
  /// Construct an ArrayRef from a std::array.
493
  template <typename T, std::size_t N>
494
  ArrayRef<T> makeArrayRef(const std::array<T, N> &Arr) {
495
    return Arr;
496
  }
497
498
  /// Construct an ArrayRef from an ArrayRef (no-op) (const)
499
  template <typename T> ArrayRef<T> makeArrayRef(const ArrayRef<T> &Vec) {
500
    return Vec;
501
  }
502
503
  /// Construct an ArrayRef from an ArrayRef (no-op)
504
0
  template <typename T> ArrayRef<T> &makeArrayRef(ArrayRef<T> &Vec) {
505
0
    return Vec;
506
0
  }
Unexecuted instantiation: _ZN4llvm12makeArrayRefIiEERNS_8ArrayRefIT_EES4_
Unexecuted instantiation: _ZN4llvm12makeArrayRefIlEERNS_8ArrayRefIT_EES4_
507
508
  /// Construct an ArrayRef from a C array.
509
  template<typename T, size_t N>
510
0
  ArrayRef<T> makeArrayRef(const T (&Arr)[N]) {
511
0
    return ArrayRef<T>(Arr);
512
0
  }
Unexecuted instantiation: _ZN4llvm12makeArrayRefIN4mlir6TypeIDELm2EEENS_8ArrayRefIT_EERAT0__KS4_
Unexecuted instantiation: _ZN4llvm12makeArrayRefIN4mlir6TypeIDELm5EEENS_8ArrayRefIT_EERAT0__KS4_
Unexecuted instantiation: _ZN4llvm12makeArrayRefIN4mlir6TypeIDELm7EEENS_8ArrayRefIT_EERAT0__KS4_
Unexecuted instantiation: _ZN4llvm12makeArrayRefIN4mlir6TypeIDELm6EEENS_8ArrayRefIT_EERAT0__KS4_
Unexecuted instantiation: _ZN4llvm12makeArrayRefIN4mlir6TypeIDELm4EEENS_8ArrayRefIT_EERAT0__KS4_
Unexecuted instantiation: _ZN4llvm12makeArrayRefIN4mlir6TypeIDELm8EEENS_8ArrayRefIT_EERAT0__KS4_
Unexecuted instantiation: _ZN4llvm12makeArrayRefIN4mlir4TypeELm2EEENS_8ArrayRefIT_EERAT0__KS4_
Unexecuted instantiation: _ZN4llvm12makeArrayRefIN4mlir4TypeELm3EEENS_8ArrayRefIT_EERAT0__KS4_
Unexecuted instantiation: _ZN4llvm12makeArrayRefIN4mlir6TypeIDELm9EEENS_8ArrayRefIT_EERAT0__KS4_
513
514
  /// Construct a MutableArrayRef from a single element.
515
  template<typename T>
516
  MutableArrayRef<T> makeMutableArrayRef(T &OneElt) {
517
    return OneElt;
518
  }
519
520
  /// Construct a MutableArrayRef from a pointer and length.
521
  template<typename T>
522
0
  MutableArrayRef<T> makeMutableArrayRef(T *data, size_t length) {
523
0
    return MutableArrayRef<T>(data, length);
524
0
  }
525
526
  /// @}
527
  /// @name ArrayRef Comparison Operators
528
  /// @{
529
530
  template<typename T>
531
0
  inline bool operator==(ArrayRef<T> LHS, ArrayRef<T> RHS) {
532
0
    return LHS.equals(RHS);
533
0
  }
Unexecuted instantiation: _ZN4llvmeqImEEbNS_8ArrayRefIT_EES3_
Unexecuted instantiation: _ZN4llvmeqIlEEbNS_8ArrayRefIT_EES3_
Unexecuted instantiation: _ZN4llvmeqIN4mlir9AffineMapEEEbNS_8ArrayRefIT_EES5_
Unexecuted instantiation: _ZN4llvmeqIN4mlir4TypeEEEbNS_8ArrayRefIT_EES5_
Unexecuted instantiation: _ZN4llvmeqIN4mlir9AttributeEEEbNS_8ArrayRefIT_EES5_
Unexecuted instantiation: _ZN4llvmeqISt4pairIN4mlir10IdentifierENS2_9AttributeEEEEbNS_8ArrayRefIT_EES8_
Unexecuted instantiation: _ZN4llvmeqIN4mlir17FlatSymbolRefAttrEEEbNS_8ArrayRefIT_EES5_
Unexecuted instantiation: _ZN4llvmeqINS_9StringRefEEEbNS_8ArrayRefIT_EES4_
Unexecuted instantiation: _ZN4llvmeqIcEEbNS_8ArrayRefIT_EES3_
Unexecuted instantiation: _ZN4llvmeqIN4mlir8LocationEEEbNS_8ArrayRefIT_EES5_
Unexecuted instantiation: _ZN4llvmeqIN4mlir10AffineExprEEEbNS_8ArrayRefIT_EES5_
Unexecuted instantiation: _ZN4llvmeqIbEEbNS_8ArrayRefIT_EES3_
534
535
  template <typename T>
536
  inline bool operator==(SmallVectorImpl<T> &LHS, ArrayRef<T> RHS) {
537
    return ArrayRef<T>(LHS).equals(RHS);
538
  }
539
540
  template <typename T>
541
0
  inline bool operator!=(ArrayRef<T> LHS, ArrayRef<T> RHS) {
542
0
    return !(LHS == RHS);
543
0
  }
544
545
  template <typename T>
546
  inline bool operator!=(SmallVectorImpl<T> &LHS, ArrayRef<T> RHS) {
547
    return !(LHS == RHS);
548
  }
549
550
  /// @}
551
552
0
  template <typename T> hash_code hash_value(ArrayRef<T> S) {
553
0
    return hash_combine_range(S.begin(), S.end());
554
0
  }
Unexecuted instantiation: _ZN4llvm10hash_valueImEENS_9hash_codeENS_8ArrayRefIT_EE
Unexecuted instantiation: _ZN4llvm10hash_valueIlEENS_9hash_codeENS_8ArrayRefIT_EE
Unexecuted instantiation: _ZN4llvm10hash_valueIN4mlir9AttributeEEENS_9hash_codeENS_8ArrayRefIT_EE
Unexecuted instantiation: _ZN4llvm10hash_valueISt4pairIN4mlir10IdentifierENS2_9AttributeEEEENS_9hash_codeENS_8ArrayRefIT_EE
Unexecuted instantiation: _ZN4llvm10hash_valueIN4mlir17FlatSymbolRefAttrEEENS_9hash_codeENS_8ArrayRefIT_EE
Unexecuted instantiation: _ZN4llvm10hash_valueINS_9StringRefEEENS_9hash_codeENS_8ArrayRefIT_EE
Unexecuted instantiation: _ZN4llvm10hash_valueIcEENS_9hash_codeENS_8ArrayRefIT_EE
Unexecuted instantiation: _ZN4llvm10hash_valueIN4mlir8LocationEEENS_9hash_codeENS_8ArrayRefIT_EE
Unexecuted instantiation: _ZN4llvm10hash_valueIN4mlir9AffineMapEEENS_9hash_codeENS_8ArrayRefIT_EE
Unexecuted instantiation: _ZN4llvm10hash_valueIN4mlir4TypeEEENS_9hash_codeENS_8ArrayRefIT_EE
555
556
} // end namespace llvm
557
558
#endif // LLVM_ADT_ARRAYREF_H