Update prebuilt Clang to r416183b from Android.
https://android.googlesource.com/platform/prebuilts/clang/host/
linux-x86/+/06a71ddac05c22edb2d10b590e1769b3f8619bef
clang 12.0.5 (based on r416183b) from build 7284624.
Change-Id: I277a316abcf47307562d8b748b84870f31a72866
Signed-off-by: Olivier Deprez <olivier.deprez@arm.com>
diff --git a/linux-x64/clang/include/llvm/ADT/DenseSet.h b/linux-x64/clang/include/llvm/ADT/DenseSet.h
index 9afb715..edce7c4 100644
--- a/linux-x64/clang/include/llvm/ADT/DenseSet.h
+++ b/linux-x64/clang/include/llvm/ADT/DenseSet.h
@@ -66,6 +66,12 @@
explicit DenseSetImpl(unsigned InitialReserve = 0) : TheMap(InitialReserve) {}
+ template <typename InputIt>
+ DenseSetImpl(const InputIt &I, const InputIt &E)
+ : DenseSetImpl(PowerOf2Ceil(std::distance(I, E))) {
+ insert(I, E);
+ }
+
DenseSetImpl(std::initializer_list<ValueT> Elems)
: DenseSetImpl(PowerOf2Ceil(Elems.size())) {
insert(Elems.begin(), Elems.end());
@@ -124,8 +130,12 @@
Iterator& operator++() { ++I; return *this; }
Iterator operator++(int) { auto T = *this; ++I; return T; }
- bool operator==(const ConstIterator& X) const { return I == X.I; }
- bool operator!=(const ConstIterator& X) const { return I != X.I; }
+ friend bool operator==(const Iterator &X, const Iterator &Y) {
+ return X.I == Y.I;
+ }
+ friend bool operator!=(const Iterator &X, const Iterator &Y) {
+ return X.I != Y.I;
+ }
};
class ConstIterator {
@@ -149,8 +159,12 @@
ConstIterator& operator++() { ++I; return *this; }
ConstIterator operator++(int) { auto T = *this; ++I; return T; }
- bool operator==(const ConstIterator& X) const { return I == X.I; }
- bool operator!=(const ConstIterator& X) const { return I != X.I; }
+ friend bool operator==(const ConstIterator &X, const ConstIterator &Y) {
+ return X.I == Y.I;
+ }
+ friend bool operator!=(const ConstIterator &X, const ConstIterator &Y) {
+ return X.I != Y.I;
+ }
};
using iterator = Iterator;
@@ -167,6 +181,11 @@
return ConstIterator(TheMap.find(V));
}
+ /// Check if the set contains the given element.
+ bool contains(const_arg_type_t<ValueT> V) const {
+ return TheMap.find(V) != TheMap.end();
+ }
+
/// Alternative version of find() which allows a different, and possibly less
/// expensive, key type.
/// The DenseMapInfo is responsible for supplying methods