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/OptBisect.h b/linux-x64/clang/include/llvm/IR/OptBisect.h
index 1b2b0bd..6c2a1b0 100644
--- a/linux-x64/clang/include/llvm/IR/OptBisect.h
+++ b/linux-x64/clang/include/llvm/IR/OptBisect.h
@@ -15,6 +15,7 @@
#define LLVM_IR_OPTBISECT_H
#include "llvm/ADT/StringRef.h"
+#include "llvm/Support/ManagedStatic.h"
namespace llvm {
@@ -32,7 +33,7 @@
return true;
}
- /// isEnabled should return true before calling shouldRunPass
+ /// isEnabled() should return true before calling shouldRunPass().
virtual bool isEnabled() const { return false; }
};
@@ -55,6 +56,14 @@
/// Checks the bisect limit to determine if the specified pass should run.
///
+ /// This forwards to checkPass().
+ bool shouldRunPass(const Pass *P, StringRef IRDescription) override;
+
+ /// isEnabled() should return true before calling shouldRunPass().
+ bool isEnabled() const override { return BisectEnabled; }
+
+ /// Checks the bisect limit to determine if the specified pass should run.
+ ///
/// If the bisect limit is set to -1, the function prints a message describing
/// the pass and the bisect number assigned to it and return true. Otherwise,
/// the function prints a message with the bisect number assigned to the
@@ -64,17 +73,16 @@
/// Most passes should not call this routine directly. Instead, they are
/// called through helper routines provided by the pass base classes. For
/// instance, function passes should call FunctionPass::skipFunction().
- bool shouldRunPass(const Pass *P, StringRef IRDescription) override;
-
- /// isEnabled should return true before calling shouldRunPass
- bool isEnabled() const override { return BisectEnabled; }
-private:
bool checkPass(const StringRef PassName, const StringRef TargetDesc);
+private:
bool BisectEnabled = false;
unsigned LastBisectNum = 0;
};
+/// Singleton instance of the OptBisect class, so multiple pass managers don't
+/// need to coordinate their uses of OptBisect.
+extern ManagedStatic<OptBisect> OptBisector;
} // end namespace llvm
#endif // LLVM_IR_OPTBISECT_H