After thinking about it, it doesn't seem right
to make assumptions if the type is unsized. We
just give up (and let the JIT handle it) instead.
git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@147915 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Expression/IRInterpreter.cpp b/source/Expression/IRInterpreter.cpp
index 9bf056f..dba0979 100644
--- a/source/Expression/IRInterpreter.cpp
+++ b/source/Expression/IRInterpreter.cpp
@@ -274,10 +274,10 @@
{
MemoryMap::iterator i = LookupInternal(addr);
- if (i == m_memory.end())
+ if (i == m_memory.end() || !type->isSized())
return Region();
-
- size_t size = (type->isSized() ? m_target_data.getTypeStoreSize(type) : m_target_data.getPointerSize());
+
+ size_t size = m_target_data.getTypeStoreSize(type);
return Region(*i, addr, size);
}