[Lldb-commits] [PATCH] D14091: Remove some useless typedef's.

Stephane Sezer via lldb-commits lldb-commits at lists.llvm.org
Mon Oct 26 13:23:19 PDT 2015


sas created this revision.
sas added reviewers: clayborg, zturner.
sas added a subscriber: lldb-commits.

This does not have any functionnal difference but I found myself
searching for 'struct RegisterInfo$' to find a definition and couldn't
find it. The version without typedef seems more common so let's try and
be consistent.

http://reviews.llvm.org/D14091

Files:
  include/lldb/lldb-private-types.h

Index: include/lldb/lldb-private-types.h
===================================================================
--- include/lldb/lldb-private-types.h
+++ include/lldb/lldb-private-types.h
@@ -35,7 +35,7 @@
     // name (optional), encoding, size in bytes and the default display
     // format.
     //----------------------------------------------------------------------
-    typedef struct
+    struct RegisterInfo
     {
         const char *name;        // Name of this register, can't be NULL
         const char *alt_name;    // Alternate name of this register, can be NULL
@@ -54,12 +54,12 @@
                                    // null, all registers in this list will be invalidated when the value of this
                                    // register changes.  For example, the invalidate list for eax would be rax
                                    // ax, ah, and al.
-    } RegisterInfo;
+    };
 
     //----------------------------------------------------------------------
     // Registers are grouped into register sets
     //----------------------------------------------------------------------
-    typedef struct
+    struct RegisterSet
     {
         const char *name;           // Name of this register set
         const char *short_name;     // A short name for this register set
@@ -69,23 +69,23 @@
                                     // register array.  For example, if eax is defined at index 4 for a
                                     // particular RegisterContext, eax would be included in this RegisterSet
                                     // by adding the value 4.  Not by adding the value lldb_eax_i386.
-    } RegisterSet;
+    };
 
-    typedef struct
+    struct OptionEnumValueElement
     {
         int64_t value;
         const char *string_value;
         const char *usage;
-    } OptionEnumValueElement;
+    };
 
     struct OptionValidator
     {
         virtual ~OptionValidator() { }
         virtual bool IsValid(Platform &platform, const ExecutionContext &target) const = 0;
         virtual const char * ShortConditionString() const = 0;
         virtual const char * LongConditionString() const = 0;
     };
-    
+
     struct OptionDefinition
     {
         uint32_t usage_mask;                     // Used to mark options that can be used together.  If (1 << n & usage_mask) != 0


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D14091.38455.patch
Type: text/x-patch
Size: 2345 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20151026/59c84272/attachment-0001.bin>


More information about the lldb-commits mailing list