diff options
author | Fangrui Song <maskray@google.com> | 2019-05-14 08:55:50 +0000 |
---|---|---|
committer | Fangrui Song <maskray@google.com> | 2019-05-14 08:55:50 +0000 |
commit | efe8e7e36d01cfa19b8c405fffc3411c8c74cabf (patch) | |
tree | c606cbe8c4fbe0121d85b6d1e02ca27ed505fdf4 /lldb/source/Plugins | |
parent | 004393681c25e34e921adccc69ae6378090dee54 (diff) | |
download | bcm5719-llvm-efe8e7e36d01cfa19b8c405fffc3411c8c74cabf.tar.gz bcm5719-llvm-efe8e7e36d01cfa19b8c405fffc3411c8c74cabf.zip |
typedef enum -> enum
Reviewed By: labath
Differential Revision: https://reviews.llvm.org/D61883
llvm-svn: 360654
Diffstat (limited to 'lldb/source/Plugins')
9 files changed, 40 insertions, 55 deletions
diff --git a/lldb/source/Plugins/Instruction/ARM/EmulateInstructionARM.h b/lldb/source/Plugins/Instruction/ARM/EmulateInstructionARM.h index 2254d3c213c..13d7fc061be 100644 --- a/lldb/source/Plugins/Instruction/ARM/EmulateInstructionARM.h +++ b/lldb/source/Plugins/Instruction/ARM/EmulateInstructionARM.h @@ -45,7 +45,7 @@ private: class EmulateInstructionARM : public EmulateInstruction { public: - typedef enum { + enum ARMEncoding { eEncodingA1, eEncodingA2, eEncodingA3, @@ -56,7 +56,7 @@ public: eEncodingT3, eEncodingT4, eEncodingT5 - } ARMEncoding; + }; static void Initialize(); @@ -291,7 +291,7 @@ public: protected: // Typedef for the callback function used during the emulation. // Pass along (ARMEncoding)encoding as the callback data. - typedef enum { eSize16, eSize32 } ARMInstrSize; + enum ARMInstrSize { eSize16, eSize32 }; typedef struct { uint32_t mask; diff --git a/lldb/source/Plugins/Instruction/ARM64/EmulateInstructionARM64.h b/lldb/source/Plugins/Instruction/ARM64/EmulateInstructionARM64.h index 22123bfe933..03a57a2cf92 100644 --- a/lldb/source/Plugins/Instruction/ARM64/EmulateInstructionARM64.h +++ b/lldb/source/Plugins/Instruction/ARM64/EmulateInstructionARM64.h @@ -73,25 +73,25 @@ public: bool CreateFunctionEntryUnwind(lldb_private::UnwindPlan &unwind_plan) override; - typedef enum { AddrMode_OFF, AddrMode_PRE, AddrMode_POST } AddrMode; + enum AddrMode { AddrMode_OFF, AddrMode_PRE, AddrMode_POST }; - typedef enum { + enum BranchType { BranchType_CALL, BranchType_ERET, BranchType_DRET, BranchType_RET, BranchType_JMP - } BranchType; + }; - typedef enum { CountOp_CLZ, CountOp_CLS, CountOp_CNT } CountOp; + enum CountOp { CountOp_CLZ, CountOp_CLS, CountOp_CNT }; - typedef enum { RevOp_RBIT, RevOp_REV16, RevOp_REV32, RevOp_REV64 } RevOp; + enum RevOp { RevOp_RBIT, RevOp_REV16, RevOp_REV32, RevOp_REV64 }; - typedef enum { BitwiseOp_NOT, BitwiseOp_RBIT } BitwiseOp; + enum BitwiseOp { BitwiseOp_NOT, BitwiseOp_RBIT }; - typedef enum { EL0 = 0, EL1 = 1, EL2 = 2, EL3 = 3 } ExceptionLevel; + enum ExceptionLevel { EL0 = 0, EL1 = 1, EL2 = 2, EL3 = 3 }; - typedef enum { + enum ExtendType { ExtendType_SXTB, ExtendType_SXTH, ExtendType_SXTW, @@ -100,44 +100,36 @@ public: ExtendType_UXTH, ExtendType_UXTW, ExtendType_UXTX - } ExtendType; + }; - typedef enum { ExtractType_LEFT, ExtractType_RIGHT } ExtractType; + enum ExtractType { ExtractType_LEFT, ExtractType_RIGHT }; - typedef enum { LogicalOp_AND, LogicalOp_EOR, LogicalOp_ORR } LogicalOp; + enum LogicalOp { LogicalOp_AND, LogicalOp_EOR, LogicalOp_ORR }; - typedef enum { MemOp_LOAD, MemOp_STORE, MemOp_PREFETCH, MemOp_NOP } MemOp; + enum MemOp { MemOp_LOAD, MemOp_STORE, MemOp_PREFETCH, MemOp_NOP }; - typedef enum { MoveWideOp_N, MoveWideOp_Z, MoveWideOp_K } MoveWideOp; + enum MoveWideOp { MoveWideOp_N, MoveWideOp_Z, MoveWideOp_K }; - typedef enum { - ShiftType_LSL, - ShiftType_LSR, - ShiftType_ASR, - ShiftType_ROR - } ShiftType; + enum ShiftType { ShiftType_LSL, ShiftType_LSR, ShiftType_ASR, ShiftType_ROR }; - typedef enum { SP0 = 0, SPx = 1 } StackPointerSelection; + enum StackPointerSelection { SP0 = 0, SPx = 1 }; - typedef enum { - Unpredictable_WBOVERLAP, - Unpredictable_LDPOVERLAP - } Unpredictable; + enum Unpredictable { Unpredictable_WBOVERLAP, Unpredictable_LDPOVERLAP }; - typedef enum { + enum ConstraintType { Constraint_NONE, Constraint_UNKNOWN, Constraint_SUPPRESSWB, Constraint_NOP - } ConstraintType; + }; - typedef enum { + enum AccType { AccType_NORMAL, AccType_UNPRIV, AccType_STREAM, AccType_ALIGNED, AccType_ORDERED - } AccType; + }; typedef struct { uint32_t N : 1, V : 1, C : 1, diff --git a/lldb/source/Plugins/JITLoader/GDB/JITLoaderGDB.cpp b/lldb/source/Plugins/JITLoader/GDB/JITLoaderGDB.cpp index 890d9f996be..140d09ed43c 100644 --- a/lldb/source/Plugins/JITLoader/GDB/JITLoaderGDB.cpp +++ b/lldb/source/Plugins/JITLoader/GDB/JITLoaderGDB.cpp @@ -35,11 +35,7 @@ using namespace lldb; using namespace lldb_private; // Debug Interface Structures -typedef enum { - JIT_NOACTION = 0, - JIT_REGISTER_FN, - JIT_UNREGISTER_FN -} jit_actions_t; +enum jit_actions_t { JIT_NOACTION = 0, JIT_REGISTER_FN, JIT_UNREGISTER_FN }; template <typename ptr_t> struct jit_code_entry { ptr_t next_entry; // pointer diff --git a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.h b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.h index a172c54ebf2..f1356afe6df 100644 --- a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.h +++ b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.h @@ -36,7 +36,7 @@ public: struct DispatchFunction { public: - typedef enum { eFixUpNone, eFixUpFixed, eFixUpToFix } FixUpState; + enum FixUpState { eFixUpNone, eFixUpFixed, eFixUpToFix }; const char *name; bool stret_return; diff --git a/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.h b/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.h index 9b696de9a47..93edaa72b81 100644 --- a/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.h +++ b/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.h @@ -16,7 +16,7 @@ class ObjectFilePECOFF : public lldb_private::ObjectFile { public: - typedef enum MachineType { + enum MachineType { MachineUnknown = 0x0, MachineAm33 = 0x1d3, MachineAmd64 = 0x8664, @@ -39,7 +39,7 @@ public: MachineSh5 = 0x1a8, MachineThumb = 0x1c2, MachineWcemIpsv2 = 0x169 - } MachineType; + }; ObjectFilePECOFF(const lldb::ModuleSP &module_sp, lldb::DataBufferSP &data_sp, lldb::offset_t data_offset, @@ -206,10 +206,10 @@ protected: data_dirs; // will contain num_data_dir_entries entries } coff_opt_header_t; - typedef enum coff_data_dir_type { + enum coff_data_dir_type { coff_data_dir_export_table = 0, coff_data_dir_import_table = 1, - } coff_data_dir_type; + }; typedef struct section_header { char name[8]; diff --git a/lldb/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.h b/lldb/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.h index fed6128c17f..47013c97209 100644 --- a/lldb/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.h +++ b/lldb/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.h @@ -26,7 +26,7 @@ public: const static uint32_t kMaxPacketSize = 1200; const static uint32_t kMaxDataSize = 1024; typedef lldb_private::StreamBuffer<1024> PacketStreamType; - typedef enum { + enum CommandType { KDP_CONNECT = 0u, KDP_DISCONNECT, KDP_HOSTINFO, @@ -59,23 +59,23 @@ public: KDP_READMSR64, KDP_WRITEMSR64, KDP_DUMPINFO - } CommandType; + }; enum { KDP_FEATURE_BP = (1u << 0) }; - typedef enum { + enum KDPError { KDP_PROTERR_SUCCESS = 0, KDP_PROTERR_ALREADY_CONNECTED, KDP_PROTERR_BAD_NBYTES, KDP_PROTERR_BADFLAVOR - } KDPError; + }; - typedef enum { + enum PacketType { ePacketTypeRequest = 0x00u, ePacketTypeReply = 0x80u, ePacketTypeMask = 0x80u, eCommandTypeMask = 0x7fu - } PacketType; + }; // Constructors and Destructors CommunicationKDP(const char *comm_name); diff --git a/lldb/source/Plugins/Process/Utility/ARMDefines.h b/lldb/source/Plugins/Process/Utility/ARMDefines.h index 87f77b93299..1f7eb54d10e 100644 --- a/lldb/source/Plugins/Process/Utility/ARMDefines.h +++ b/lldb/source/Plugins/Process/Utility/ARMDefines.h @@ -19,14 +19,14 @@ namespace lldb_private { // ARM shifter types -typedef enum { +enum ARM_ShifterType { SRType_LSL, SRType_LSR, SRType_ASR, SRType_ROR, SRType_RRX, SRType_Invalid -} ARM_ShifterType; +}; // ARM conditions // Meaning (integer) Meaning (floating-point) // Condition flags diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.h b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.h index e3dc9d2d1d7..bb777a5c26a 100644 --- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.h +++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.h @@ -29,14 +29,14 @@ namespace lldb_private { namespace process_gdb_remote { -typedef enum { +enum GDBStoppointType { eStoppointInvalid = -1, eBreakpointSoftware = 0, eBreakpointHardware, eWatchpointWrite, eWatchpointRead, eWatchpointReadWrite -} GDBStoppointType; +}; enum class CompressionType { None = 0, // no compression diff --git a/lldb/source/Plugins/Process/mach-core/ProcessMachCore.h b/lldb/source/Plugins/Process/mach-core/ProcessMachCore.h index 3e446f67e12..e6b1256b11a 100644 --- a/lldb/source/Plugins/Process/mach-core/ProcessMachCore.h +++ b/lldb/source/Plugins/Process/mach-core/ProcessMachCore.h @@ -88,10 +88,7 @@ protected: private: bool GetDynamicLoaderAddress(lldb::addr_t addr); - typedef enum CorefilePreference { - eUserProcessCorefile, - eKernelCorefile - } CorefilePreferences; + enum CorefilePreference { eUserProcessCorefile, eKernelCorefile }; /// If a core file can be interpreted multiple ways, this establishes /// which style wins. |