[Lldb-commits] [lldb] r360654 - typedef enum -> enum
Fangrui Song via lldb-commits
lldb-commits at lists.llvm.org
Tue May 14 01:55:50 PDT 2019
Author: maskray
Date: Tue May 14 01:55:50 2019
New Revision: 360654
URL: http://llvm.org/viewvc/llvm-project?rev=360654&view=rev
Log:
typedef enum -> enum
Reviewed By: labath
Differential Revision: https://reviews.llvm.org/D61883
Modified:
lldb/trunk/include/lldb/Breakpoint/Breakpoint.h
lldb/trunk/include/lldb/Core/Address.h
lldb/trunk/include/lldb/Core/AddressResolver.h
lldb/trunk/include/lldb/Core/SearchFilter.h
lldb/trunk/include/lldb/Host/Socket.h
lldb/trunk/include/lldb/Interpreter/CommandCompletions.h
lldb/trunk/include/lldb/Interpreter/OptionGroupWatchpoint.h
lldb/trunk/include/lldb/Interpreter/OptionValue.h
lldb/trunk/include/lldb/Interpreter/ScriptInterpreter.h
lldb/trunk/include/lldb/Symbol/ObjectFile.h
lldb/trunk/include/lldb/Symbol/SymbolContext.h
lldb/trunk/include/lldb/Symbol/Symtab.h
lldb/trunk/include/lldb/Symbol/Type.h
lldb/trunk/include/lldb/Target/Process.h
lldb/trunk/include/lldb/Target/Target.h
lldb/trunk/include/lldb/Target/ThreadPlan.h
lldb/trunk/include/lldb/Target/ThreadPlanTracer.h
lldb/trunk/include/lldb/Utility/DataExtractor.h
lldb/trunk/include/lldb/Utility/IOObject.h
lldb/trunk/include/lldb/Utility/Predicate.h
lldb/trunk/include/lldb/lldb-private-enumerations.h
lldb/trunk/packages/Python/lldbsuite/test/expression_command/cast_int_to_anonymous_enum/main.cpp
lldb/trunk/packages/Python/lldbsuite/test/python_api/lldbutil/iter/main.cpp
lldb/trunk/packages/Python/lldbsuite/test/python_api/module_section/main.cpp
lldb/trunk/source/Commands/CommandObjectBreakpoint.cpp
lldb/trunk/source/Plugins/Instruction/ARM/EmulateInstructionARM.h
lldb/trunk/source/Plugins/Instruction/ARM64/EmulateInstructionARM64.h
lldb/trunk/source/Plugins/JITLoader/GDB/JITLoaderGDB.cpp
lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.h
lldb/trunk/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.h
lldb/trunk/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.h
lldb/trunk/source/Plugins/Process/Utility/ARMDefines.h
lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.h
lldb/trunk/source/Plugins/Process/mach-core/ProcessMachCore.h
lldb/trunk/source/Target/Target.cpp
lldb/trunk/tools/debugserver/source/DNBDataRef.h
lldb/trunk/tools/debugserver/source/DNBDefs.h
lldb/trunk/tools/debugserver/source/DNBError.h
lldb/trunk/tools/debugserver/source/MacOSX/arm/DNBArchImpl.h
lldb/trunk/tools/debugserver/source/MacOSX/arm64/DNBArchImplARM64.h
lldb/trunk/tools/debugserver/source/MacOSX/i386/DNBArchImplI386.h
lldb/trunk/tools/debugserver/source/MacOSX/ppc/DNBArchImpl.h
lldb/trunk/tools/debugserver/source/MacOSX/x86_64/DNBArchImplX86_64.h
lldb/trunk/tools/debugserver/source/RNBDefs.h
lldb/trunk/tools/debugserver/source/RNBRemote.h
lldb/trunk/tools/debugserver/source/debugserver.cpp
lldb/trunk/tools/debugserver/source/libdebugserver.cpp
lldb/trunk/tools/driver/Driver.h
Modified: lldb/trunk/include/lldb/Breakpoint/Breakpoint.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Breakpoint/Breakpoint.h?rev=360654&r1=360653&r2=360654&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Breakpoint/Breakpoint.h (original)
+++ lldb/trunk/include/lldb/Breakpoint/Breakpoint.h Tue May 14 01:55:50 2019
@@ -82,7 +82,7 @@ public:
/// 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 };
Modified: lldb/trunk/include/lldb/Core/Address.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/Address.h?rev=360654&r1=360653&r2=360654&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/Address.h (original)
+++ lldb/trunk/include/lldb/Core/Address.h Tue May 14 01:55:50 2019
@@ -81,7 +81,7 @@ class Address {
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 @@ public:
/// // 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 @@ public:
/// // 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.
///
Modified: lldb/trunk/include/lldb/Core/AddressResolver.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/AddressResolver.h?rev=360654&r1=360653&r2=360654&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/AddressResolver.h (original)
+++ lldb/trunk/include/lldb/Core/AddressResolver.h Tue May 14 01:55:50 2019
@@ -36,7 +36,7 @@ namespace lldb_private {
class AddressResolver : public Searcher {
public:
- typedef enum { Exact, Regexp, Glob } MatchType;
+ enum MatchType { Exact, Regexp, Glob };
AddressResolver();
Modified: lldb/trunk/include/lldb/Core/SearchFilter.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/SearchFilter.h?rev=360654&r1=360653&r2=360654&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/SearchFilter.h (original)
+++ lldb/trunk/include/lldb/Core/SearchFilter.h Tue May 14 01:55:50 2019
@@ -59,11 +59,11 @@ namespace lldb_private {
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();
Modified: lldb/trunk/include/lldb/Host/Socket.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Host/Socket.h?rev=360654&r1=360653&r2=360654&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Host/Socket.h (original)
+++ lldb/trunk/include/lldb/Host/Socket.h Tue May 14 01:55:50 2019
@@ -39,12 +39,12 @@ typedef int NativeSocket;
class Socket : public IOObject {
public:
- typedef enum {
+ enum SocketProtocol {
ProtocolTcp,
ProtocolUdp,
ProtocolUnixDomain,
ProtocolUnixAbstract
- } SocketProtocol;
+ };
static const NativeSocket kInvalidSocketValue;
Modified: lldb/trunk/include/lldb/Interpreter/CommandCompletions.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Interpreter/CommandCompletions.h?rev=360654&r1=360653&r2=360654&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Interpreter/CommandCompletions.h (original)
+++ lldb/trunk/include/lldb/Interpreter/CommandCompletions.h Tue May 14 01:55:50 2019
@@ -30,7 +30,7 @@ public:
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 @@ public:
// 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;
Modified: lldb/trunk/include/lldb/Interpreter/OptionGroupWatchpoint.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Interpreter/OptionGroupWatchpoint.h?rev=360654&r1=360653&r2=360654&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Interpreter/OptionGroupWatchpoint.h (original)
+++ lldb/trunk/include/lldb/Interpreter/OptionGroupWatchpoint.h Tue May 14 01:55:50 2019
@@ -34,12 +34,12 @@ public:
// 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;
Modified: lldb/trunk/include/lldb/Interpreter/OptionValue.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Interpreter/OptionValue.h?rev=360654&r1=360653&r2=360654&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Interpreter/OptionValue.h (original)
+++ lldb/trunk/include/lldb/Interpreter/OptionValue.h Tue May 14 01:55:50 2019
@@ -22,7 +22,7 @@ namespace lldb_private {
// OptionValue
class OptionValue {
public:
- typedef enum {
+ enum Type {
eTypeInvalid = 0,
eTypeArch,
eTypeArgs,
@@ -43,7 +43,7 @@ public:
eTypeUInt64,
eTypeUUID,
eTypeFormatEntity
- } Type;
+ };
enum {
eDumpOptionName = (1u << 0),
Modified: lldb/trunk/include/lldb/Interpreter/ScriptInterpreter.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Interpreter/ScriptInterpreter.h?rev=360654&r1=360653&r2=360654&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Interpreter/ScriptInterpreter.h (original)
+++ lldb/trunk/include/lldb/Interpreter/ScriptInterpreter.h Tue May 14 01:55:50 2019
@@ -34,7 +34,7 @@ private:
class ScriptInterpreter : public PluginInterface {
public:
- typedef enum {
+ enum ScriptReturnType {
eScriptReturnTypeCharPtr,
eScriptReturnTypeBool,
eScriptReturnTypeShortInt,
@@ -50,7 +50,7 @@ public:
eScriptReturnTypeChar,
eScriptReturnTypeCharStrOrNone,
eScriptReturnTypeOpaqueObject
- } ScriptReturnType;
+ };
ScriptInterpreter(Debugger &debugger, lldb::ScriptLanguage script_lang);
Modified: lldb/trunk/include/lldb/Symbol/ObjectFile.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/ObjectFile.h?rev=360654&r1=360653&r2=360654&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Symbol/ObjectFile.h (original)
+++ lldb/trunk/include/lldb/Symbol/ObjectFile.h Tue May 14 01:55:50 2019
@@ -61,7 +61,7 @@ class ObjectFile : public std::enable_sh
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 @@ public:
/// 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;
Modified: lldb/trunk/include/lldb/Symbol/SymbolContext.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/SymbolContext.h?rev=360654&r1=360653&r2=360654&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Symbol/SymbolContext.h (original)
+++ lldb/trunk/include/lldb/Symbol/SymbolContext.h Tue May 14 01:55:50 2019
@@ -351,7 +351,7 @@ public:
class SymbolContextSpecifier {
public:
- typedef enum SpecificationType {
+ enum SpecificationType {
eNothingSpecified = 0,
eModuleSpecified = 1 << 0,
eFileSpecified = 1 << 1,
@@ -360,7 +360,7 @@ public:
eFunctionSpecified = 1 << 4,
eClassOrNamespaceSpecified = 1 << 5,
eAddressRangeSpecified = 1 << 6
- } SpecificationType;
+ };
// This one produces a specifier that matches everything...
SymbolContextSpecifier(const lldb::TargetSP &target_sp);
Modified: lldb/trunk/include/lldb/Symbol/Symtab.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/Symtab.h?rev=360654&r1=360653&r2=360654&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Symbol/Symtab.h (original)
+++ lldb/trunk/include/lldb/Symbol/Symtab.h Tue May 14 01:55:50 2019
@@ -23,17 +23,13 @@ public:
typedef std::vector<uint32_t> IndexCollection;
typedef UniqueCStringMap<uint32_t> 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();
Modified: lldb/trunk/include/lldb/Symbol/Type.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/Type.h?rev=360654&r1=360653&r2=360654&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Symbol/Type.h (original)
+++ lldb/trunk/include/lldb/Symbol/Type.h Tue May 14 01:55:50 2019
@@ -59,25 +59,25 @@ protected:
class Type : public std::enable_shared_from_this<Type>, 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
Modified: lldb/trunk/include/lldb/Target/Process.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/Process.h?rev=360654&r1=360653&r2=360654&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Target/Process.h (original)
+++ lldb/trunk/include/lldb/Target/Process.h Tue May 14 01:55:50 2019
@@ -2509,11 +2509,11 @@ protected:
// RequestResume, don't call Resume directly.
class NextEventAction {
public:
- typedef enum EventActionResult {
+ enum EventActionResult {
eEventActionSuccess,
eEventActionRetry,
eEventActionExit
- } EventActionResult;
+ };
NextEventAction(Process *process) : m_process(process) {}
Modified: lldb/trunk/include/lldb/Target/Target.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/Target.h?rev=360654&r1=360653&r2=360654&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Target/Target.h (original)
+++ lldb/trunk/include/lldb/Target/Target.h Tue May 14 01:55:50 2019
@@ -38,29 +38,29 @@ namespace lldb_private {
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 {
Modified: lldb/trunk/include/lldb/Target/ThreadPlan.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/ThreadPlan.h?rev=360654&r1=360653&r2=360654&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Target/ThreadPlan.h (original)
+++ lldb/trunk/include/lldb/Target/ThreadPlan.h Tue May 14 01:55:50 2019
@@ -331,11 +331,11 @@ namespace lldb_private {
class ThreadPlan : public std::enable_shared_from_this<ThreadPlan>,
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 @@ public:
eKindStepUntil,
eKindTestCondition
- } ThreadPlanKind;
+ };
// Constructors and Destructors
ThreadPlan(ThreadPlanKind kind, const char *name, Thread &thread,
Modified: lldb/trunk/include/lldb/Target/ThreadPlanTracer.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/ThreadPlanTracer.h?rev=360654&r1=360653&r2=360654&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Target/ThreadPlanTracer.h (original)
+++ lldb/trunk/include/lldb/Target/ThreadPlanTracer.h Tue May 14 01:55:50 2019
@@ -21,12 +21,12 @@ class ThreadPlanTracer {
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);
Modified: lldb/trunk/include/lldb/Utility/DataExtractor.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Utility/DataExtractor.h?rev=360654&r1=360653&r2=360654&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Utility/DataExtractor.h (original)
+++ lldb/trunk/include/lldb/Utility/DataExtractor.h Tue May 14 01:55:50 2019
@@ -48,7 +48,7 @@ class DataExtractor {
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 @@ public:
TypePointer, ///< Format output as pointers
TypeULEB128, ///< Format output as ULEB128 numbers
TypeSLEB128 ///< Format output as SLEB128 numbers
- } Type;
+ };
/// Default constructor.
///
Modified: lldb/trunk/include/lldb/Utility/IOObject.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Utility/IOObject.h?rev=360654&r1=360653&r2=360654&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Utility/IOObject.h (original)
+++ lldb/trunk/include/lldb/Utility/IOObject.h Tue May 14 01:55:50 2019
@@ -19,10 +19,10 @@ namespace lldb_private {
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
Modified: lldb/trunk/include/lldb/Utility/Predicate.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Utility/Predicate.h?rev=360654&r1=360653&r2=360654&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Utility/Predicate.h (original)
+++ lldb/trunk/include/lldb/Utility/Predicate.h Tue May 14 01:55:50 2019
@@ -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
Modified: lldb/trunk/include/lldb/lldb-private-enumerations.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/lldb-private-enumerations.h?rev=360654&r1=360653&r2=360654&view=diff
==============================================================================
--- lldb/trunk/include/lldb/lldb-private-enumerations.h (original)
+++ lldb/trunk/include/lldb/lldb-private-enumerations.h Tue May 14 01:55:50 2019
@@ -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 @@ typedef enum StepType {
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 @@ enum class AddressClass {
};
// 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 @@ typedef enum ArchitectureType {
// eSetVarTypeNone
//} SettableVariableType;
-typedef enum VarSetOperationType {
+enum VarSetOperationType {
eVarSetOperationReplace,
eVarSetOperationInsertBefore,
eVarSetOperationInsertAfter,
@@ -89,9 +89,9 @@ typedef enum VarSetOperationType {
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 @@ typedef enum ArgumentRepetitionType {
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 @@ typedef enum InstructionType {
// 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 @@ typedef enum FormatCategoryItem {
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 @@ typedef enum FormatterChoiceCriterion {
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 {
Modified: lldb/trunk/packages/Python/lldbsuite/test/expression_command/cast_int_to_anonymous_enum/main.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/expression_command/cast_int_to_anonymous_enum/main.cpp?rev=360654&r1=360653&r2=360654&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/expression_command/cast_int_to_anonymous_enum/main.cpp (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/expression_command/cast_int_to_anonymous_enum/main.cpp Tue May 14 01:55:50 2019
@@ -1,6 +1,6 @@
-typedef enum {
+enum flow_e {
A=0,
-} flow_e;
+};
int main() {
flow_e f;
Modified: lldb/trunk/packages/Python/lldbsuite/test/python_api/lldbutil/iter/main.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/python_api/lldbutil/iter/main.cpp?rev=360654&r1=360653&r2=360654&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/python_api/lldbutil/iter/main.cpp (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/python_api/lldbutil/iter/main.cpp Tue May 14 01:55:50 2019
@@ -22,11 +22,11 @@ std::thread g_thread_2;
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);
Modified: lldb/trunk/packages/Python/lldbsuite/test/python_api/module_section/main.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/python_api/module_section/main.cpp?rev=360654&r1=360653&r2=360654&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/python_api/module_section/main.cpp (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/python_api/module_section/main.cpp Tue May 14 01:55:50 2019
@@ -22,11 +22,11 @@ std::thread g_thread_2;
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);
Modified: lldb/trunk/source/Commands/CommandObjectBreakpoint.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectBreakpoint.cpp?rev=360654&r1=360653&r2=360654&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectBreakpoint.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectBreakpoint.cpp Tue May 14 01:55:50 2019
@@ -324,7 +324,7 @@ static constexpr OptionDefinition g_brea
class CommandObjectBreakpointSet : public CommandObjectParsed {
public:
- typedef enum BreakpointSetType {
+ enum BreakpointSetType {
eSetTypeInvalid,
eSetTypeFileAndLine,
eSetTypeAddress,
@@ -333,7 +333,7 @@ public:
eSetTypeSourceRegexp,
eSetTypeException,
eSetTypeScripted,
- } BreakpointSetType;
+ };
CommandObjectBreakpointSet(CommandInterpreter &interpreter)
: CommandObjectParsed(
@@ -1420,10 +1420,7 @@ static constexpr OptionDefinition g_brea
class CommandObjectBreakpointClear : public CommandObjectParsed {
public:
- typedef enum BreakpointClearType {
- eClearTypeInvalid,
- eClearTypeFileAndLine
- } BreakpointClearType;
+ enum BreakpointClearType { eClearTypeInvalid, eClearTypeFileAndLine };
CommandObjectBreakpointClear(CommandInterpreter &interpreter)
: CommandObjectParsed(interpreter, "breakpoint clear",
Modified: lldb/trunk/source/Plugins/Instruction/ARM/EmulateInstructionARM.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Instruction/ARM/EmulateInstructionARM.h?rev=360654&r1=360653&r2=360654&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Instruction/ARM/EmulateInstructionARM.h (original)
+++ lldb/trunk/source/Plugins/Instruction/ARM/EmulateInstructionARM.h Tue May 14 01:55:50 2019
@@ -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;
Modified: lldb/trunk/source/Plugins/Instruction/ARM64/EmulateInstructionARM64.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Instruction/ARM64/EmulateInstructionARM64.h?rev=360654&r1=360653&r2=360654&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Instruction/ARM64/EmulateInstructionARM64.h (original)
+++ lldb/trunk/source/Plugins/Instruction/ARM64/EmulateInstructionARM64.h Tue May 14 01:55:50 2019
@@ -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,
Modified: lldb/trunk/source/Plugins/JITLoader/GDB/JITLoaderGDB.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/JITLoader/GDB/JITLoaderGDB.cpp?rev=360654&r1=360653&r2=360654&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/JITLoader/GDB/JITLoaderGDB.cpp (original)
+++ lldb/trunk/source/Plugins/JITLoader/GDB/JITLoaderGDB.cpp Tue May 14 01:55:50 2019
@@ -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
Modified: lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.h?rev=360654&r1=360653&r2=360654&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.h (original)
+++ lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.h Tue May 14 01:55:50 2019
@@ -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;
Modified: lldb/trunk/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.h?rev=360654&r1=360653&r2=360654&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.h (original)
+++ lldb/trunk/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.h Tue May 14 01:55:50 2019
@@ -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];
Modified: lldb/trunk/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.h?rev=360654&r1=360653&r2=360654&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.h (original)
+++ lldb/trunk/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.h Tue May 14 01:55:50 2019
@@ -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);
Modified: lldb/trunk/source/Plugins/Process/Utility/ARMDefines.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/ARMDefines.h?rev=360654&r1=360653&r2=360654&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Utility/ARMDefines.h (original)
+++ lldb/trunk/source/Plugins/Process/Utility/ARMDefines.h Tue May 14 01:55:50 2019
@@ -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
Modified: lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.h?rev=360654&r1=360653&r2=360654&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.h (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.h Tue May 14 01:55:50 2019
@@ -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
Modified: lldb/trunk/source/Plugins/Process/mach-core/ProcessMachCore.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/mach-core/ProcessMachCore.h?rev=360654&r1=360653&r2=360654&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/mach-core/ProcessMachCore.h (original)
+++ lldb/trunk/source/Plugins/Process/mach-core/ProcessMachCore.h Tue May 14 01:55:50 2019
@@ -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.
Modified: lldb/trunk/source/Target/Target.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/Target.cpp?rev=360654&r1=360653&r2=360654&view=diff
==============================================================================
--- lldb/trunk/source/Target/Target.cpp (original)
+++ lldb/trunk/source/Target/Target.cpp Tue May 14 01:55:50 2019
@@ -3252,11 +3252,11 @@ static constexpr OptionEnumValueElement
"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)."},
Modified: lldb/trunk/tools/debugserver/source/DNBDataRef.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/debugserver/source/DNBDataRef.h?rev=360654&r1=360653&r2=360654&view=diff
==============================================================================
--- lldb/trunk/tools/debugserver/source/DNBDataRef.h (original)
+++ lldb/trunk/tools/debugserver/source/DNBDataRef.h Tue May 14 01:55:50 2019
@@ -31,7 +31,7 @@
class DNBDataRef {
public:
// For use with Dump
- typedef enum {
+ enum Type {
TypeUInt8 = 0,
TypeChar,
TypeUInt16,
@@ -40,7 +40,7 @@ public:
TypePointer,
TypeULEB128,
TypeSLEB128
- } Type;
+ };
typedef uint32_t offset_t;
typedef nub_addr_t addr_t;
Modified: lldb/trunk/tools/debugserver/source/DNBDefs.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/debugserver/source/DNBDefs.h?rev=360654&r1=360653&r2=360654&view=diff
==============================================================================
--- lldb/trunk/tools/debugserver/source/DNBDefs.h (original)
+++ lldb/trunk/tools/debugserver/source/DNBDefs.h Tue May 14 01:55:50 2019
@@ -64,7 +64,7 @@ typedef uint32_t nub_bool_t;
#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 @@ typedef enum {
eStateDetached,
eStateExited,
eStateSuspended
-} nub_state_t;
+};
-typedef enum {
+enum nub_launch_flavor_t {
eLaunchFlavorDefault = 0,
eLaunchFlavorPosixSpawn = 1,
eLaunchFlavorForkExec = 2,
@@ -91,7 +91,7 @@ typedef enum {
#ifdef WITH_FBS
eLaunchFlavorFBS = 5
#endif
-} nub_launch_flavor_t;
+};
#define NUB_STATE_IS_RUNNING(s) \
((s) == eStateAttaching || (s) == eStateLaunching || (s) == eStateRunning || \
Modified: lldb/trunk/tools/debugserver/source/DNBError.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/debugserver/source/DNBError.h?rev=360654&r1=360653&r2=360654&view=diff
==============================================================================
--- lldb/trunk/tools/debugserver/source/DNBError.h (original)
+++ lldb/trunk/tools/debugserver/source/DNBError.h Tue May 14 01:55:50 2019
@@ -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 @@ public:
,
FrontBoard = 5
#endif
- } FlavorType;
+ };
explicit DNBError(ValueType err = 0, FlavorType flavor = Generic)
: m_err(err), m_flavor(flavor) {}
Modified: lldb/trunk/tools/debugserver/source/MacOSX/arm/DNBArchImpl.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/debugserver/source/MacOSX/arm/DNBArchImpl.h?rev=360654&r1=360653&r2=360654&view=diff
==============================================================================
--- lldb/trunk/tools/debugserver/source/MacOSX/arm/DNBArchImpl.h (original)
+++ lldb/trunk/tools/debugserver/source/MacOSX/arm/DNBArchImpl.h Tue May 14 01:55:50 2019
@@ -113,14 +113,14 @@ protected:
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 };
Modified: lldb/trunk/tools/debugserver/source/MacOSX/arm64/DNBArchImplARM64.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/debugserver/source/MacOSX/arm64/DNBArchImplARM64.h?rev=360654&r1=360653&r2=360654&view=diff
==============================================================================
--- lldb/trunk/tools/debugserver/source/MacOSX/arm64/DNBArchImplARM64.h (original)
+++ lldb/trunk/tools/debugserver/source/MacOSX/arm64/DNBArchImplARM64.h Tue May 14 01:55:50 2019
@@ -75,14 +75,14 @@ protected:
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,
Modified: lldb/trunk/tools/debugserver/source/MacOSX/i386/DNBArchImplI386.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/debugserver/source/MacOSX/i386/DNBArchImplI386.h?rev=360654&r1=360653&r2=360654&view=diff
==============================================================================
--- lldb/trunk/tools/debugserver/source/MacOSX/i386/DNBArchImplI386.h (original)
+++ lldb/trunk/tools/debugserver/source/MacOSX/i386/DNBArchImplI386.h Tue May 14 01:55:50 2019
@@ -88,23 +88,23 @@ protected:
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 };
Modified: lldb/trunk/tools/debugserver/source/MacOSX/ppc/DNBArchImpl.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/debugserver/source/MacOSX/ppc/DNBArchImpl.h?rev=360654&r1=360653&r2=360654&view=diff
==============================================================================
--- lldb/trunk/tools/debugserver/source/MacOSX/ppc/DNBArchImpl.h (original)
+++ lldb/trunk/tools/debugserver/source/MacOSX/ppc/DNBArchImpl.h Tue May 14 01:55:50 2019
@@ -45,14 +45,14 @@ public:
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,
Modified: lldb/trunk/tools/debugserver/source/MacOSX/x86_64/DNBArchImplX86_64.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/debugserver/source/MacOSX/x86_64/DNBArchImplX86_64.h?rev=360654&r1=360653&r2=360654&view=diff
==============================================================================
--- lldb/trunk/tools/debugserver/source/MacOSX/x86_64/DNBArchImplX86_64.h (original)
+++ lldb/trunk/tools/debugserver/source/MacOSX/x86_64/DNBArchImplX86_64.h Tue May 14 01:55:50 2019
@@ -87,23 +87,23 @@ protected:
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 };
Modified: lldb/trunk/tools/debugserver/source/RNBDefs.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/debugserver/source/RNBDefs.h?rev=360654&r1=360653&r2=360654&view=diff
==============================================================================
--- lldb/trunk/tools/debugserver/source/RNBDefs.h (original)
+++ lldb/trunk/tools/debugserver/source/RNBDefs.h Tue May 14 01:55:50 2019
@@ -75,7 +75,7 @@ extern "C" const double CONCAT(DEBUGSERV
class RNBRemote;
typedef std::shared_ptr<RNBRemote> 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
Modified: lldb/trunk/tools/debugserver/source/RNBRemote.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/debugserver/source/RNBRemote.h?rev=360654&r1=360653&r2=360654&view=diff
==============================================================================
--- lldb/trunk/tools/debugserver/source/RNBRemote.h (original)
+++ lldb/trunk/tools/debugserver/source/RNBRemote.h Tue May 14 01:55:50 2019
@@ -33,7 +33,7 @@ enum class compression_types { zlib_defl
class RNBRemote {
public:
- typedef enum {
+ enum PacketEnum {
invalid_packet = 0,
ack, // '+'
nack, // '-'
@@ -138,7 +138,7 @@ public:
query_supported_async_json_packets, // 'QSupportedAsyncJSONPackets'
configure_darwin_log, // 'ConfigureDarwinLog:'
unknown_type
- } PacketEnum;
+ };
typedef rnb_err_t (RNBRemote::*HandlePacketCallback)(const char *p);
Modified: lldb/trunk/tools/debugserver/source/debugserver.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/debugserver/source/debugserver.cpp?rev=360654&r1=360653&r2=360654&view=diff
==============================================================================
--- lldb/trunk/tools/debugserver/source/debugserver.cpp (original)
+++ lldb/trunk/tools/debugserver/source/debugserver.cpp Tue May 14 01:55:50 2019
@@ -46,7 +46,7 @@ extern "C" int proc_set_wakemon_params(p
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 @@ typedef enum {
eRNBRunLoopModeInferiorExecuting,
eRNBRunLoopModePlatformMode,
eRNBRunLoopModeExit
-} RNBRunLoopMode;
+};
// Global Variables
RNBRemoteSP g_remoteSP;
Modified: lldb/trunk/tools/debugserver/source/libdebugserver.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/debugserver/source/libdebugserver.cpp?rev=360654&r1=360653&r2=360654&view=diff
==============================================================================
--- lldb/trunk/tools/debugserver/source/libdebugserver.cpp (original)
+++ lldb/trunk/tools/debugserver/source/libdebugserver.cpp Tue May 14 01:55:50 2019
@@ -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;
Modified: lldb/trunk/tools/driver/Driver.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/driver/Driver.h?rev=360654&r1=360653&r2=360654&view=diff
==============================================================================
--- lldb/trunk/tools/driver/Driver.h (original)
+++ lldb/trunk/tools/driver/Driver.h Tue May 14 01:55:50 2019
@@ -26,11 +26,11 @@
class Driver : public lldb::SBBroadcaster {
public:
- typedef enum CommandPlacement {
+ enum CommandPlacement {
eCommandPlacementBeforeFile,
eCommandPlacementAfterFile,
eCommandPlacementAfterCrash,
- } CommandPlacement;
+ };
Driver();
More information about the lldb-commits
mailing list