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/lld/Common/Timer.h b/linux-x64/clang/include/lld/Common/Timer.h
index 4a298b0..95e811a 100644
--- a/linux-x64/clang/include/lld/Common/Timer.h
+++ b/linux-x64/clang/include/lld/Common/Timer.h
@@ -12,6 +12,7 @@
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/StringRef.h"
#include <assert.h>
+#include <atomic>
#include <chrono>
#include <map>
#include <memory>
@@ -27,6 +28,8 @@
void stop();
+ std::chrono::time_point<std::chrono::high_resolution_clock> startTime;
+
Timer *t = nullptr;
};
@@ -36,8 +39,7 @@
static Timer &root();
- void start();
- void stop();
+ void addToTotal(std::chrono::nanoseconds time) { total += time.count(); }
void print();
double millis() const;
@@ -46,11 +48,9 @@
explicit Timer(llvm::StringRef name);
void print(int depth, double totalDuration, bool recurse = true) const;
- std::chrono::time_point<std::chrono::high_resolution_clock> startTime;
- std::chrono::nanoseconds total;
+ std::atomic<std::chrono::nanoseconds::rep> total;
std::vector<Timer *> children;
std::string name;
- Timer *parent;
};
} // namespace lld