From 0e1e0ce556810ad5f9d45485e686f0653530516c Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Sat, 2 Sep 2023 23:17:18 +0200 Subject: Merge llvm-project main llvmorg-17-init-19304-gd0b54bb50e51 This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp to llvm-project main llvmorg-17-init-19304-gd0b54bb50e51, the last commit before the upstream release/17.x branch was created. PR: 273753 MFC after: 1 month (cherry picked from commit 06c3fb2749bda94cb5201f81ffdb8fa6c3161b2e) --- .../Plugins/ScriptInterpreter/Python/PythonDataObjects.h | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'contrib/llvm-project/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h') diff --git a/contrib/llvm-project/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h b/contrib/llvm-project/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h index 365d499bead8..012f16e95e77 100644 --- a/contrib/llvm-project/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h +++ b/contrib/llvm-project/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h @@ -201,6 +201,7 @@ template <> struct PythonFormat : PassthroughFormat {}; template <> struct PythonFormat : PassthroughFormat {}; template <> struct PythonFormat : PassthroughFormat {}; +template <> struct PythonFormat : PassthroughFormat {}; template <> struct PythonFormat : PassthroughFormat {}; template <> struct PythonFormat : PassthroughFormat {}; @@ -342,6 +343,15 @@ public: return python::Take(obj); } + llvm::Expected GetType() const { + if (!m_py_obj) + return nullDeref(); + PyObject *obj = PyObject_Type(m_py_obj); + if (!obj) + return exception(); + return python::Take(obj); + } + llvm::Expected IsTrue() { if (!m_py_obj) return nullDeref(); @@ -353,7 +363,7 @@ public: llvm::Expected AsLongLong() const; - llvm::Expected AsUnsignedLongLong() const; + llvm::Expected AsUnsignedLongLong() const; // wraps on overflow, instead of raising an error. llvm::Expected AsModuloUnsignedLongLong() const; @@ -479,6 +489,10 @@ public: void SetInteger(int64_t value); StructuredData::IntegerSP CreateStructuredInteger() const; + + StructuredData::UnsignedIntegerSP CreateStructuredUnsignedInteger() const; + + StructuredData::SignedIntegerSP CreateStructuredSignedInteger() const; }; class PythonBoolean : public TypedPythonObject { -- cgit v1.2.3