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/lldb/Expression/UtilityFunction.h b/linux-x64/clang/include/lldb/Expression/UtilityFunction.h
index 26da081..99fb321 100644
--- a/linux-x64/clang/include/lldb/Expression/UtilityFunction.h
+++ b/linux-x64/clang/include/lldb/Expression/UtilityFunction.h
@@ -7,8 +7,8 @@
//
//===----------------------------------------------------------------------===//
-#ifndef liblldb_UtilityFunction_h_
-#define liblldb_UtilityFunction_h_
+#ifndef LLDB_EXPRESSION_UTILITYFUNCTION_H
+#define LLDB_EXPRESSION_UTILITYFUNCTION_H
#include <memory>
#include <string>
@@ -28,12 +28,13 @@
/// self-contained function meant to be used from other code. Utility
/// functions can perform error-checking for ClangUserExpressions,
class UtilityFunction : public Expression {
+ // LLVM RTTI support
+ static char ID;
+
public:
- /// LLVM-style RTTI support.
- static bool classof(const Expression *E) {
- return E->getKind() == eKindUtilityFunction;
- }
-
+ bool isA(const void *ClassID) const override { return ClassID == &ID; }
+ static bool classof(const Expression *obj) { return obj->isA(&ID); }
+
/// Constructor
///
/// \param[in] text
@@ -41,8 +42,8 @@
///
/// \param[in] name
/// The name of the function, as used in the text.
- UtilityFunction(ExecutionContextScope &exe_scope, const char *text,
- const char *name, ExpressionKind kind);
+ UtilityFunction(ExecutionContextScope &exe_scope, std::string text,
+ std::string name);
~UtilityFunction() override;
@@ -59,16 +60,16 @@
virtual bool Install(DiagnosticManager &diagnostic_manager,
ExecutionContext &exe_ctx) = 0;
- /// Check whether the given PC is inside the function
+ /// Check whether the given address is inside the function
///
/// Especially useful if the function dereferences nullptr to indicate a
/// failed assert.
///
- /// \param[in] pc
- /// The program counter to check.
+ /// \param[in] address
+ /// The address to check.
///
/// \return
- /// True if the program counter falls within the function's bounds;
+ /// True if the address falls within the function's bounds;
/// false if not (or the function is not JIT compiled)
bool ContainsAddress(lldb::addr_t address) {
// nothing is both >= LLDB_INVALID_ADDRESS and < LLDB_INVALID_ADDRESS, so
@@ -109,12 +110,13 @@
protected:
std::shared_ptr<IRExecutionUnit> m_execution_unit_sp;
lldb::ModuleWP m_jit_module_wp;
- std::string m_function_text; ///< The text of the function. Must be a
- ///well-formed translation unit.
- std::string m_function_name; ///< The name of the function.
+ /// The text of the function. Must be a well-formed translation unit.
+ std::string m_function_text;
+ /// The name of the function.
+ std::string m_function_name;
std::unique_ptr<FunctionCaller> m_caller_up;
};
} // namespace lldb_private
-#endif // liblldb_UtilityFunction_h_
+#endif // LLDB_EXPRESSION_UTILITYFUNCTION_H