forked from OSchip/llvm-project
[lldb] Specify unsigned underlying type for an enumeration explicitly
The enumeration EntryType is used as a bit field of DebugMacroEntry: ``` EntryType m_type : 3 ``` Since underlying type of enumeration is implementation-dependent, a signed integer is converted to the 3-bit value by some compilers (MSVC). That's why a DebugMacroEntry instance that was created with EntryType value > 3 (END_FILE or INDIRECT) contains incorrect negative value in its m_type data-member.
This commit is contained in:
parent
b0469eede2
commit
e2d3eb00cc
|
@ -23,7 +23,9 @@ typedef std::shared_ptr<DebugMacros> DebugMacrosSP;
|
|||
|
||||
class DebugMacroEntry {
|
||||
public:
|
||||
enum EntryType { INVALID, DEFINE, UNDEF, START_FILE, END_FILE, INDIRECT };
|
||||
enum EntryType : uint32_t {
|
||||
INVALID, DEFINE, UNDEF, START_FILE, END_FILE, INDIRECT
|
||||
};
|
||||
|
||||
public:
|
||||
static DebugMacroEntry CreateDefineEntry(uint32_t line, const char *str);
|
||||
|
|
Loading…
Reference in New Issue