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/IR/ValueMap.h b/linux-x64/clang/include/llvm/IR/ValueMap.h
index 6a79b1d..a5a06b7 100644
--- a/linux-x64/clang/include/llvm/IR/ValueMap.h
+++ b/linux-x64/clang/include/llvm/IR/ValueMap.h
@@ -33,11 +33,11 @@
#include "llvm/IR/ValueHandle.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/Mutex.h"
-#include "llvm/Support/UniqueLock.h"
#include <algorithm>
#include <cassert>
#include <cstddef>
#include <iterator>
+#include <mutex>
#include <type_traits>
#include <utility>
@@ -93,7 +93,6 @@
MapT Map;
Optional<MDMapT> MDMap;
ExtraData Data;
- bool MayMapMetadata = true;
public:
using key_type = KeyT;
@@ -120,10 +119,6 @@
}
Optional<MDMapT> &getMDMap() { return MDMap; }
- bool mayMapMetadata() const { return MayMapMetadata; }
- void enableMapMetadata() { MayMapMetadata = true; }
- void disableMapMetadata() { MayMapMetadata = false; }
-
/// Get the mapped metadata, if it's in the map.
Optional<Metadata *> getMappedMD(const Metadata *MD) const {
if (!MDMap)
@@ -248,7 +243,7 @@
friend struct DenseMapInfo<ValueMapCallbackVH>;
using ValueMapT = ValueMap<KeyT, ValueT, Config>;
- using KeySansPointerT = typename std::remove_pointer<KeyT>::type;
+ using KeySansPointerT = std::remove_pointer_t<KeyT>;
ValueMapT *Map;
@@ -266,9 +261,9 @@
// Make a copy that won't get changed even when *this is destroyed.
ValueMapCallbackVH Copy(*this);
typename Config::mutex_type *M = Config::getMutex(Copy.Map->Data);
- unique_lock<typename Config::mutex_type> Guard;
+ std::unique_lock<typename Config::mutex_type> Guard;
if (M)
- Guard = unique_lock<typename Config::mutex_type>(*M);
+ Guard = std::unique_lock<typename Config::mutex_type>(*M);
Config::onDelete(Copy.Map->Data, Copy.Unwrap()); // May destroy *this.
Copy.Map->Map.erase(Copy); // Definitely destroys *this.
}
@@ -279,9 +274,9 @@
// Make a copy that won't get changed even when *this is destroyed.
ValueMapCallbackVH Copy(*this);
typename Config::mutex_type *M = Config::getMutex(Copy.Map->Data);
- unique_lock<typename Config::mutex_type> Guard;
+ std::unique_lock<typename Config::mutex_type> Guard;
if (M)
- Guard = unique_lock<typename Config::mutex_type>(*M);
+ Guard = std::unique_lock<typename Config::mutex_type>(*M);
KeyT typed_new_key = cast<KeySansPointerT>(new_key);
// Can destroy *this: