Removed a memory map loading of a file where the mmap contents were just
being read directly into a string. The use of memory mapping here was useless.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@124803 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Target/Target.cpp b/source/Target/Target.cpp
index a57bf18..83024be 100644
--- a/source/Target/Target.cpp
+++ b/source/Target/Target.cpp
@@ -1174,18 +1174,17 @@
                     return;
                 }
                 
-                DataBufferMemoryMap buf;
+                DataBufferSP data_sp (file_spec.ReadFileContents());
                 
-                if (!buf.MemoryMapFromFileSpec(&file_spec) &&
-                    buf.GetError().Fail())
+                if (!data_sp && data_sp->GetByteSize() == 0)
                 {
                     err.SetErrorToGenericError ();
-                    err.SetErrorStringWithFormat ("Couldn't read from %s: %s\n", value, buf.GetError().AsCString());
+                    err.SetErrorStringWithFormat ("Couldn't read from %s\n", value);
                     return;
                 }
                 
                 m_expr_prefix_path = value;
-                m_expr_prefix_contents.assign(reinterpret_cast<const char *>(buf.GetBytes()), buf.GetByteSize());
+                m_expr_prefix_contents.assign(reinterpret_cast<const char *>(data_sp->GetBytes()), data_sp->GetByteSize());
             }
             return;
         case lldb::eVarSetOperationAppend: