Index: lldb/trunk/include/lldb/Breakpoint/Breakpoint.h =================================================================== --- lldb/trunk/include/lldb/Breakpoint/Breakpoint.h +++ lldb/trunk/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: lldb/trunk/include/lldb/Core/Address.h =================================================================== --- lldb/trunk/include/lldb/Core/Address.h +++ lldb/trunk/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 @@ -97,7 +97,7 @@ /// // address for printf in libSystem.B.dylib as a file address /// 0x000000000005dcff \endcode DumpStyleModuleWithFileAddress, ///< Display as the file address with the - ///module name prepended (if any). + /// module name prepended (if any). ///< \code /// // address for printf in libSystem.B.dylib as a file address /// libSystem.B.dylib[0x000000000005dcff] \endcode @@ -106,22 +106,22 @@ /// // address for printf in libSystem.B.dylib as a load address /// 0x00007fff8306bcff \endcode DumpStyleResolvedDescription, ///< Display the details about what an address - ///resolves to. This can + /// resolves to. This can ///< be anything from a symbol context summary (module, function/symbol, ///< and file and line), to information about what the pointer points to ///< if the address is in a section (section of pointers, c strings, etc). DumpStyleResolvedDescriptionNoModule, DumpStyleResolvedDescriptionNoFunctionArguments, DumpStyleNoFunctionName, ///< Elide the function name; display an offset - ///into the current function. + /// into the current function. ///< Used primarily in disassembly symbolication DumpStyleDetailedSymbolContext, ///< Detailed symbol context information for - ///an address for all symbol + /// an address for all symbol ///< context members. DumpStyleResolvedPointerDescription ///< Dereference a pointer at the - ///current address and then lookup the + /// current address and then lookup the ///< dereferenced address using DumpStyleResolvedDescription - } DumpStyle; + }; /// Default constructor. /// Index: lldb/trunk/include/lldb/Core/AddressResolver.h =================================================================== --- lldb/trunk/include/lldb/Core/AddressResolver.h +++ lldb/trunk/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: lldb/trunk/include/lldb/Core/SearchFilter.h =================================================================== --- lldb/trunk/include/lldb/Core/SearchFilter.h +++ lldb/trunk/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: lldb/trunk/include/lldb/Host/Socket.h =================================================================== --- lldb/trunk/include/lldb/Host/Socket.h +++ lldb/trunk/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: lldb/trunk/include/lldb/Interpreter/CommandCompletions.h =================================================================== --- lldb/trunk/include/lldb/Interpreter/CommandCompletions.h +++ lldb/trunk/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: lldb/trunk/include/lldb/Interpreter/OptionGroupWatchpoint.h =================================================================== --- lldb/trunk/include/lldb/Interpreter/OptionGroupWatchpoint.h +++ lldb/trunk/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: lldb/trunk/include/lldb/Interpreter/OptionValue.h =================================================================== --- lldb/trunk/include/lldb/Interpreter/OptionValue.h +++ lldb/trunk/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: lldb/trunk/include/lldb/Interpreter/ScriptInterpreter.h =================================================================== --- lldb/trunk/include/lldb/Interpreter/ScriptInterpreter.h +++ lldb/trunk/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: lldb/trunk/include/lldb/Symbol/ObjectFile.h =================================================================== --- lldb/trunk/include/lldb/Symbol/ObjectFile.h +++ lldb/trunk/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: lldb/trunk/include/lldb/Symbol/SymbolContext.h =================================================================== --- lldb/trunk/include/lldb/Symbol/SymbolContext.h +++ lldb/trunk/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: lldb/trunk/include/lldb/Symbol/Symtab.h =================================================================== --- lldb/trunk/include/lldb/Symbol/Symtab.h +++ lldb/trunk/include/lldb/Symbol/Symtab.h @@ -23,17 +23,13 @@ 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 { - eVisibilityAny, - eVisibilityExtern, - eVisibilityPrivate - } Visibility; + enum Visibility { eVisibilityAny, eVisibilityExtern, eVisibilityPrivate }; Symtab(ObjectFile *objfile); ~Symtab(); Index: lldb/trunk/include/lldb/Symbol/Type.h =================================================================== --- lldb/trunk/include/lldb/Symbol/Type.h +++ lldb/trunk/include/lldb/Symbol/Type.h @@ -59,25 +59,25 @@ 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 - ///with the const qualifier added + /// with the const qualifier added eEncodingIsRestrictUID, ///< This type is the type whose UID is - ///m_encoding_uid with the restrict qualifier added + /// m_encoding_uid with the restrict qualifier added eEncodingIsVolatileUID, ///< This type is the type whose UID is - ///m_encoding_uid with the volatile qualifier added + /// m_encoding_uid with the volatile qualifier added eEncodingIsTypedefUID, ///< This type is pointer to a type whose UID is - ///m_encoding_uid + /// m_encoding_uid eEncodingIsPointerUID, ///< This type is pointer to a type whose UID is - ///m_encoding_uid + /// m_encoding_uid eEncodingIsLValueReferenceUID, ///< This type is L value reference to a type - ///whose UID is m_encoding_uid + /// whose UID is m_encoding_uid eEncodingIsRValueReferenceUID, ///< This type is R value reference to a type - ///whose UID is m_encoding_uid + /// 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: lldb/trunk/include/lldb/Target/Process.h =================================================================== --- lldb/trunk/include/lldb/Target/Process.h +++ lldb/trunk/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: lldb/trunk/include/lldb/Target/Target.h =================================================================== --- lldb/trunk/include/lldb/Target/Target.h +++ lldb/trunk/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: lldb/trunk/include/lldb/Target/ThreadPlan.h =================================================================== --- lldb/trunk/include/lldb/Target/ThreadPlan.h +++ lldb/trunk/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: lldb/trunk/include/lldb/Target/ThreadPlanTracer.h =================================================================== --- lldb/trunk/include/lldb/Target/ThreadPlanTracer.h +++ lldb/trunk/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: lldb/trunk/include/lldb/Utility/DataExtractor.h =================================================================== --- lldb/trunk/include/lldb/Utility/DataExtractor.h +++ lldb/trunk/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: lldb/trunk/include/lldb/Utility/IOObject.h =================================================================== --- lldb/trunk/include/lldb/Utility/IOObject.h +++ lldb/trunk/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: lldb/trunk/include/lldb/Utility/Predicate.h =================================================================== --- lldb/trunk/include/lldb/Utility/Predicate.h +++ lldb/trunk/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: lldb/trunk/include/lldb/lldb-private-enumerations.h =================================================================== --- lldb/trunk/include/lldb/lldb-private-enumerations.h +++ lldb/trunk/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,18 +24,18 @@ 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 + /// file eAddressTypeLoad, ///< Address is an address as in the current target inferior - ///process + /// process eAddressTypeHost ///< Address is an address in the process that is running - ///this code -} AddressType; + /// this code +}; // 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,17 @@ 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 { - eSortOrderNone, - eSortOrderByAddress, - eSortOrderByName -} SortOrder; +enum SortOrder { eSortOrderNone, eSortOrderByAddress, eSortOrderByName }; // 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 { - eLazyBoolCalculate = -1, - eLazyBoolNo = 0, - eLazyBoolYes = 1 -} LazyBool; +enum LazyBool { eLazyBoolCalculate = -1, eLazyBoolNo = 0, eLazyBoolYes = 1 }; /// 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 +124,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 +138,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 +158,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: lldb/trunk/packages/Python/lldbsuite/test/expression_command/cast_int_to_anonymous_enum/main.cpp =================================================================== --- lldb/trunk/packages/Python/lldbsuite/test/expression_command/cast_int_to_anonymous_enum/main.cpp +++ lldb/trunk/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: lldb/trunk/packages/Python/lldbsuite/test/python_api/lldbutil/iter/main.cpp =================================================================== --- lldb/trunk/packages/Python/lldbsuite/test/python_api/lldbutil/iter/main.cpp +++ lldb/trunk/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: lldb/trunk/packages/Python/lldbsuite/test/python_api/module_section/main.cpp =================================================================== --- lldb/trunk/packages/Python/lldbsuite/test/python_api/module_section/main.cpp +++ lldb/trunk/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: lldb/trunk/source/Commands/CommandObjectBreakpoint.cpp =================================================================== --- lldb/trunk/source/Commands/CommandObjectBreakpoint.cpp +++ lldb/trunk/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,7 @@ class CommandObjectBreakpointClear : public CommandObjectParsed { public: - typedef enum BreakpointClearType { - eClearTypeInvalid, - eClearTypeFileAndLine - } BreakpointClearType; + enum BreakpointClearType { eClearTypeInvalid, eClearTypeFileAndLine }; CommandObjectBreakpointClear(CommandInterpreter &interpreter) : CommandObjectParsed(interpreter, "breakpoint clear", Index: lldb/trunk/source/Plugins/Instruction/ARM/EmulateInstructionARM.h =================================================================== --- lldb/trunk/source/Plugins/Instruction/ARM/EmulateInstructionARM.h +++ lldb/trunk/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: lldb/trunk/source/Plugins/Instruction/ARM64/EmulateInstructionARM64.h =================================================================== --- lldb/trunk/source/Plugins/Instruction/ARM64/EmulateInstructionARM64.h +++ lldb/trunk/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,36 @@ 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, Index: lldb/trunk/source/Plugins/JITLoader/GDB/JITLoaderGDB.cpp =================================================================== --- lldb/trunk/source/Plugins/JITLoader/GDB/JITLoaderGDB.cpp +++ lldb/trunk/source/Plugins/JITLoader/GDB/JITLoaderGDB.cpp @@ -35,11 +35,7 @@ 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 struct jit_code_entry { ptr_t next_entry; // pointer Index: lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.h =================================================================== --- lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.h +++ lldb/trunk/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: lldb/trunk/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.h =================================================================== --- lldb/trunk/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.h +++ lldb/trunk/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: lldb/trunk/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.h =================================================================== --- lldb/trunk/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.h +++ lldb/trunk/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: lldb/trunk/source/Plugins/Process/Utility/ARMDefines.h =================================================================== --- lldb/trunk/source/Plugins/Process/Utility/ARMDefines.h +++ lldb/trunk/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: lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.h =================================================================== --- lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.h +++ lldb/trunk/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: lldb/trunk/source/Plugins/Process/mach-core/ProcessMachCore.h =================================================================== --- lldb/trunk/source/Plugins/Process/mach-core/ProcessMachCore.h +++ lldb/trunk/source/Plugins/Process/mach-core/ProcessMachCore.h @@ -88,10 +88,7 @@ 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. Index: lldb/trunk/source/Target/Target.cpp =================================================================== --- lldb/trunk/source/Target/Target.cpp +++ lldb/trunk/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: lldb/trunk/tools/debugserver/source/DNBDataRef.h =================================================================== --- lldb/trunk/tools/debugserver/source/DNBDataRef.h +++ lldb/trunk/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: lldb/trunk/tools/debugserver/source/DNBDefs.h =================================================================== --- lldb/trunk/tools/debugserver/source/DNBDefs.h +++ lldb/trunk/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: lldb/trunk/tools/debugserver/source/DNBError.h =================================================================== --- lldb/trunk/tools/debugserver/source/DNBError.h +++ lldb/trunk/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: lldb/trunk/tools/debugserver/source/MacOSX/arm/DNBArchImpl.h =================================================================== --- lldb/trunk/tools/debugserver/source/MacOSX/arm/DNBArchImpl.h +++ lldb/trunk/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: lldb/trunk/tools/debugserver/source/MacOSX/arm64/DNBArchImplARM64.h =================================================================== --- lldb/trunk/tools/debugserver/source/MacOSX/arm64/DNBArchImplARM64.h +++ lldb/trunk/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: lldb/trunk/tools/debugserver/source/MacOSX/i386/DNBArchImplI386.h =================================================================== --- lldb/trunk/tools/debugserver/source/MacOSX/i386/DNBArchImplI386.h +++ lldb/trunk/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: lldb/trunk/tools/debugserver/source/MacOSX/ppc/DNBArchImpl.h =================================================================== --- lldb/trunk/tools/debugserver/source/MacOSX/ppc/DNBArchImpl.h +++ lldb/trunk/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: lldb/trunk/tools/debugserver/source/MacOSX/x86_64/DNBArchImplX86_64.h =================================================================== --- lldb/trunk/tools/debugserver/source/MacOSX/x86_64/DNBArchImplX86_64.h +++ lldb/trunk/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: lldb/trunk/tools/debugserver/source/RNBDefs.h =================================================================== --- lldb/trunk/tools/debugserver/source/RNBDefs.h +++ lldb/trunk/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: lldb/trunk/tools/debugserver/source/RNBRemote.h =================================================================== --- lldb/trunk/tools/debugserver/source/RNBRemote.h +++ lldb/trunk/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: lldb/trunk/tools/debugserver/source/debugserver.cpp =================================================================== --- lldb/trunk/tools/debugserver/source/debugserver.cpp +++ lldb/trunk/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: lldb/trunk/tools/debugserver/source/libdebugserver.cpp =================================================================== --- lldb/trunk/tools/debugserver/source/libdebugserver.cpp +++ lldb/trunk/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: lldb/trunk/tools/driver/Driver.h =================================================================== --- lldb/trunk/tools/driver/Driver.h +++ lldb/trunk/tools/driver/Driver.h @@ -26,11 +26,11 @@ class Driver : public lldb::SBBroadcaster { public: - typedef enum CommandPlacement { + enum CommandPlacement { eCommandPlacementBeforeFile, eCommandPlacementAfterFile, eCommandPlacementAfterCrash, - } CommandPlacement; + }; Driver();