[Lldb-commits] [lldb] cd9e5c3 - Fix the macos build after D71575.
Jim Ingham via lldb-commits
lldb-commits at lists.llvm.org
Wed Jan 15 18:14:05 PST 2020
Author: Jim Ingham
Date: 2020-01-15T18:13:44-08:00
New Revision: cd9e5c32302cd3b34b796683eedb072c6a1cfdc1
URL: https://github.com/llvm/llvm-project/commit/cd9e5c32302cd3b34b796683eedb072c6a1cfdc1
DIFF: https://github.com/llvm/llvm-project/commit/cd9e5c32302cd3b34b796683eedb072c6a1cfdc1.diff
LOG: Fix the macos build after D71575.
size_t and uint64_t are spelled slightly differently on macOS, which was
causing the compiler to error out calling std::min - since the two types have
to be the same.
I fixed this by casting the uint64_t computation to a size_t. That's probably
not the cleanest solution, but it gets us back to building.
Added:
Modified:
lldb/source/Plugins/ObjectFile/wasm/ObjectFileWasm.cpp
Removed:
################################################################################
diff --git a/lldb/source/Plugins/ObjectFile/wasm/ObjectFileWasm.cpp b/lldb/source/Plugins/ObjectFile/wasm/ObjectFileWasm.cpp
index 1f636b719bb6..2c918a8f9db3 100644
--- a/lldb/source/Plugins/ObjectFile/wasm/ObjectFileWasm.cpp
+++ b/lldb/source/Plugins/ObjectFile/wasm/ObjectFileWasm.cpp
@@ -367,7 +367,7 @@ DataExtractor ObjectFileWasm::ReadImageData(uint64_t offset, size_t size) {
DataExtractor data;
if (m_file) {
if (offset < GetByteSize()) {
- size = std::min(size, GetByteSize() - offset);
+ size = std::min(size, (size_t) (GetByteSize() - offset));
auto buffer_sp = MapFileData(m_file, size, offset);
return DataExtractor(buffer_sp, GetByteOrder(), GetAddressByteSize());
}
More information about the lldb-commits
mailing list