From 00efcd6fffa533e5a4aa5646e678d57df0f9aca8 Mon Sep 17 00:00:00 2001 From: Adrian Prantl Date: Tue, 31 Mar 2020 14:12:11 -0700 Subject: [PATCH] Add a Type::Payload typedef. (NFC) This addresses review feedback from Raphael that I missed before landing the change that introduced the payload field. --- lldb/include/lldb/Symbol/Type.h | 7 ++++--- lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.h | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/lldb/include/lldb/Symbol/Type.h b/lldb/include/lldb/Symbol/Type.h index d18027c..dfff300 100644 --- a/lldb/include/lldb/Symbol/Type.h +++ b/lldb/include/lldb/Symbol/Type.h @@ -196,10 +196,11 @@ public: uint32_t GetEncodingMask(); + typedef uint32_t Payload; /// Return the language-specific payload. - uint32_t GetPayload() { return m_payload; } + Payload GetPayload() { return m_payload; } /// Return the language-specific payload. - void SetPayload(uint32_t opaque_payload) { m_payload = opaque_payload; } + void SetPayload(Payload opaque_payload) { m_payload = opaque_payload; } protected: ConstString m_name; @@ -215,7 +216,7 @@ protected: CompilerType m_compiler_type; ResolveState m_compiler_type_resolve_state; /// Language-specific flags. - uint32_t m_payload; + Payload m_payload; Type *GetEncodingType(); diff --git a/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.h b/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.h index a609b06..7be259a 100644 --- a/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.h +++ b/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.h @@ -56,7 +56,7 @@ class Declaration; /// The implementation of lldb::Type's m_payload field for TypeSystemClang. class TypePayloadClang { /// Layout: bit 31 ... IsCompleteObjCClass. - uint32_t m_payload = 0; + Type::Payload m_payload = 0; public: TypePayloadClang() = default; explicit TypePayloadClang(bool is_complete_objc_class); -- 2.7.4