Index: include/lldb/Breakpoint/Breakpoint.h =================================================================== --- include/lldb/Breakpoint/Breakpoint.h +++ include/lldb/Breakpoint/Breakpoint.h @@ -82,7 +82,7 @@ /// An enum specifying the match style for breakpoint settings. At present /// only used for function name style breakpoints. - typedef enum { Exact, Regexp, Glob } MatchType; + enum MatchType { Exact, Regexp, Glob }; private: enum class OptionNames : uint32_t { Names = 0, Hardware, LastOptionName }; Index: include/lldb/Core/Address.h =================================================================== --- include/lldb/Core/Address.h +++ include/lldb/Core/Address.h @@ -81,7 +81,7 @@ public: /// Dump styles allow the Address::Dump(Stream *,DumpStyle) const function /// to display Address contents in a variety of ways. - typedef enum { + enum DumpStyle { DumpStyleInvalid, ///< Invalid dump style DumpStyleSectionNameOffset, ///< Display as the section name + offset. ///< \code @@ -121,7 +121,7 @@ DumpStyleResolvedPointerDescription ///< Dereference a pointer at the ///current address and then lookup the ///< dereferenced address using DumpStyleResolvedDescription - } DumpStyle; + }; /// Default constructor. /// Index: include/lldb/Core/AddressResolver.h =================================================================== --- include/lldb/Core/AddressResolver.h +++ include/lldb/Core/AddressResolver.h @@ -36,7 +36,7 @@ class AddressResolver : public Searcher { public: - typedef enum { Exact, Regexp, Glob } MatchType; + enum MatchType { Exact, Regexp, Glob }; AddressResolver(); Index: include/lldb/Core/SearchFilter.h =================================================================== --- include/lldb/Core/SearchFilter.h +++ include/lldb/Core/SearchFilter.h @@ -59,11 +59,11 @@ class Searcher { public: - typedef enum { + enum CallbackReturn { eCallbackReturnStop = 0, // Stop the iteration eCallbackReturnContinue, // Continue the iteration eCallbackReturnPop // Pop one level up and continue iterating - } CallbackReturn; + }; Searcher(); Index: include/lldb/Host/Socket.h =================================================================== --- include/lldb/Host/Socket.h +++ include/lldb/Host/Socket.h @@ -39,12 +39,12 @@ class Socket : public IOObject { public: - typedef enum { + enum SocketProtocol { ProtocolTcp, ProtocolUdp, ProtocolUnixDomain, ProtocolUnixAbstract - } SocketProtocol; + }; static const NativeSocket kInvalidSocketValue; Index: include/lldb/Interpreter/CommandCompletions.h =================================================================== --- include/lldb/Interpreter/CommandCompletions.h +++ include/lldb/Interpreter/CommandCompletions.h @@ -30,7 +30,7 @@ CompletionRequest &request, // A search filter to limit the search... lldb_private::SearchFilter *searcher); - typedef enum { + enum CommonCompletionTypes { eNoCompletion = 0u, eSourceFileCompletion = (1u << 0), eDiskFileCompletion = (1u << 1), @@ -45,7 +45,7 @@ // you can add custom enums starting from here in your Option class. Also // if you & in this bit the base code will not process the option. eCustomCompletion = (1u << 9) - } CommonCompletionTypes; + }; struct CommonCompletionElement { uint32_t type; Index: include/lldb/Interpreter/OptionGroupWatchpoint.h =================================================================== --- include/lldb/Interpreter/OptionGroupWatchpoint.h +++ include/lldb/Interpreter/OptionGroupWatchpoint.h @@ -34,12 +34,12 @@ // Note: // eWatchRead == LLDB_WATCH_TYPE_READ; and // eWatchWrite == LLDB_WATCH_TYPE_WRITE - typedef enum WatchType { + enum WatchType { eWatchInvalid = 0, eWatchRead, eWatchWrite, eWatchReadWrite - } WatchType; + }; WatchType watch_type; uint32_t watch_size; Index: include/lldb/Interpreter/OptionValue.h =================================================================== --- include/lldb/Interpreter/OptionValue.h +++ include/lldb/Interpreter/OptionValue.h @@ -22,7 +22,7 @@ // OptionValue class OptionValue { public: - typedef enum { + enum Type { eTypeInvalid = 0, eTypeArch, eTypeArgs, @@ -43,7 +43,7 @@ eTypeUInt64, eTypeUUID, eTypeFormatEntity - } Type; + }; enum { eDumpOptionName = (1u << 0), Index: include/lldb/Interpreter/ScriptInterpreter.h =================================================================== --- include/lldb/Interpreter/ScriptInterpreter.h +++ include/lldb/Interpreter/ScriptInterpreter.h @@ -34,7 +34,7 @@ class ScriptInterpreter : public PluginInterface { public: - typedef enum { + enum ScriptReturnType { eScriptReturnTypeCharPtr, eScriptReturnTypeBool, eScriptReturnTypeShortInt, @@ -50,7 +50,7 @@ eScriptReturnTypeChar, eScriptReturnTypeCharStrOrNone, eScriptReturnTypeOpaqueObject - } ScriptReturnType; + }; ScriptInterpreter(Debugger &debugger, lldb::ScriptLanguage script_lang); Index: include/lldb/Symbol/ObjectFile.h =================================================================== --- include/lldb/Symbol/ObjectFile.h +++ include/lldb/Symbol/ObjectFile.h @@ -61,7 +61,7 @@ friend class lldb_private::Module; public: - typedef enum { + enum Type { eTypeInvalid = 0, eTypeCoreFile, /// A core file that has a checkpoint of a program's /// execution state @@ -74,16 +74,16 @@ /// execution eTypeJIT, /// JIT code that has symbols, sections and possibly debug info eTypeUnknown - } Type; + }; - typedef enum { + enum Strata { eStrataInvalid = 0, eStrataUnknown, eStrataUser, eStrataKernel, eStrataRawImage, eStrataJIT - } Strata; + }; struct LoadableData { lldb::addr_t Dest; Index: include/lldb/Symbol/SymbolContext.h =================================================================== --- include/lldb/Symbol/SymbolContext.h +++ include/lldb/Symbol/SymbolContext.h @@ -351,7 +351,7 @@ class SymbolContextSpecifier { public: - typedef enum SpecificationType { + enum SpecificationType { eNothingSpecified = 0, eModuleSpecified = 1 << 0, eFileSpecified = 1 << 1, @@ -360,7 +360,7 @@ eFunctionSpecified = 1 << 4, eClassOrNamespaceSpecified = 1 << 5, eAddressRangeSpecified = 1 << 6 - } SpecificationType; + }; // This one produces a specifier that matches everything... SymbolContextSpecifier(const lldb::TargetSP &target_sp); Index: include/lldb/Symbol/Symtab.h =================================================================== --- include/lldb/Symbol/Symtab.h +++ include/lldb/Symbol/Symtab.h @@ -23,17 +23,17 @@ typedef std::vector IndexCollection; typedef UniqueCStringMap NameToIndexMap; - typedef enum Debug { + enum Debug { eDebugNo, // Not a debug symbol eDebugYes, // A debug symbol eDebugAny - } Debug; + }; - typedef enum Visibility { + enum Visibility { eVisibilityAny, eVisibilityExtern, eVisibilityPrivate - } Visibility; + }; Symtab(ObjectFile *objfile); ~Symtab(); Index: include/lldb/Symbol/Type.h =================================================================== --- include/lldb/Symbol/Type.h +++ include/lldb/Symbol/Type.h @@ -59,7 +59,7 @@ class Type : public std::enable_shared_from_this, public UserID { public: - typedef enum EncodingDataTypeTag { + enum EncodingDataType { eEncodingInvalid, eEncodingIsUID, ///< This type is the type whose UID is m_encoding_uid eEncodingIsConstUID, ///< This type is the type whose UID is m_encoding_uid @@ -77,7 +77,7 @@ eEncodingIsRValueReferenceUID, ///< This type is R value reference to a type ///whose UID is m_encoding_uid eEncodingIsSyntheticUID - } EncodingDataType; + }; // We must force the underlying type of the enum to be unsigned here. Not // all compilers behave the same with regards to the default underlying type Index: include/lldb/Target/Process.h =================================================================== --- include/lldb/Target/Process.h +++ include/lldb/Target/Process.h @@ -2509,11 +2509,11 @@ // RequestResume, don't call Resume directly. class NextEventAction { public: - typedef enum EventActionResult { + enum EventActionResult { eEventActionSuccess, eEventActionRetry, eEventActionExit - } EventActionResult; + }; NextEventAction(Process *process) : m_process(process) {} Index: include/lldb/Target/Target.h =================================================================== --- include/lldb/Target/Target.h +++ include/lldb/Target/Target.h @@ -38,29 +38,29 @@ OptionEnumValues GetDynamicValueTypes(); -typedef enum InlineStrategy { +enum InlineStrategy { eInlineBreakpointsNever = 0, eInlineBreakpointsHeaders, eInlineBreakpointsAlways -} InlineStrategy; +}; -typedef enum LoadScriptFromSymFile { +enum LoadScriptFromSymFile { eLoadScriptFromSymFileTrue, eLoadScriptFromSymFileFalse, eLoadScriptFromSymFileWarn -} LoadScriptFromSymFile; +}; -typedef enum LoadCWDlldbinitFile { +enum LoadCWDlldbinitFile { eLoadCWDlldbinitTrue, eLoadCWDlldbinitFalse, eLoadCWDlldbinitWarn -} LoadCWDlldbinitFile; +}; -typedef enum LoadDependentFiles { +enum LoadDependentFiles { eLoadDependentsDefault, eLoadDependentsYes, eLoadDependentsNo, -} LoadDependentFiles; +}; // TargetProperties class TargetExperimentalProperties : public Properties { Index: include/lldb/Target/ThreadPlan.h =================================================================== --- include/lldb/Target/ThreadPlan.h +++ include/lldb/Target/ThreadPlan.h @@ -331,11 +331,11 @@ class ThreadPlan : public std::enable_shared_from_this, public UserID { public: - typedef enum { eAllThreads, eSomeThreads, eThisThread } ThreadScope; + enum ThreadScope { eAllThreads, eSomeThreads, eThisThread }; // We use these enums so that we can cast a base thread plan to it's real // type without having to resort to dynamic casting. - typedef enum { + enum ThreadPlanKind { eKindGeneric, eKindNull, eKindBase, @@ -351,7 +351,7 @@ eKindStepUntil, eKindTestCondition - } ThreadPlanKind; + }; // Constructors and Destructors ThreadPlan(ThreadPlanKind kind, const char *name, Thread &thread, Index: include/lldb/Target/ThreadPlanTracer.h =================================================================== --- include/lldb/Target/ThreadPlanTracer.h +++ include/lldb/Target/ThreadPlanTracer.h @@ -21,12 +21,12 @@ friend class ThreadPlan; public: - typedef enum ThreadPlanTracerStyle { + enum ThreadPlanTracerStyle { eLocation = 0, eStateChange, eCheckFrames, ePython - } ThreadPlanTracerStyle; + }; ThreadPlanTracer(Thread &thread, lldb::StreamSP &stream_sp); ThreadPlanTracer(Thread &thread); Index: include/lldb/Utility/DataExtractor.h =================================================================== --- include/lldb/Utility/DataExtractor.h +++ include/lldb/Utility/DataExtractor.h @@ -48,7 +48,7 @@ public: /// \typedef DataExtractor::Type /// Type enumerations used in the dump routines. - typedef enum { + enum Type { TypeUInt8, ///< Format output as unsigned 8 bit integers TypeChar, ///< Format output as characters TypeUInt16, ///< Format output as unsigned 16 bit integers @@ -57,7 +57,7 @@ TypePointer, ///< Format output as pointers TypeULEB128, ///< Format output as ULEB128 numbers TypeSLEB128 ///< Format output as SLEB128 numbers - } Type; + }; /// Default constructor. /// Index: include/lldb/Utility/IOObject.h =================================================================== --- include/lldb/Utility/IOObject.h +++ include/lldb/Utility/IOObject.h @@ -19,10 +19,10 @@ class IOObject { public: - typedef enum { + enum FDType { eFDTypeFile, // Other FD requiring read/write eFDTypeSocket, // Socket requiring send/recv - } FDType; + }; // TODO: On Windows this should be a HANDLE, and wait should use // WaitForMultipleObjects Index: include/lldb/Utility/Predicate.h =================================================================== --- include/lldb/Utility/Predicate.h +++ include/lldb/Utility/Predicate.h @@ -23,12 +23,12 @@ /// Enumerations for broadcasting. namespace lldb_private { -typedef enum { +enum PredicateBroadcastType { eBroadcastNever, ///< No broadcast will be sent when the value is modified. eBroadcastAlways, ///< Always send a broadcast when the value is modified. eBroadcastOnChange ///< Only broadcast if the value changes when the value is /// modified. -} PredicateBroadcastType; +}; /// \class Predicate Predicate.h "lldb/Utility/Predicate.h" /// A C++ wrapper class for providing threaded access to a value of Index: include/lldb/lldb-private-enumerations.h =================================================================== --- include/lldb/lldb-private-enumerations.h +++ include/lldb/lldb-private-enumerations.h @@ -16,7 +16,7 @@ namespace lldb_private { // Thread Step Types -typedef enum StepType { +enum StepType { eStepTypeNone, eStepTypeTrace, ///< Single step one instruction. eStepTypeTraceOver, ///< Single step one instruction, stepping over. @@ -24,10 +24,10 @@ eStepTypeOver, ///< Single step over a specified context. eStepTypeOut, ///< Single step out a specified context. eStepTypeScripted ///< A step type implemented by the script interpreter. -} StepType; +}; // Address Types -typedef enum AddressType { +enum AddressType { eAddressTypeInvalid = 0, eAddressTypeFile, ///< Address is an address as found in an object or symbol ///file @@ -35,7 +35,7 @@ ///process eAddressTypeHost ///< Address is an address in the process that is running ///this code -} AddressType; +}; // Address Class // @@ -56,15 +56,15 @@ }; // Votes - Need a tri-state, yes, no, no opinion... -typedef enum Vote { eVoteNo = -1, eVoteNoOpinion = 0, eVoteYes = 1 } Vote; +enum Vote { eVoteNo = -1, eVoteNoOpinion = 0, eVoteYes = 1 }; -typedef enum ArchitectureType { +enum ArchitectureType { eArchTypeInvalid, eArchTypeMachO, eArchTypeELF, eArchTypeCOFF, kNumArchTypes -} ArchitectureType; +}; /// Settable state variable types. /// @@ -80,7 +80,7 @@ // eSetVarTypeNone //} SettableVariableType; -typedef enum VarSetOperationType { +enum VarSetOperationType { eVarSetOperationReplace, eVarSetOperationInsertBefore, eVarSetOperationInsertAfter, @@ -89,9 +89,9 @@ eVarSetOperationClear, eVarSetOperationAssign, eVarSetOperationInvalid -} VarSetOperationType; +}; -typedef enum ArgumentRepetitionType { +enum ArgumentRepetitionType { eArgRepeatPlain, // Exactly one occurrence eArgRepeatOptional, // At most one occurrence, but it's optional eArgRepeatPlus, // One or more occurrences @@ -105,25 +105,25 @@ eArgRepeatPairRange, // A pair that repeats from 1 to n eArgRepeatPairRangeOptional // A pair that repeats from 1 to n, but is // optional -} ArgumentRepetitionType; +}; -typedef enum SortOrder { +enum SortOrder { eSortOrderNone, eSortOrderByAddress, eSortOrderByName -} SortOrder; +}; // LazyBool is for boolean values that need to be calculated lazily. Values // start off set to eLazyBoolCalculate, and then they can be calculated once // and set to eLazyBoolNo or eLazyBoolYes. -typedef enum LazyBool { +enum LazyBool { eLazyBoolCalculate = -1, eLazyBoolNo = 0, eLazyBoolYes = 1 -} LazyBool; +}; /// Instruction types -typedef enum InstructionType { +enum InstructionType { eInstructionTypeAny, // Support for any instructions at all (at least one) eInstructionTypePrologueEpilogue, // All prologue and epilogue instructions // that push and pop register values and @@ -132,10 +132,10 @@ // counter/instruction pointer eInstructionTypeAll // All instructions of any kind -} InstructionType; +}; /// Format category entry types -typedef enum FormatCategoryItem { +enum FormatCategoryItem { eFormatCategoryItemSummary = 0x0001, eFormatCategoryItemRegexSummary = 0x0002, eFormatCategoryItemFilter = 0x0004, @@ -146,18 +146,18 @@ eFormatCategoryItemRegexValue = 0x0080, eFormatCategoryItemValidator = 0x0100, eFormatCategoryItemRegexValidator = 0x0200 -} FormatCategoryItem; +}; /// Expression execution policies -typedef enum { +enum ExecutionPolicy { eExecutionPolicyOnlyWhenNeeded, eExecutionPolicyNever, eExecutionPolicyAlways, eExecutionPolicyTopLevel // used for top-level code -} ExecutionPolicy; +}; // Ways that the FormatManager picks a particular format for a type -typedef enum FormatterChoiceCriterion { +enum FormatterChoiceCriterion { eFormatterChoiceCriterionDirectChoice = 0x00000000, eFormatterChoiceCriterionStrippedPointerReference = 0x00000001, eFormatterChoiceCriterionNavigatedTypedefs = 0x00000002, @@ -166,31 +166,31 @@ eFormatterChoiceCriterionLanguagePlugin = 0x00000008, eFormatterChoiceCriterionStrippedBitField = 0x00000010, eFormatterChoiceCriterionWentToStaticValue = 0x00000020 -} FormatterChoiceCriterion; +}; // Synchronicity behavior of scripted commands -typedef enum ScriptedCommandSynchronicity { +enum ScriptedCommandSynchronicity { eScriptedCommandSynchronicitySynchronous, eScriptedCommandSynchronicityAsynchronous, eScriptedCommandSynchronicityCurrentValue // use whatever the current // synchronicity is -} ScriptedCommandSynchronicity; +}; // Verbosity mode of "po" output -typedef enum LanguageRuntimeDescriptionDisplayVerbosity { +enum LanguageRuntimeDescriptionDisplayVerbosity { eLanguageRuntimeDescriptionDisplayVerbosityCompact, // only print the // description string, if // any eLanguageRuntimeDescriptionDisplayVerbosityFull, // print the full-blown // output -} LanguageRuntimeDescriptionDisplayVerbosity; +}; // Loading modules from memory -typedef enum MemoryModuleLoadLevel { +enum MemoryModuleLoadLevel { eMemoryModuleLoadLevelMinimal, // Load sections only eMemoryModuleLoadLevelPartial, // Load function bounds but no symbols eMemoryModuleLoadLevelComplete, // Load sections and all symbols -} MemoryModuleLoadLevel; +}; // Result enums for when reading multiple lines from IOHandlers enum class LineStatus { Index: packages/Python/lldbsuite/test/expression_command/cast_int_to_anonymous_enum/main.cpp =================================================================== --- packages/Python/lldbsuite/test/expression_command/cast_int_to_anonymous_enum/main.cpp +++ packages/Python/lldbsuite/test/expression_command/cast_int_to_anonymous_enum/main.cpp @@ -1,6 +1,6 @@ -typedef enum { +enum flow_e { A=0, -} flow_e; +}; int main() { flow_e f; Index: packages/Python/lldbsuite/test/python_api/lldbutil/iter/main.cpp =================================================================== --- packages/Python/lldbsuite/test/python_api/lldbutil/iter/main.cpp +++ packages/Python/lldbsuite/test/python_api/lldbutil/iter/main.cpp @@ -22,11 +22,11 @@ std::thread g_thread_3; std::mutex g_mask_mutex; -typedef enum { +enum MaskAction { eGet, eAssign, eClearBits -} MaskAction; +}; uint32_t mask_access (MaskAction action, uint32_t mask = 0); Index: packages/Python/lldbsuite/test/python_api/module_section/main.cpp =================================================================== --- packages/Python/lldbsuite/test/python_api/module_section/main.cpp +++ packages/Python/lldbsuite/test/python_api/module_section/main.cpp @@ -22,11 +22,11 @@ std::thread g_thread_3; std::mutex g_mask_mutex; -typedef enum { +enum MaskAction { eGet, eAssign, eClearBits -} MaskAction; +}; uint32_t mask_access (MaskAction action, uint32_t mask = 0); Index: source/Commands/CommandObjectBreakpoint.cpp =================================================================== --- source/Commands/CommandObjectBreakpoint.cpp +++ source/Commands/CommandObjectBreakpoint.cpp @@ -324,7 +324,7 @@ class CommandObjectBreakpointSet : public CommandObjectParsed { public: - typedef enum BreakpointSetType { + enum BreakpointSetType { eSetTypeInvalid, eSetTypeFileAndLine, eSetTypeAddress, @@ -333,7 +333,7 @@ eSetTypeSourceRegexp, eSetTypeException, eSetTypeScripted, - } BreakpointSetType; + }; CommandObjectBreakpointSet(CommandInterpreter &interpreter) : CommandObjectParsed( @@ -1420,10 +1420,10 @@ class CommandObjectBreakpointClear : public CommandObjectParsed { public: - typedef enum BreakpointClearType { + enum BreakpointClearType { eClearTypeInvalid, eClearTypeFileAndLine - } BreakpointClearType; + }; CommandObjectBreakpointClear(CommandInterpreter &interpreter) : CommandObjectParsed(interpreter, "breakpoint clear", Index: source/Plugins/Instruction/ARM/EmulateInstructionARM.h =================================================================== --- source/Plugins/Instruction/ARM/EmulateInstructionARM.h +++ source/Plugins/Instruction/ARM/EmulateInstructionARM.h @@ -45,7 +45,7 @@ class EmulateInstructionARM : public EmulateInstruction { public: - typedef enum { + enum ARMEncoding { eEncodingA1, eEncodingA2, eEncodingA3, @@ -56,7 +56,7 @@ eEncodingT3, eEncodingT4, eEncodingT5 - } ARMEncoding; + }; static void Initialize(); @@ -291,7 +291,7 @@ 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; Index: source/Plugins/Instruction/ARM64/EmulateInstructionARM64.h =================================================================== --- source/Plugins/Instruction/ARM64/EmulateInstructionARM64.h +++ source/Plugins/Instruction/ARM64/EmulateInstructionARM64.h @@ -73,25 +73,25 @@ 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,44 @@ 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 { + enum ShiftType { ShiftType_LSL, ShiftType_LSR, ShiftType_ASR, ShiftType_ROR - } ShiftType; + }; - typedef enum { SP0 = 0, SPx = 1 } StackPointerSelection; + enum StackPointerSelection { SP0 = 0, SPx = 1 }; - typedef enum { + enum Unpredictable { Unpredictable_WBOVERLAP, Unpredictable_LDPOVERLAP - } Unpredictable; + }; - 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, Index: source/Plugins/JITLoader/GDB/JITLoaderGDB.cpp =================================================================== --- source/Plugins/JITLoader/GDB/JITLoaderGDB.cpp +++ source/Plugins/JITLoader/GDB/JITLoaderGDB.cpp @@ -35,11 +35,11 @@ using namespace lldb_private; // Debug Interface Structures -typedef enum { +enum jit_actions_t { JIT_NOACTION = 0, JIT_REGISTER_FN, JIT_UNREGISTER_FN -} jit_actions_t; +}; template struct jit_code_entry { ptr_t next_entry; // pointer Index: source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.h =================================================================== --- source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.h +++ source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.h @@ -36,7 +36,7 @@ struct DispatchFunction { public: - typedef enum { eFixUpNone, eFixUpFixed, eFixUpToFix } FixUpState; + enum FixUpState { eFixUpNone, eFixUpFixed, eFixUpToFix }; const char *name; bool stret_return; Index: source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.h =================================================================== --- source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.h +++ 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 @@ 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 @@ 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]; Index: source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.h =================================================================== --- source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.h +++ source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.h @@ -26,7 +26,7 @@ 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 @@ 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); Index: source/Plugins/Process/Utility/ARMDefines.h =================================================================== --- source/Plugins/Process/Utility/ARMDefines.h +++ 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 Index: source/Plugins/Process/gdb-remote/GDBRemoteCommunication.h =================================================================== --- source/Plugins/Process/gdb-remote/GDBRemoteCommunication.h +++ 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 Index: source/Plugins/Process/mach-core/ProcessMachCore.h =================================================================== --- source/Plugins/Process/mach-core/ProcessMachCore.h +++ source/Plugins/Process/mach-core/ProcessMachCore.h @@ -88,10 +88,10 @@ private: bool GetDynamicLoaderAddress(lldb::addr_t addr); - typedef enum CorefilePreference { + enum CorefilePreference { eUserProcessCorefile, eKernelCorefile - } CorefilePreferences; + }; /// If a core file can be interpreted multiple ways, this establishes /// which style wins. Index: source/Target/Target.cpp =================================================================== --- source/Target/Target.cpp +++ source/Target/Target.cpp @@ -3252,11 +3252,11 @@ "Always look for inline breakpoint locations when setting file and line " "breakpoints (slower but most accurate)."} }; -typedef enum x86DisassemblyFlavor { +enum x86DisassemblyFlavor { eX86DisFlavorDefault, eX86DisFlavorIntel, eX86DisFlavorATT -} x86DisassemblyFlavor; +}; static constexpr OptionEnumValueElement g_x86_dis_flavor_value_types[] = { {eX86DisFlavorDefault, "default", "Disassembler default (currently att)."}, Index: tools/debugserver/source/DNBDataRef.h =================================================================== --- tools/debugserver/source/DNBDataRef.h +++ tools/debugserver/source/DNBDataRef.h @@ -31,7 +31,7 @@ class DNBDataRef { public: // For use with Dump - typedef enum { + enum Type { TypeUInt8 = 0, TypeChar, TypeUInt16, @@ -40,7 +40,7 @@ TypePointer, TypeULEB128, TypeSLEB128 - } Type; + }; typedef uint32_t offset_t; typedef nub_addr_t addr_t; Index: tools/debugserver/source/DNBDefs.h =================================================================== --- tools/debugserver/source/DNBDefs.h +++ tools/debugserver/source/DNBDefs.h @@ -64,7 +64,7 @@ #define WATCH_TYPE_READ (1u << 0) #define WATCH_TYPE_WRITE (1u << 1) -typedef enum { +enum nub_state_t { eStateInvalid = 0, eStateUnloaded, eStateAttaching, @@ -76,9 +76,9 @@ eStateDetached, eStateExited, eStateSuspended -} nub_state_t; +}; -typedef enum { +enum nub_launch_flavor_t { eLaunchFlavorDefault = 0, eLaunchFlavorPosixSpawn = 1, eLaunchFlavorForkExec = 2, @@ -91,7 +91,7 @@ #ifdef WITH_FBS eLaunchFlavorFBS = 5 #endif -} nub_launch_flavor_t; +}; #define NUB_STATE_IS_RUNNING(s) \ ((s) == eStateAttaching || (s) == eStateLaunching || (s) == eStateRunning || \ Index: tools/debugserver/source/DNBError.h =================================================================== --- tools/debugserver/source/DNBError.h +++ tools/debugserver/source/DNBError.h @@ -21,7 +21,7 @@ class DNBError { public: typedef uint32_t ValueType; - typedef enum { + enum FlavorType { Generic = 0, MachKernel = 1, POSIX = 2 @@ -37,7 +37,7 @@ , FrontBoard = 5 #endif - } FlavorType; + } ; explicit DNBError(ValueType err = 0, FlavorType flavor = Generic) : m_err(err), m_flavor(flavor) {} Index: tools/debugserver/source/MacOSX/arm/DNBArchImpl.h =================================================================== --- tools/debugserver/source/MacOSX/arm/DNBArchImpl.h +++ tools/debugserver/source/MacOSX/arm/DNBArchImpl.h @@ -113,14 +113,14 @@ nub_addr_t *nextPC, bool *nextPCIsThumb); - typedef enum RegisterSetTag { + enum RegisterSet { e_regSetALL = REGISTER_SET_ALL, e_regSetGPR, // ARM_THREAD_STATE e_regSetVFP, // ARM_VFP_STATE (ARM_NEON_STATE if defined __arm64__) e_regSetEXC, // ARM_EXCEPTION_STATE e_regSetDBG, // ARM_DEBUG_STATE (ARM_DEBUG_STATE32 if defined __arm64__) kNumRegisterSets - } RegisterSet; + }; enum { Read = 0, Write = 1, kNumErrors = 2 }; Index: tools/debugserver/source/MacOSX/arm64/DNBArchImplARM64.h =================================================================== --- tools/debugserver/source/MacOSX/arm64/DNBArchImplARM64.h +++ tools/debugserver/source/MacOSX/arm64/DNBArchImplARM64.h @@ -75,14 +75,14 @@ kern_return_t EnableHardwareSingleStep(bool enable); static bool FixGenericRegisterNumber(uint32_t &set, uint32_t ®); - typedef enum RegisterSetTag { + enum RegisterSet { e_regSetALL = REGISTER_SET_ALL, e_regSetGPR, // ARM_THREAD_STATE64, e_regSetVFP, // ARM_NEON_STATE64, e_regSetEXC, // ARM_EXCEPTION_STATE64, e_regSetDBG, // ARM_DEBUG_STATE64, kNumRegisterSets - } RegisterSet; + }; enum { e_regSetGPRCount = ARM_THREAD_STATE64_COUNT, Index: tools/debugserver/source/MacOSX/i386/DNBArchImplI386.h =================================================================== --- tools/debugserver/source/MacOSX/i386/DNBArchImplI386.h +++ tools/debugserver/source/MacOSX/i386/DNBArchImplI386.h @@ -88,23 +88,23 @@ static const size_t k_num_fpu_registers_avx512f; static const size_t k_num_all_registers_avx512f; - typedef enum RegisterSetTag { + enum RegisterSet { e_regSetALL = REGISTER_SET_ALL, e_regSetGPR, e_regSetFPU, e_regSetEXC, e_regSetDBG, kNumRegisterSets - } RegisterSet; + }; - typedef enum RegisterSetWordSizeTag { + enum RegisterSetWordSize { e_regSetWordSizeGPR = sizeof(GPR) / sizeof(int), e_regSetWordSizeFPU = sizeof(FPU) / sizeof(int), e_regSetWordSizeEXC = sizeof(EXC) / sizeof(int), e_regSetWordSizeAVX = sizeof(AVX) / sizeof(int), e_regSetWordSizeAVX512f = sizeof(AVX512F) / sizeof(int), e_regSetWordSizeDBG = sizeof(DBG) / sizeof(int) - } RegisterSetWordSize; + }; enum { Read = 0, Write = 1, kNumErrors = 2 }; Index: tools/debugserver/source/MacOSX/ppc/DNBArchImpl.h =================================================================== --- tools/debugserver/source/MacOSX/ppc/DNBArchImpl.h +++ tools/debugserver/source/MacOSX/ppc/DNBArchImpl.h @@ -45,14 +45,14 @@ protected: kern_return_t EnableHardwareSingleStep(bool enable); - typedef enum RegisterSetTag { + enum RegisterSet { e_regSetALL = REGISTER_SET_ALL, e_regSetGPR, e_regSetFPR, e_regSetEXC, e_regSetVEC, kNumRegisterSets - } RegisterSet; + }; typedef enum RegisterSetWordSizeTag { e_regSetWordSizeGPR = PPC_THREAD_STATE_COUNT, Index: tools/debugserver/source/MacOSX/x86_64/DNBArchImplX86_64.h =================================================================== --- tools/debugserver/source/MacOSX/x86_64/DNBArchImplX86_64.h +++ tools/debugserver/source/MacOSX/x86_64/DNBArchImplX86_64.h @@ -87,23 +87,23 @@ static const size_t k_num_fpu_registers_avx512f; static const size_t k_num_all_registers_avx512f; - typedef enum RegisterSetTag { + enum RegisterSet { e_regSetALL = REGISTER_SET_ALL, e_regSetGPR, e_regSetFPU, e_regSetEXC, e_regSetDBG, kNumRegisterSets - } RegisterSet; + }; - typedef enum RegisterSetWordSizeTag { + enum RegisterSetWordSize { e_regSetWordSizeGPR = sizeof(GPR) / sizeof(int), e_regSetWordSizeFPU = sizeof(FPU) / sizeof(int), e_regSetWordSizeEXC = sizeof(EXC) / sizeof(int), e_regSetWordSizeAVX = sizeof(AVX) / sizeof(int), e_regSetWordSizeAVX512f = sizeof(AVX512F) / sizeof(int), e_regSetWordSizeDBG = sizeof(DBG) / sizeof(int) - } RegisterSetWordSize; + }; enum { Read = 0, Write = 1, kNumErrors = 2 }; Index: tools/debugserver/source/RNBDefs.h =================================================================== --- tools/debugserver/source/RNBDefs.h +++ tools/debugserver/source/RNBDefs.h @@ -75,7 +75,7 @@ class RNBRemote; typedef std::shared_ptr RNBRemoteSP; -typedef enum { rnb_success = 0, rnb_err = 1, rnb_not_connected = 2 } rnb_err_t; +enum rnb_err_t { rnb_success = 0, rnb_err = 1, rnb_not_connected = 2 } ; // Log bits // reserve low bits for DNB Index: tools/debugserver/source/RNBRemote.h =================================================================== --- tools/debugserver/source/RNBRemote.h +++ tools/debugserver/source/RNBRemote.h @@ -33,7 +33,7 @@ class RNBRemote { public: - typedef enum { + enum PacketEnum { invalid_packet = 0, ack, // '+' nack, // '-' @@ -138,7 +138,7 @@ query_supported_async_json_packets, // 'QSupportedAsyncJSONPackets' configure_darwin_log, // 'ConfigureDarwinLog:' unknown_type - } PacketEnum; + }; typedef rnb_err_t (RNBRemote::*HandlePacketCallback)(const char *p); Index: tools/debugserver/source/debugserver.cpp =================================================================== --- tools/debugserver/source/debugserver.cpp +++ tools/debugserver/source/debugserver.cpp @@ -46,7 +46,7 @@ nub_process_t g_pid = INVALID_NUB_PROCESS; // Run loop modes which determine which run loop function will be called -typedef enum { +enum RNBRunLoopMode { eRNBRunLoopModeInvalid = 0, eRNBRunLoopModeGetStartModeFromRemoteProtocol, eRNBRunLoopModeInferiorAttaching, @@ -54,7 +54,7 @@ eRNBRunLoopModeInferiorExecuting, eRNBRunLoopModePlatformMode, eRNBRunLoopModeExit -} RNBRunLoopMode; +} ; // Global Variables RNBRemoteSP g_remoteSP; Index: tools/debugserver/source/libdebugserver.cpp =================================================================== --- tools/debugserver/source/libdebugserver.cpp +++ tools/debugserver/source/libdebugserver.cpp @@ -27,12 +27,12 @@ #include "SysSignal.h" // Run loop modes which determine which run loop function will be called -typedef enum { +enum RNBRunLoopMode { eRNBRunLoopModeInvalid = 0, eRNBRunLoopModeGetStartModeFromRemoteProtocol, eRNBRunLoopModeInferiorExecuting, eRNBRunLoopModeExit -} RNBRunLoopMode; +}; // Global Variables RNBRemoteSP g_remoteSP; Index: tools/driver/Driver.h =================================================================== --- tools/driver/Driver.h +++ tools/driver/Driver.h @@ -26,11 +26,11 @@ class Driver : public lldb::SBBroadcaster { public: - typedef enum CommandPlacement { + enum CommandPlacement { eCommandPlacementBeforeFile, eCommandPlacementAfterFile, eCommandPlacementAfterCrash, - } CommandPlacement; + }; Driver();