Add a Type::Payload typedef. (NFC)
authorAdrian Prantl <aprantl@apple.com>
Tue, 31 Mar 2020 21:12:11 +0000 (14:12 -0700)
committerAdrian Prantl <aprantl@apple.com>
Tue, 31 Mar 2020 21:32:53 +0000 (14:32 -0700)
This addresses review feedback from Raphael that I missed before
landing the change that introduced the payload field.

lldb/include/lldb/Symbol/Type.h
lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.h

index d18027c..dfff300 100644 (file)
@@ -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();
 
index a609b06..7be259a 100644 (file)
@@ -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);