Skip to content

Commit 8845780

Browse files
committed
[lldb] Add cast to fix compile error on 32-bit platforms
(cherry picked from commit f6012a2)
1 parent 4e38f13 commit 8845780

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

lldb/source/DataFormatters/FormatterBytecode.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ llvm::Error Interpret(std::vector<ControlStackElement> &control,
339339
}
340340
case op_is_null: {
341341
TYPE_CHECK(Object);
342-
data.Push(data.Pop<ValueObjectSP>() ? 0ULL : 1ULL);
342+
data.Push(data.Pop<ValueObjectSP>() ? (uint64_t)0 : (uint64_t)1);
343343
continue;
344344
}
345345

@@ -392,8 +392,6 @@ llvm::Error Interpret(std::vector<ControlStackElement> &control,
392392
int64_t x = data.Pop<int64_t>(); \
393393
if (y > 64) \
394394
return error("shift out of bounds"); \
395-
if (y < 0) \
396-
return error("shift out of bounds"); \
397395
data.Push(x OP y); \
398396
} else \
399397
return error("unsupported data types"); \
@@ -551,7 +549,7 @@ llvm::Error Interpret(std::vector<ControlStackElement> &control,
551549
}
552550
case sel_strlen: {
553551
TYPE_CHECK(String);
554-
data.Push(data.Pop<std::string>().size());
552+
data.Push((uint64_t)data.Pop<std::string>().size());
555553
break;
556554
}
557555
case sel_fmt: {

0 commit comments

Comments
 (0)