diff --git a/lldb/include/lldb/lldb-defines.h b/lldb/include/lldb/lldb-defines.h index 64f13d9275ef..07353a905c4b 100644 --- a/lldb/include/lldb/lldb-defines.h +++ b/lldb/include/lldb/lldb-defines.h @@ -103,7 +103,7 @@ #define LLDB_OPT_SET_8 (1U << 7) #define LLDB_OPT_SET_9 (1U << 8) #define LLDB_OPT_SET_10 (1U << 9) -#define LLDB_OPT_SET_FROM(A, B) (((1U << (B)) - 1) ^ (1U << ((A)-1) - 1)) +#define LLDB_OPT_SET_FROM_TO(A, B) (((1U << (B)) - 1) ^ (((1U << (A))-1) >> 1)) #if defined(__cplusplus) diff --git a/lldb/source/Commands/CommandObjectBreakpoint.cpp b/lldb/source/Commands/CommandObjectBreakpoint.cpp index cb86e08c1db0..a3c2e182bbf4 100644 --- a/lldb/source/Commands/CommandObjectBreakpoint.cpp +++ b/lldb/source/Commands/CommandObjectBreakpoint.cpp @@ -74,8 +74,8 @@ CommandObjectBreakpointSet::CommandOptions::~CommandOptions () { } -#define LLDB_OPT_FILE ( LLDB_OPT_SET_FROM(1, 9) & ~LLDB_OPT_SET_2 ) -#define LLDB_OPT_NOT_10 ( LLDB_OPT_SET_FROM(1, 10) & ~LLDB_OPT_SET_10 ) +#define LLDB_OPT_FILE ( LLDB_OPT_SET_FROM_TO(1, 9) & ~LLDB_OPT_SET_2 ) +#define LLDB_OPT_NOT_10 ( LLDB_OPT_SET_FROM_TO(1, 10) & ~LLDB_OPT_SET_10 ) OptionDefinition CommandObjectBreakpointSet::CommandOptions::g_option_table[] =