Fix warnings generated by clang-cl.
There were a couple of real bugs here regarding error checking and
signed/unsigned comparisons, but mostly these were just noise.
There was one class of bugs fixed here which is particularly
annoying, dealing with MSVC's non-standard behavior regarding
the underlying type of enums. See the comment in
lldb-enumerations.h for details. In short, from now on please use
FLAGS_ENUM and FLAGS_ANONYMOUS_ENUM when defining enums which
contain values larger than can fit into a signed integer.
llvm-svn: 233943
diff --git a/lldb/source/Symbol/CompactUnwindInfo.cpp b/lldb/source/Symbol/CompactUnwindInfo.cpp
index ae99f30..17a4a99 100644
--- a/lldb/source/Symbol/CompactUnwindInfo.cpp
+++ b/lldb/source/Symbol/CompactUnwindInfo.cpp
@@ -35,13 +35,15 @@
// Constants from <mach-o/compact_unwind_encoding.h>
- enum {
+ FLAGS_ANONYMOUS_ENUM()
+ {
UNWIND_IS_NOT_FUNCTION_START = 0x80000000,
UNWIND_HAS_LSDA = 0x40000000,
UNWIND_PERSONALITY_MASK = 0x30000000,
};
- enum {
+ FLAGS_ANONYMOUS_ENUM()
+ {
UNWIND_X86_MODE_MASK = 0x0F000000,
UNWIND_X86_MODE_EBP_FRAME = 0x01000000,
UNWIND_X86_MODE_STACK_IMMD = 0x02000000,
@@ -59,7 +61,8 @@
UNWIND_X86_DWARF_SECTION_OFFSET = 0x00FFFFFF,
};
- enum {
+ enum
+ {
UNWIND_X86_REG_NONE = 0,
UNWIND_X86_REG_EBX = 1,
UNWIND_X86_REG_ECX = 2,
@@ -68,7 +71,9 @@
UNWIND_X86_REG_ESI = 5,
UNWIND_X86_REG_EBP = 6,
};
- enum {
+
+ FLAGS_ANONYMOUS_ENUM()
+ {
UNWIND_X86_64_MODE_MASK = 0x0F000000,
UNWIND_X86_64_MODE_RBP_FRAME = 0x01000000,
UNWIND_X86_64_MODE_STACK_IMMD = 0x02000000,
@@ -86,7 +91,8 @@
UNWIND_X86_64_DWARF_SECTION_OFFSET = 0x00FFFFFF,
};
- enum {
+ enum
+ {
UNWIND_X86_64_REG_NONE = 0,
UNWIND_X86_64_REG_RBX = 1,
UNWIND_X86_64_REG_R12 = 2,