[Lldb-commits] [lldb] r224443 - Work around an internal compiler error in MSVC.

Zachary Turner zturner at google.com
Wed Dec 17 10:02:37 PST 2014


Author: zturner
Date: Wed Dec 17 12:02:36 2014
New Revision: 224443

URL: http://llvm.org/viewvc/llvm-project?rev=224443&view=rev
Log:
Work around an internal compiler error in MSVC.

For some reason MSVC ICEs when trying to index into a map using
a temporary object.  Work around this by separating out the call
into multiple lines.

Patch by Aidan Dodds
Differential Revision: http://reviews.llvm.org/D6702
Reviewed by: Zachary Turner, Greg Clayton

Modified:
    lldb/trunk/include/lldb/Utility/ProcessStructReader.h

Modified: lldb/trunk/include/lldb/Utility/ProcessStructReader.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Utility/ProcessStructReader.h?rev=224443&r1=224442&r2=224443&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Utility/ProcessStructReader.h (original)
+++ lldb/trunk/include/lldb/Utility/ProcessStructReader.h Wed Dec 17 12:02:36 2014
@@ -63,7 +63,9 @@ namespace lldb_private {
                 // no support for things larger than a uint64_t (yet)
                 if (size > 8)
                     return;
-                m_fields[ConstString(name.c_str())] = FieldImpl{field_type,static_cast<size_t>(bit_offset/8),static_cast<size_t>(size)};
+                ConstString const_name = ConstString(name.c_str());
+                size_t byte_index = static_cast<size_t>(bit_offset / 8);
+                m_fields[const_name] = FieldImpl{field_type, byte_index, size};
             }
             size_t total_size = struct_type.GetByteSize();
             lldb::DataBufferSP buffer_sp(new DataBufferHeap(total_size,0));





More information about the lldb-commits mailing list