typedef enum -> enum

Reviewed By: labath

Differential Revision: https://reviews.llvm.org/D61883

llvm-svn: 360654
This commit is contained in:
Fangrui Song committed 2019-05-14 08:55:50 +00:00
1 parent 004393681c
commit efe8e7e36d
48 files changed
+172 -202

No files matched your search

+1 -1
View File
@@ -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 };
+7 -7
View File
@@ -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.
///
+1 -1
View File
@@ -36,7 +36,7 @@ namespace lldb_private {
class AddressResolver : public Searcher {
public:
typedef enum { Exact, Regexp, Glob } MatchType;
enum MatchType { Exact, Regexp, Glob };
AddressResolver();
+2 -2
View File
@@ -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();
+2 -2
View File
@@ -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;
@@ -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;
@@ -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;
+2 -2
View File
@@ -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),
@@ -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);
+4 -4
View File
@@ -61,7 +61,7 @@ class ObjectFile : public std::enable_shared_from_this<ObjectFile>,
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;
+2 -2
View File
@@ -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);
+3 -7
View File
@@ -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();
+9 -9
View File
@@ -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
+2 -2
View File
@@ -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) {}
+8 -8
View File
@@ -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 {
+3 -3
View File
@@ -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,
+2 -2
View File
@@ -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);
+2 -2
View File
@@ -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.
///
+2 -2
View File
@@ -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
+2 -2
View File
@@ -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
+30 -38
View File
@@ -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 {
@@ -1,6 +1,6 @@
typedef enum {
enum flow_e {
A=0,
} flow_e;
};
int main() {
flow_e f;
@@ -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);
@@ -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);
@@ -324,7 +324,7 @@ static constexpr OptionDefinition g_breakpoint_set_options[] = {
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_breakpoint_clear_options[] = {
class CommandObjectBreakpointClear : public CommandObjectParsed {
public:
typedef enum BreakpointClearType {
eClearTypeInvalid,
eClearTypeFileAndLine
} BreakpointClearType;
enum BreakpointClearType { eClearTypeInvalid, eClearTypeFileAndLine };
CommandObjectBreakpointClear(CommandInterpreter &interpreter)
: CommandObjectParsed(interpreter, "breakpoint clear",
@@ -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;
@@ -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,
@@ -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
@@ -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;
@@ -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];
@@ -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);
@@ -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
@@ -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
@@ -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.
+2 -2
View File
@@ -3252,11 +3252,11 @@ static constexpr OptionEnumValueElement g_inline_breakpoint_enums[] = {
"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)."},
+2 -2
View File
@@ -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;
+4 -4
View File
@@ -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 || \
+2 -2
View File
@@ -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) {}
@@ -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 };
@@ -75,14 +75,14 @@ protected:
kern_return_t EnableHardwareSingleStep(bool enable);
static bool FixGenericRegisterNumber(uint32_t &set, uint32_t &reg);
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,
@@ -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 };
@@ -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,
@@ -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 };
+1 -1
View File
@@ -75,7 +75,7 @@ extern "C" const double CONCAT(DEBUGSERVER_PROGRAM_SYMBOL, VersionNumber);
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
+2 -2
View File
@@ -33,7 +33,7 @@ enum class compression_types { zlib_deflate, lz4, lzma, lzfse, none };
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);
@@ -46,7 +46,7 @@ extern "C" int proc_set_wakemon_params(pid_t, int,
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;
@@ -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;
+2 -2
View File
@@ -26,11 +26,11 @@
class Driver : public lldb::SBBroadcaster {
public:
typedef enum CommandPlacement {
enum CommandPlacement {
eCommandPlacementBeforeFile,
eCommandPlacementAfterFile,
eCommandPlacementAfterCrash,
} CommandPlacement;
};
Driver();