<div dir="ltr"><div><div>The affected bots are still red. I had issues with svn update around 15 hours ago (on Linux) related to "Msf".<br></div>Not sure how the bots manage their tree though.<br><br></div>-- HT<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Jul 30, 2016 at 11:47 PM, Zachary Turner via llvm-commits <span dir="ltr"><<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Is it still broken?  There was a problem with svn containing Msf and MSF on the remote, confusing Windows bots, but we got the second copy deleted from the remote so it should be ok now<div class="HOEnZb"><div class="h5"><br><div class="gmail_quote"><div dir="ltr">On Sat, Jul 30, 2016 at 3:08 PM Mike Aizatsky <<a href="mailto:aizatsky@google.com" target="_blank">aizatsky@google.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Zachary,<br><div><br></div><div>Looks like this change is broken on windows bot:</div><div><br></div><div><a href="http://lab.llvm.org:8011/builders/sanitizer-windows/builds/26549/steps/cmake/logs/stdio" target="_blank">http://lab.llvm.org:8011/builders/sanitizer-windows/builds/26549/steps/cmake/logs/stdio</a><br></div><div><pre style="font-family:"courier new",courier,monotype,monospace;font-size:medium;line-height:normal"><span style="color:red">CMake Error at CMakeLists.txt:563 (message):
  Unexpected failure executing llvm-build: llvm-build: fatal error: missing
  LLVMBuild.txt file at:
  'C:\\b\\slave\\sanitizer-windows\\llvm/lib\\DebugInfo\\MSF\\LLVMBuild.txt'

</span></pre><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr">On Fri, Jul 29, 2016 at 2:04 PM Zachary Turner via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: zturner<br>
Date: Fri Jul 29 15:56:36 2016<br>
New Revision: 277213<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=277213&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=277213&view=rev</a><br>
Log:<br>
[msf] Resubmit "Rename Msf -> MSF".<br>
<br>
Previously this change was submitted from a Windows machine, so<br>
changes made to the case of filenames and directory names did<br>
not survive the commit, and as a result the CMake source file<br>
names and the on-disk file names did not match on case-sensitive<br>
file systems.<br>
<br>
I'm resubmitting this patch from a Linux system, which hopefully<br>
allows the case changes to make it through unfettered.<br>
<br>
Added:<br>
    llvm/trunk/include/llvm/DebugInfo/MSF/ByteStream.h<br>
      - copied, changed from r277209, llvm/trunk/include/llvm/DebugInfo/Msf/ByteStream.h<br>
    llvm/trunk/include/llvm/DebugInfo/MSF/IMSFFile.h<br>
      - copied, changed from r277209, llvm/trunk/include/llvm/DebugInfo/Msf/IMsfFile.h<br>
    llvm/trunk/include/llvm/DebugInfo/MSF/MSFBuilder.h<br>
      - copied, changed from r277209, llvm/trunk/include/llvm/DebugInfo/Msf/MsfBuilder.h<br>
    llvm/trunk/include/llvm/DebugInfo/MSF/MSFCommon.h<br>
      - copied, changed from r277209, llvm/trunk/include/llvm/DebugInfo/Msf/MsfCommon.h<br>
    llvm/trunk/include/llvm/DebugInfo/MSF/MSFError.h<br>
      - copied, changed from r277209, llvm/trunk/include/llvm/DebugInfo/Msf/MsfError.h<br>
    llvm/trunk/include/llvm/DebugInfo/MSF/MSFStreamLayout.h<br>
      - copied, changed from r277209, llvm/trunk/include/llvm/DebugInfo/Msf/MsfStreamLayout.h<br>
    llvm/trunk/include/llvm/DebugInfo/MSF/MappedBlockStream.h<br>
      - copied, changed from r277209, llvm/trunk/include/llvm/DebugInfo/Msf/MappedBlockStream.h<br>
    llvm/trunk/include/llvm/DebugInfo/MSF/StreamArray.h<br>
      - copied, changed from r277209, llvm/trunk/include/llvm/DebugInfo/Msf/StreamArray.h<br>
    llvm/trunk/include/llvm/DebugInfo/MSF/StreamInterface.h<br>
      - copied, changed from r277209, llvm/trunk/include/llvm/DebugInfo/Msf/StreamInterface.h<br>
    llvm/trunk/include/llvm/DebugInfo/MSF/StreamReader.h<br>
      - copied, changed from r277209, llvm/trunk/include/llvm/DebugInfo/Msf/StreamReader.h<br>
    llvm/trunk/include/llvm/DebugInfo/MSF/StreamRef.h<br>
      - copied, changed from r277209, llvm/trunk/include/llvm/DebugInfo/Msf/StreamRef.h<br>
    llvm/trunk/include/llvm/DebugInfo/MSF/StreamWriter.h<br>
      - copied, changed from r277209, llvm/trunk/include/llvm/DebugInfo/Msf/StreamWriter.h<br>
    llvm/trunk/lib/DebugInfo/MSF/CMakeLists.txt<br>
      - copied, changed from r277209, llvm/trunk/lib/DebugInfo/Msf/CMakeLists.txt<br>
    llvm/trunk/lib/DebugInfo/MSF/LLVMBuild.txt<br>
      - copied, changed from r277209, llvm/trunk/lib/DebugInfo/Msf/LLVMBuild.txt<br>
    llvm/trunk/lib/DebugInfo/MSF/MSFBuilder.cpp<br>
      - copied, changed from r277209, llvm/trunk/lib/DebugInfo/Msf/MsfBuilder.cpp<br>
    llvm/trunk/lib/DebugInfo/MSF/MSFCommon.cpp<br>
      - copied, changed from r277209, llvm/trunk/lib/DebugInfo/Msf/MsfCommon.cpp<br>
    llvm/trunk/lib/DebugInfo/MSF/MSFError.cpp<br>
      - copied, changed from r277209, llvm/trunk/lib/DebugInfo/Msf/MsfError.cpp<br>
    llvm/trunk/lib/DebugInfo/MSF/MappedBlockStream.cpp<br>
      - copied, changed from r277209, llvm/trunk/lib/DebugInfo/Msf/MappedBlockStream.cpp<br>
    llvm/trunk/lib/DebugInfo/MSF/StreamReader.cpp<br>
      - copied, changed from r277209, llvm/trunk/lib/DebugInfo/Msf/StreamReader.cpp<br>
    llvm/trunk/lib/DebugInfo/MSF/StreamWriter.cpp<br>
      - copied, changed from r277209, llvm/trunk/lib/DebugInfo/Msf/StreamWriter.cpp<br>
    llvm/trunk/unittests/DebugInfo/PDB/MSFBuilderTest.cpp<br>
      - copied, changed from r277209, llvm/trunk/unittests/DebugInfo/PDB/MsfBuilderTest.cpp<br>
Removed:<br>
    llvm/trunk/include/llvm/DebugInfo/Msf/ByteStream.h<br>
    llvm/trunk/include/llvm/DebugInfo/Msf/IMsfFile.h<br>
    llvm/trunk/include/llvm/DebugInfo/Msf/MappedBlockStream.h<br>
    llvm/trunk/include/llvm/DebugInfo/Msf/MsfBuilder.h<br>
    llvm/trunk/include/llvm/DebugInfo/Msf/MsfCommon.h<br>
    llvm/trunk/include/llvm/DebugInfo/Msf/MsfError.h<br>
    llvm/trunk/include/llvm/DebugInfo/Msf/MsfStreamLayout.h<br>
    llvm/trunk/include/llvm/DebugInfo/Msf/StreamArray.h<br>
    llvm/trunk/include/llvm/DebugInfo/Msf/StreamInterface.h<br>
    llvm/trunk/include/llvm/DebugInfo/Msf/StreamReader.h<br>
    llvm/trunk/include/llvm/DebugInfo/Msf/StreamRef.h<br>
    llvm/trunk/include/llvm/DebugInfo/Msf/StreamWriter.h<br>
    llvm/trunk/lib/DebugInfo/Msf/CMakeLists.txt<br>
    llvm/trunk/lib/DebugInfo/Msf/LLVMBuild.txt<br>
    llvm/trunk/lib/DebugInfo/Msf/MappedBlockStream.cpp<br>
    llvm/trunk/lib/DebugInfo/Msf/MsfBuilder.cpp<br>
    llvm/trunk/lib/DebugInfo/Msf/MsfCommon.cpp<br>
    llvm/trunk/lib/DebugInfo/Msf/MsfError.cpp<br>
    llvm/trunk/lib/DebugInfo/Msf/StreamReader.cpp<br>
    llvm/trunk/lib/DebugInfo/Msf/StreamWriter.cpp<br>
    llvm/trunk/unittests/DebugInfo/PDB/MsfBuilderTest.cpp<br>
Modified:<br>
    llvm/trunk/include/llvm/DebugInfo/CodeView/CVRecord.h<br>
    llvm/trunk/include/llvm/DebugInfo/CodeView/ModuleSubstream.h<br>
    llvm/trunk/include/llvm/DebugInfo/CodeView/ModuleSubstreamVisitor.h<br>
    llvm/trunk/include/llvm/DebugInfo/CodeView/SymbolRecord.h<br>
    llvm/trunk/include/llvm/DebugInfo/PDB/Raw/DbiStream.h<br>
    llvm/trunk/include/llvm/DebugInfo/PDB/Raw/DbiStreamBuilder.h<br>
    llvm/trunk/include/llvm/DebugInfo/PDB/Raw/InfoStream.h<br>
    llvm/trunk/include/llvm/DebugInfo/PDB/Raw/InfoStreamBuilder.h<br>
    llvm/trunk/include/llvm/DebugInfo/PDB/Raw/ModInfo.h<br>
    llvm/trunk/include/llvm/DebugInfo/PDB/Raw/ModStream.h<br>
    llvm/trunk/include/llvm/DebugInfo/PDB/Raw/NameHashTable.h<br>
    llvm/trunk/include/llvm/DebugInfo/PDB/Raw/PDBFile.h<br>
    llvm/trunk/include/llvm/DebugInfo/PDB/Raw/PDBFileBuilder.h<br>
    llvm/trunk/include/llvm/DebugInfo/PDB/Raw/PublicsStream.h<br>
    llvm/trunk/include/llvm/DebugInfo/PDB/Raw/TpiStream.h<br>
    llvm/trunk/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp<br>
    llvm/trunk/lib/CodeGen/AsmPrinter/LLVMBuild.txt<br>
    llvm/trunk/lib/DebugInfo/CMakeLists.txt<br>
    llvm/trunk/lib/DebugInfo/CodeView/LLVMBuild.txt<br>
    llvm/trunk/lib/DebugInfo/CodeView/ModuleSubstream.cpp<br>
    llvm/trunk/lib/DebugInfo/CodeView/ModuleSubstreamVisitor.cpp<br>
    llvm/trunk/lib/DebugInfo/CodeView/TypeDumper.cpp<br>
    llvm/trunk/lib/DebugInfo/LLVMBuild.txt<br>
    llvm/trunk/lib/DebugInfo/PDB/LLVMBuild.txt<br>
    llvm/trunk/lib/DebugInfo/PDB/Raw/DbiStream.cpp<br>
    llvm/trunk/lib/DebugInfo/PDB/Raw/DbiStreamBuilder.cpp<br>
    llvm/trunk/lib/DebugInfo/PDB/Raw/InfoStream.cpp<br>
    llvm/trunk/lib/DebugInfo/PDB/Raw/InfoStreamBuilder.cpp<br>
    llvm/trunk/lib/DebugInfo/PDB/Raw/ModInfo.cpp<br>
    llvm/trunk/lib/DebugInfo/PDB/Raw/ModStream.cpp<br>
    llvm/trunk/lib/DebugInfo/PDB/Raw/NameHashTable.cpp<br>
    llvm/trunk/lib/DebugInfo/PDB/Raw/NameMap.cpp<br>
    llvm/trunk/lib/DebugInfo/PDB/Raw/NameMapBuilder.cpp<br>
    llvm/trunk/lib/DebugInfo/PDB/Raw/PDBFile.cpp<br>
    llvm/trunk/lib/DebugInfo/PDB/Raw/PDBFileBuilder.cpp<br>
    llvm/trunk/lib/DebugInfo/PDB/Raw/PublicsStream.cpp<br>
    llvm/trunk/lib/DebugInfo/PDB/Raw/RawSession.cpp<br>
    llvm/trunk/lib/DebugInfo/PDB/Raw/SymbolStream.cpp<br>
    llvm/trunk/lib/DebugInfo/PDB/Raw/TpiStream.cpp<br>
    llvm/trunk/tools/llvm-pdbdump/CMakeLists.txt<br>
    llvm/trunk/tools/llvm-pdbdump/LLVMBuild.txt<br>
    llvm/trunk/tools/llvm-pdbdump/LLVMOutputStyle.cpp<br>
    llvm/trunk/tools/llvm-pdbdump/PdbYaml.cpp<br>
    llvm/trunk/tools/llvm-pdbdump/PdbYaml.h<br>
    llvm/trunk/tools/llvm-pdbdump/YAMLOutputStyle.cpp<br>
    llvm/trunk/tools/llvm-pdbdump/llvm-pdbdump.cpp<br>
    llvm/trunk/tools/llvm-readobj/CMakeLists.txt<br>
    llvm/trunk/tools/llvm-readobj/COFFDumper.cpp<br>
    llvm/trunk/tools/llvm-readobj/LLVMBuild.txt<br>
    llvm/trunk/unittests/DebugInfo/PDB/CMakeLists.txt<br>
    llvm/trunk/unittests/DebugInfo/PDB/MappedBlockStreamTest.cpp<br>
<br>
Modified: llvm/trunk/include/llvm/DebugInfo/CodeView/CVRecord.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/CodeView/CVRecord.h?rev=277213&r1=277212&r2=277213&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/CodeView/CVRecord.h?rev=277213&r1=277212&r2=277213&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/include/llvm/DebugInfo/CodeView/CVRecord.h (original)<br>
+++ llvm/trunk/include/llvm/DebugInfo/CodeView/CVRecord.h Fri Jul 29 15:56:36 2016<br>
@@ -14,8 +14,8 @@<br>
 #include "llvm/ADT/iterator_range.h"<br>
 #include "llvm/DebugInfo/CodeView/CodeViewError.h"<br>
 #include "llvm/DebugInfo/CodeView/RecordSerialization.h"<br>
-#include "llvm/DebugInfo/Msf/StreamReader.h"<br>
-#include "llvm/DebugInfo/Msf/StreamRef.h"<br>
+#include "llvm/DebugInfo/MSF/StreamReader.h"<br>
+#include "llvm/DebugInfo/MSF/StreamRef.h"<br>
 #include "llvm/Support/Endian.h"<br>
<br>
 namespace llvm {<br>
<br>
Modified: llvm/trunk/include/llvm/DebugInfo/CodeView/ModuleSubstream.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/CodeView/ModuleSubstream.h?rev=277213&r1=277212&r2=277213&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/CodeView/ModuleSubstream.h?rev=277213&r1=277212&r2=277213&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/include/llvm/DebugInfo/CodeView/ModuleSubstream.h (original)<br>
+++ llvm/trunk/include/llvm/DebugInfo/CodeView/ModuleSubstream.h Fri Jul 29 15:56:36 2016<br>
@@ -11,8 +11,8 @@<br>
 #define LLVM_DEBUGINFO_CODEVIEW_MODULESUBSTREAM_H<br>
<br>
 #include "llvm/DebugInfo/CodeView/CodeView.h"<br>
-#include "llvm/DebugInfo/Msf/StreamArray.h"<br>
-#include "llvm/DebugInfo/Msf/StreamRef.h"<br>
+#include "llvm/DebugInfo/MSF/StreamArray.h"<br>
+#include "llvm/DebugInfo/MSF/StreamRef.h"<br>
 #include "llvm/Support/Endian.h"<br>
 #include "llvm/Support/Error.h"<br>
<br>
<br>
Modified: llvm/trunk/include/llvm/DebugInfo/CodeView/ModuleSubstreamVisitor.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/CodeView/ModuleSubstreamVisitor.h?rev=277213&r1=277212&r2=277213&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/CodeView/ModuleSubstreamVisitor.h?rev=277213&r1=277212&r2=277213&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/include/llvm/DebugInfo/CodeView/ModuleSubstreamVisitor.h (original)<br>
+++ llvm/trunk/include/llvm/DebugInfo/CodeView/ModuleSubstreamVisitor.h Fri Jul 29 15:56:36 2016<br>
@@ -14,8 +14,8 @@<br>
 #include "llvm/DebugInfo/CodeView/CodeViewError.h"<br>
 #include "llvm/DebugInfo/CodeView/Line.h"<br>
 #include "llvm/DebugInfo/CodeView/ModuleSubstream.h"<br>
-#include "llvm/DebugInfo/Msf/StreamReader.h"<br>
-#include "llvm/DebugInfo/Msf/StreamRef.h"<br>
+#include "llvm/DebugInfo/MSF/StreamReader.h"<br>
+#include "llvm/DebugInfo/MSF/StreamRef.h"<br>
<br>
 namespace llvm {<br>
 namespace codeview {<br>
<br>
Modified: llvm/trunk/include/llvm/DebugInfo/CodeView/SymbolRecord.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/CodeView/SymbolRecord.h?rev=277213&r1=277212&r2=277213&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/CodeView/SymbolRecord.h?rev=277213&r1=277212&r2=277213&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/include/llvm/DebugInfo/CodeView/SymbolRecord.h (original)<br>
+++ llvm/trunk/include/llvm/DebugInfo/CodeView/SymbolRecord.h Fri Jul 29 15:56:36 2016<br>
@@ -16,7 +16,7 @@<br>
 #include "llvm/DebugInfo/CodeView/CodeView.h"<br>
 #include "llvm/DebugInfo/CodeView/RecordSerialization.h"<br>
 #include "llvm/DebugInfo/CodeView/TypeIndex.h"<br>
-#include "llvm/DebugInfo/Msf/StreamArray.h"<br>
+#include "llvm/DebugInfo/MSF/StreamArray.h"<br>
 #include "llvm/Support/Endian.h"<br>
 #include "llvm/Support/Error.h"<br>
<br>
<br>
Copied: llvm/trunk/include/llvm/DebugInfo/MSF/ByteStream.h (from r277209, llvm/trunk/include/llvm/DebugInfo/Msf/ByteStream.h)<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/MSF/ByteStream.h?p2=llvm/trunk/include/llvm/DebugInfo/MSF/ByteStream.h&p1=llvm/trunk/include/llvm/DebugInfo/Msf/ByteStream.h&r1=277209&r2=277213&rev=277213&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/MSF/ByteStream.h?p2=llvm/trunk/include/llvm/DebugInfo/MSF/ByteStream.h&p1=llvm/trunk/include/llvm/DebugInfo/Msf/ByteStream.h&r1=277209&r2=277213&rev=277213&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/include/llvm/DebugInfo/Msf/ByteStream.h (original)<br>
+++ llvm/trunk/include/llvm/DebugInfo/MSF/ByteStream.h Fri Jul 29 15:56:36 2016<br>
@@ -12,8 +12,8 @@<br>
<br>
 #include "llvm/ADT/ArrayRef.h"<br>
 #include "llvm/ADT/StringRef.h"<br>
-#include "llvm/DebugInfo/Msf/MsfError.h"<br>
-#include "llvm/DebugInfo/Msf/StreamInterface.h"<br>
+#include "llvm/DebugInfo/MSF/MSFError.h"<br>
+#include "llvm/DebugInfo/MSF/StreamInterface.h"<br>
 #include "llvm/Support/Error.h"<br>
 #include "llvm/Support/FileOutputBuffer.h"<br>
 #include "llvm/Support/MemoryBuffer.h"<br>
@@ -32,16 +32,16 @@ public:<br>
   Error readBytes(uint32_t Offset, uint32_t Size,<br>
                   ArrayRef<uint8_t> &Buffer) const override {<br>
     if (Offset > Data.size())<br>
-      return make_error<MsfError>(msf_error_code::insufficient_buffer);<br>
+      return make_error<MSFError>(msf_error_code::insufficient_buffer);<br>
     if (Data.size() < Size + Offset)<br>
-      return make_error<MsfError>(msf_error_code::insufficient_buffer);<br>
+      return make_error<MSFError>(msf_error_code::insufficient_buffer);<br>
     Buffer = Data.slice(Offset, Size);<br>
     return Error::success();<br>
   }<br>
   Error readLongestContiguousChunk(uint32_t Offset,<br>
                                    ArrayRef<uint8_t> &Buffer) const override {<br>
     if (Offset >= Data.size())<br>
-      return make_error<MsfError>(msf_error_code::insufficient_buffer);<br>
+      return make_error<MSFError>(msf_error_code::insufficient_buffer);<br>
     Buffer = Data.slice(Offset);<br>
     return Error::success();<br>
   }<br>
@@ -90,9 +90,9 @@ public:<br>
<br>
   Error writeBytes(uint32_t Offset, ArrayRef<uint8_t> Buffer) const override {<br>
     if (Data.size() < Buffer.size())<br>
-      return make_error<MsfError>(msf_error_code::insufficient_buffer);<br>
+      return make_error<MSFError>(msf_error_code::insufficient_buffer);<br>
     if (Offset > Buffer.size() - Data.size())<br>
-      return make_error<MsfError>(msf_error_code::insufficient_buffer);<br>
+      return make_error<MSFError>(msf_error_code::insufficient_buffer);<br>
<br>
     uint8_t *DataPtr = const_cast<uint8_t *>(Data.data());<br>
     ::memcpy(DataPtr + Offset, Buffer.data(), Buffer.size());<br>
@@ -121,7 +121,7 @@ private:<br>
<br>
     Error commit() const override {<br>
       if (FileBuffer->commit())<br>
-        return llvm::make_error<MsfError>(msf_error_code::not_writable);<br>
+        return llvm::make_error<MSFError>(msf_error_code::not_writable);<br>
       return Error::success();<br>
     }<br>
<br>
<br>
Copied: llvm/trunk/include/llvm/DebugInfo/MSF/IMSFFile.h (from r277209, llvm/trunk/include/llvm/DebugInfo/Msf/IMsfFile.h)<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/MSF/IMSFFile.h?p2=llvm/trunk/include/llvm/DebugInfo/MSF/IMSFFile.h&p1=llvm/trunk/include/llvm/DebugInfo/Msf/IMsfFile.h&r1=277209&r2=277213&rev=277213&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/MSF/IMSFFile.h?p2=llvm/trunk/include/llvm/DebugInfo/MSF/IMSFFile.h&p1=llvm/trunk/include/llvm/DebugInfo/Msf/IMsfFile.h&r1=277209&r2=277213&rev=277213&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/include/llvm/DebugInfo/Msf/IMsfFile.h (original)<br>
+++ llvm/trunk/include/llvm/DebugInfo/MSF/IMSFFile.h Fri Jul 29 15:56:36 2016<br>
@@ -1,4 +1,4 @@<br>
-//===- IMsfFile.h - Abstract base class for an MSF file ---------*- C++ -*-===//<br>
+//===- IMSFFile.h - Abstract base class for an MSF file ---------*- C++ -*-===//<br>
 //<br>
 //                     The LLVM Compiler Infrastructure<br>
 //<br>
@@ -12,7 +12,7 @@<br>
<br>
 #include "llvm/ADT/ArrayRef.h"<br>
 #include "llvm/ADT/StringRef.h"<br>
-#include "llvm/DebugInfo/Msf/StreamArray.h"<br>
+#include "llvm/DebugInfo/MSF/StreamArray.h"<br>
 #include "llvm/Support/Endian.h"<br>
 #include "llvm/Support/Error.h"<br>
<br>
@@ -21,9 +21,9 @@<br>
 namespace llvm {<br>
 namespace msf {<br>
<br>
-class IMsfFile {<br>
+class IMSFFile {<br>
 public:<br>
-  virtual ~IMsfFile() {}<br>
+  virtual ~IMSFFile() {}<br>
<br>
   virtual uint32_t getBlockSize() const = 0;<br>
   virtual uint32_t getBlockCount() const = 0;<br>
<br>
Copied: llvm/trunk/include/llvm/DebugInfo/MSF/MSFBuilder.h (from r277209, llvm/trunk/include/llvm/DebugInfo/Msf/MsfBuilder.h)<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/MSF/MSFBuilder.h?p2=llvm/trunk/include/llvm/DebugInfo/MSF/MSFBuilder.h&p1=llvm/trunk/include/llvm/DebugInfo/Msf/MsfBuilder.h&r1=277209&r2=277213&rev=277213&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/MSF/MSFBuilder.h?p2=llvm/trunk/include/llvm/DebugInfo/MSF/MSFBuilder.h&p1=llvm/trunk/include/llvm/DebugInfo/Msf/MsfBuilder.h&r1=277209&r2=277213&rev=277213&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/include/llvm/DebugInfo/Msf/MsfBuilder.h (original)<br>
+++ llvm/trunk/include/llvm/DebugInfo/MSF/MSFBuilder.h Fri Jul 29 15:56:36 2016<br>
@@ -13,7 +13,7 @@<br>
 #include "llvm/ADT/ArrayRef.h"<br>
 #include "llvm/ADT/BitVector.h"<br>
<br>
-#include "llvm/DebugInfo/Msf/MsfCommon.h"<br>
+#include "llvm/DebugInfo/MSF/MSFCommon.h"<br>
<br>
 #include "llvm/Support/Allocator.h"<br>
 #include "llvm/Support/Endian.h"<br>
@@ -24,15 +24,15 @@<br>
<br>
 namespace llvm {<br>
 namespace msf {<br>
-class MsfBuilder {<br>
+class MSFBuilder {<br>
 public:<br>
-  /// \brief Create a new `MsfBuilder`.<br>
+  /// \brief Create a new `MSFBuilder`.<br>
   ///<br>
   /// \param BlockSize The internal block size used by the PDB file.  See<br>
   /// isValidBlockSize() for a list of valid block sizes.<br>
   ///<br>
   /// \param MinBlockCount Causes the builder to reserve up front space for<br>
-  /// at least `MinBlockCount` blocks.  This is useful when using `MsfBuilder`<br>
+  /// at least `MinBlockCount` blocks.  This is useful when using `MSFBuilder`<br>
   /// to read an existing MSF that you want to write back out later.  The<br>
   /// original MSF file's SuperBlock contains the exact number of blocks used<br>
   /// by the file, so is a good hint as to how many blocks the new MSF file<br>
@@ -54,7 +54,7 @@ public:<br>
   /// failed.  Currently the only way this can fail is if an invalid block size<br>
   /// is specified, or `MinBlockCount` does not leave enough room for the<br>
   /// mandatory reserved blocks required by an MSF file.<br>
-  static Expected<MsfBuilder> create(BumpPtrAllocator &Allocator,<br>
+  static Expected<MSFBuilder> create(BumpPtrAllocator &Allocator,<br>
                                      uint32_t BlockSize,<br>
                                      uint32_t MinBlockCount = 0,<br>
                                      bool CanGrow = true);<br>
@@ -81,7 +81,7 @@ public:<br>
<br>
   /// Update the size of an existing stream.  This will allocate or deallocate<br>
   /// blocks as needed to match the requested size.  This can fail if `CanGrow`<br>
-  /// was set to false when initializing the `MsfBuilder`.<br>
+  /// was set to false when initializing the `MSFBuilder`.<br>
   Error setStreamSize(uint32_t Idx, uint32_t Size);<br>
<br>
   /// Get the total number of streams in the MSF layout.  This should return 1<br>
@@ -111,10 +111,10 @@ public:<br>
<br>
   /// Finalize the layout and build the headers and structures that describe the<br>
   /// MSF layout and can be written directly to the MSF file.<br>
-  Expected<MsfLayout> build();<br>
+  Expected<MSFLayout> build();<br>
<br>
 private:<br>
-  MsfBuilder(uint32_t BlockSize, uint32_t MinBlockCount, bool CanGrow,<br>
+  MSFBuilder(uint32_t BlockSize, uint32_t MinBlockCount, bool CanGrow,<br>
              BumpPtrAllocator &Allocator);<br>
<br>
   Error allocateBlocks(uint32_t NumBlocks, MutableArrayRef<uint32_t> Blocks);<br>
<br>
Copied: llvm/trunk/include/llvm/DebugInfo/MSF/MSFCommon.h (from r277209, llvm/trunk/include/llvm/DebugInfo/Msf/MsfCommon.h)<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/MSF/MSFCommon.h?p2=llvm/trunk/include/llvm/DebugInfo/MSF/MSFCommon.h&p1=llvm/trunk/include/llvm/DebugInfo/Msf/MsfCommon.h&r1=277209&r2=277213&rev=277213&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/MSF/MSFCommon.h?p2=llvm/trunk/include/llvm/DebugInfo/MSF/MSFCommon.h&p1=llvm/trunk/include/llvm/DebugInfo/Msf/MsfCommon.h&r1=277209&r2=277213&rev=277213&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/include/llvm/DebugInfo/Msf/MsfCommon.h (original)<br>
+++ llvm/trunk/include/llvm/DebugInfo/MSF/MSFCommon.h Fri Jul 29 15:56:36 2016<br>
@@ -1,4 +1,4 @@<br>
-//===- MsfCommon.h - Common types and functions for MSF files ---*- C++ -*-===//<br>
+//===- MSFCommon.h - Common types and functions for MSF files ---*- C++ -*-===//<br>
 //<br>
 //                     The LLVM Compiler Infrastructure<br>
 //<br>
@@ -48,8 +48,8 @@ struct SuperBlock {<br>
   support::ulittle32_t BlockMapAddr;<br>
 };<br>
<br>
-struct MsfLayout {<br>
-  MsfLayout() : SB(nullptr) {}<br>
+struct MSFLayout {<br>
+  MSFLayout() : SB(nullptr) {}<br>
   const SuperBlock *SB;<br>
   ArrayRef<support::ulittle32_t> DirectoryBlocks;<br>
   ArrayRef<support::ulittle32_t> StreamSizes;<br>
<br>
Copied: llvm/trunk/include/llvm/DebugInfo/MSF/MSFError.h (from r277209, llvm/trunk/include/llvm/DebugInfo/Msf/MsfError.h)<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/MSF/MSFError.h?p2=llvm/trunk/include/llvm/DebugInfo/MSF/MSFError.h&p1=llvm/trunk/include/llvm/DebugInfo/Msf/MsfError.h&r1=277209&r2=277213&rev=277213&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/MSF/MSFError.h?p2=llvm/trunk/include/llvm/DebugInfo/MSF/MSFError.h&p1=llvm/trunk/include/llvm/DebugInfo/Msf/MsfError.h&r1=277209&r2=277213&rev=277213&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/include/llvm/DebugInfo/Msf/MsfError.h (original)<br>
+++ llvm/trunk/include/llvm/DebugInfo/MSF/MSFError.h Fri Jul 29 15:56:36 2016<br>
@@ -1,4 +1,4 @@<br>
-//===- MsfError.h - Error extensions for Msf Files --------------*- C++ -*-===//<br>
+//===- MSFError.h - Error extensions for MSF Files --------------*- C++ -*-===//<br>
 //<br>
 //                     The LLVM Compiler Infrastructure<br>
 //<br>
@@ -26,12 +26,12 @@ enum class msf_error_code {<br>
 };<br>
<br>
 /// Base class for errors originating when parsing raw PDB files<br>
-class MsfError : public ErrorInfo<MsfError> {<br>
+class MSFError : public ErrorInfo<MSFError> {<br>
 public:<br>
   static char ID;<br>
-  MsfError(msf_error_code C);<br>
-  MsfError(const std::string &Context);<br>
-  MsfError(msf_error_code C, const std::string &Context);<br>
+  MSFError(msf_error_code C);<br>
+  MSFError(const std::string &Context);<br>
+  MSFError(msf_error_code C, const std::string &Context);<br>
<br>
   void log(raw_ostream &OS) const override;<br>
   const std::string &getErrorMessage() const;<br>
<br>
Copied: llvm/trunk/include/llvm/DebugInfo/MSF/MSFStreamLayout.h (from r277209, llvm/trunk/include/llvm/DebugInfo/Msf/MsfStreamLayout.h)<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/MSF/MSFStreamLayout.h?p2=llvm/trunk/include/llvm/DebugInfo/MSF/MSFStreamLayout.h&p1=llvm/trunk/include/llvm/DebugInfo/Msf/MsfStreamLayout.h&r1=277209&r2=277213&rev=277213&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/MSF/MSFStreamLayout.h?p2=llvm/trunk/include/llvm/DebugInfo/MSF/MSFStreamLayout.h&p1=llvm/trunk/include/llvm/DebugInfo/Msf/MsfStreamLayout.h&r1=277209&r2=277213&rev=277213&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/include/llvm/DebugInfo/Msf/MsfStreamLayout.h (original)<br>
+++ llvm/trunk/include/llvm/DebugInfo/MSF/MSFStreamLayout.h Fri Jul 29 15:56:36 2016<br>
@@ -1,4 +1,4 @@<br>
-//===- MsfStreamLayout.h - Describes the layout of a stream -----*- C++ -*-===//<br>
+//===- MSFStreamLayout.h - Describes the layout of a stream -----*- C++ -*-===//<br>
 //<br>
 //                     The LLVM Compiler Infrastructure<br>
 //<br>
@@ -18,13 +18,13 @@<br>
 namespace llvm {<br>
 namespace msf {<br>
<br>
-/// \brief Describes the layout of a stream in an Msf layout.  A "stream" here<br>
-/// is defined as any logical unit of data which may be arranged inside the Msf<br>
+/// \brief Describes the layout of a stream in an MSF layout.  A "stream" here<br>
+/// is defined as any logical unit of data which may be arranged inside the MSF<br>
 /// file as a sequence of (possibly discontiguous) blocks.  When we want to read<br>
-/// from a particular Msf Stream, we fill out a stream layout structure and the<br>
-/// reader uses it to determine which blocks in the underlying Msf file contain<br>
+/// from a particular MSF Stream, we fill out a stream layout structure and the<br>
+/// reader uses it to determine which blocks in the underlying MSF file contain<br>
 /// the data, so that it can be pieced together in the right order.<br>
-class MsfStreamLayout {<br>
+class MSFStreamLayout {<br>
 public:<br>
   uint32_t Length;<br>
   ArrayRef<support::ulittle32_t> Blocks;<br>
<br>
Copied: llvm/trunk/include/llvm/DebugInfo/MSF/MappedBlockStream.h (from r277209, llvm/trunk/include/llvm/DebugInfo/Msf/MappedBlockStream.h)<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/MSF/MappedBlockStream.h?p2=llvm/trunk/include/llvm/DebugInfo/MSF/MappedBlockStream.h&p1=llvm/trunk/include/llvm/DebugInfo/Msf/MappedBlockStream.h&r1=277209&r2=277213&rev=277213&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/MSF/MappedBlockStream.h?p2=llvm/trunk/include/llvm/DebugInfo/MSF/MappedBlockStream.h&p1=llvm/trunk/include/llvm/DebugInfo/Msf/MappedBlockStream.h&r1=277209&r2=277213&rev=277213&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/include/llvm/DebugInfo/Msf/MappedBlockStream.h (original)<br>
+++ llvm/trunk/include/llvm/DebugInfo/MSF/MappedBlockStream.h Fri Jul 29 15:56:36 2016<br>
@@ -1,4 +1,4 @@<br>
-//===- MappedBlockStream.h - Discontiguous stream data in an Msf -*- C++<br>
+//===- MappedBlockStream.h - Discontiguous stream data in an MSF -*- C++<br>
 //-*-===//<br>
 //<br>
 //                     The LLVM Compiler Infrastructure<br>
@@ -14,8 +14,8 @@<br>
 #include "llvm/ADT/ArrayRef.h"<br>
 #include "llvm/ADT/DenseMap.h"<br>
 #include "llvm/ADT/STLExtras.h"<br>
-#include "llvm/DebugInfo/Msf/MsfStreamLayout.h"<br>
-#include "llvm/DebugInfo/Msf/StreamInterface.h"<br>
+#include "llvm/DebugInfo/MSF/MSFStreamLayout.h"<br>
+#include "llvm/DebugInfo/MSF/StreamInterface.h"<br>
 #include "llvm/Support/Allocator.h"<br>
 #include "llvm/Support/Endian.h"<br>
 #include "llvm/Support/Error.h"<br>
@@ -25,16 +25,16 @@<br>
 namespace llvm {<br>
 namespace msf {<br>
<br>
-struct MsfLayout;<br>
+struct MSFLayout;<br>
<br>
-/// MappedBlockStream represents data stored in an Msf file into chunks of a<br>
+/// MappedBlockStream represents data stored in an MSF file into chunks of a<br>
 /// particular size (called the Block Size), and whose chunks may not be<br>
-/// necessarily contiguous.  The arrangement of these chunks within the file<br>
-/// is described by some other metadata contained within the Msf file.  In<br>
-/// the case of a standard Msf Stream, the layout of the stream's blocks<br>
-/// is described by the Msf "directory", but in the case of the directory<br>
+/// necessarily contiguous.  The arrangement of these chunks MSF the file<br>
+/// is described by some other metadata contained within the MSF file.  In<br>
+/// the case of a standard MSF Stream, the layout of the stream's blocks<br>
+/// is described by the MSF "directory", but in the case of the directory<br>
 /// itself, the layout is described by an array at a fixed location within<br>
-/// the Msf.  MappedBlockStream provides methods for reading from and writing<br>
+/// the MSF.  MappedBlockStream provides methods for reading from and writing<br>
 /// to one of these streams transparently, as if it were a contiguous sequence<br>
 /// of bytes.<br>
 class MappedBlockStream : public ReadableStream {<br>
@@ -43,14 +43,14 @@ class MappedBlockStream : public Readabl<br>
 public:<br>
   static std::unique_ptr<MappedBlockStream><br>
   createStream(uint32_t BlockSize, uint32_t NumBlocks,<br>
-               const MsfStreamLayout &Layout, const ReadableStream &MsfData);<br>
+               const MSFStreamLayout &Layout, const ReadableStream &MsfData);<br>
<br>
   static std::unique_ptr<MappedBlockStream><br>
-  createIndexedStream(const MsfLayout &Layout, const ReadableStream &MsfData,<br>
+  createIndexedStream(const MSFLayout &Layout, const ReadableStream &MsfData,<br>
                       uint32_t StreamIndex);<br>
<br>
   static std::unique_ptr<MappedBlockStream><br>
-  createDirectoryStream(const MsfLayout &Layout, const ReadableStream &MsfData);<br>
+  createDirectoryStream(const MSFLayout &Layout, const ReadableStream &MsfData);<br>
<br>
   Error readBytes(uint32_t Offset, uint32_t Size,<br>
                   ArrayRef<uint8_t> &Buffer) const override;<br>
@@ -71,11 +71,11 @@ public:<br>
<br>
 protected:<br>
   MappedBlockStream(uint32_t BlockSize, uint32_t NumBlocks,<br>
-                    const MsfStreamLayout &StreamLayout,<br>
+                    const MSFStreamLayout &StreamLayout,<br>
                     const ReadableStream &MsfData);<br>
<br>
 private:<br>
-  const MsfStreamLayout &getStreamLayout() const { return StreamLayout; }<br>
+  const MSFStreamLayout &getStreamLayout() const { return StreamLayout; }<br>
   void fixCacheAfterWrite(uint32_t Offset, ArrayRef<uint8_t> Data) const;<br>
<br>
   Error readBytes(uint32_t Offset, MutableArrayRef<uint8_t> Buffer) const;<br>
@@ -84,7 +84,7 @@ private:<br>
<br>
   const uint32_t BlockSize;<br>
   const uint32_t NumBlocks;<br>
-  const MsfStreamLayout StreamLayout;<br>
+  const MSFStreamLayout StreamLayout;<br>
   const ReadableStream &MsfData;<br>
<br>
   typedef MutableArrayRef<uint8_t> CacheEntry;<br>
@@ -96,14 +96,14 @@ class WritableMappedBlockStream : public<br>
 public:<br>
   static std::unique_ptr<WritableMappedBlockStream><br>
   createStream(uint32_t BlockSize, uint32_t NumBlocks,<br>
-               const MsfStreamLayout &Layout, const WritableStream &MsfData);<br>
+               const MSFStreamLayout &Layout, const WritableStream &MsfData);<br>
<br>
   static std::unique_ptr<WritableMappedBlockStream><br>
-  createIndexedStream(const MsfLayout &Layout, const WritableStream &MsfData,<br>
+  createIndexedStream(const MSFLayout &Layout, const WritableStream &MsfData,<br>
                       uint32_t StreamIndex);<br>
<br>
   static std::unique_ptr<WritableMappedBlockStream><br>
-  createDirectoryStream(const MsfLayout &Layout, const WritableStream &MsfData);<br>
+  createDirectoryStream(const MSFLayout &Layout, const WritableStream &MsfData);<br>
<br>
   Error readBytes(uint32_t Offset, uint32_t Size,<br>
                   ArrayRef<uint8_t> &Buffer) const override;<br>
@@ -115,7 +115,7 @@ public:<br>
<br>
   Error commit() const override;<br>
<br>
-  const MsfStreamLayout &getStreamLayout() const {<br>
+  const MSFStreamLayout &getStreamLayout() const {<br>
     return ReadInterface.getStreamLayout();<br>
   }<br>
   uint32_t getBlockSize() const { return ReadInterface.getBlockSize(); }<br>
@@ -124,7 +124,7 @@ public:<br>
<br>
 protected:<br>
   WritableMappedBlockStream(uint32_t BlockSize, uint32_t NumBlocks,<br>
-                            const MsfStreamLayout &StreamLayout,<br>
+                            const MSFStreamLayout &StreamLayout,<br>
                             const WritableStream &MsfData);<br>
<br>
 private:<br>
<br>
Copied: llvm/trunk/include/llvm/DebugInfo/MSF/StreamArray.h (from r277209, llvm/trunk/include/llvm/DebugInfo/Msf/StreamArray.h)<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/MSF/StreamArray.h?p2=llvm/trunk/include/llvm/DebugInfo/MSF/StreamArray.h&p1=llvm/trunk/include/llvm/DebugInfo/Msf/StreamArray.h&r1=277209&r2=277213&rev=277213&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/MSF/StreamArray.h?p2=llvm/trunk/include/llvm/DebugInfo/MSF/StreamArray.h&p1=llvm/trunk/include/llvm/DebugInfo/Msf/StreamArray.h&r1=277209&r2=277213&rev=277213&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/include/llvm/DebugInfo/Msf/StreamArray.h (original)<br>
+++ llvm/trunk/include/llvm/DebugInfo/MSF/StreamArray.h Fri Jul 29 15:56:36 2016<br>
@@ -10,7 +10,7 @@<br>
 #ifndef LLVM_DEBUGINFO_MSF_STREAMARRAY_H<br>
 #define LLVM_DEBUGINFO_MSF_STREAMARRAY_H<br>
<br>
-#include "llvm/DebugInfo/Msf/StreamRef.h"<br>
+#include "llvm/DebugInfo/MSF/StreamRef.h"<br>
 #include "llvm/Support/Error.h"<br>
<br>
 #include <functional><br>
<br>
Copied: llvm/trunk/include/llvm/DebugInfo/MSF/StreamInterface.h (from r277209, llvm/trunk/include/llvm/DebugInfo/Msf/StreamInterface.h)<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/MSF/StreamInterface.h?p2=llvm/trunk/include/llvm/DebugInfo/MSF/StreamInterface.h&p1=llvm/trunk/include/llvm/DebugInfo/Msf/StreamInterface.h&r1=277209&r2=277213&rev=277213&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/MSF/StreamInterface.h?p2=llvm/trunk/include/llvm/DebugInfo/MSF/StreamInterface.h&p1=llvm/trunk/include/llvm/DebugInfo/Msf/StreamInterface.h&r1=277209&r2=277213&rev=277213&view=diff</a><br>
==============================================================================<br>
    (empty)<br>
<br>
Copied: llvm/trunk/include/llvm/DebugInfo/MSF/StreamReader.h (from r277209, llvm/trunk/include/llvm/DebugInfo/Msf/StreamReader.h)<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/MSF/StreamReader.h?p2=llvm/trunk/include/llvm/DebugInfo/MSF/StreamReader.h&p1=llvm/trunk/include/llvm/DebugInfo/Msf/StreamReader.h&r1=277209&r2=277213&rev=277213&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/MSF/StreamReader.h?p2=llvm/trunk/include/llvm/DebugInfo/MSF/StreamReader.h&p1=llvm/trunk/include/llvm/DebugInfo/Msf/StreamReader.h&r1=277209&r2=277213&rev=277213&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/include/llvm/DebugInfo/Msf/StreamReader.h (original)<br>
+++ llvm/trunk/include/llvm/DebugInfo/MSF/StreamReader.h Fri Jul 29 15:56:36 2016<br>
@@ -11,10 +11,10 @@<br>
 #define LLVM_DEBUGINFO_MSF_STREAMREADER_H<br>
<br>
 #include "llvm/ADT/ArrayRef.h"<br>
-#include "llvm/DebugInfo/Msf/MsfError.h"<br>
-#include "llvm/DebugInfo/Msf/StreamArray.h"<br>
-#include "llvm/DebugInfo/Msf/StreamInterface.h"<br>
-#include "llvm/DebugInfo/Msf/StreamRef.h"<br>
+#include "llvm/DebugInfo/MSF/MSFError.h"<br>
+#include "llvm/DebugInfo/MSF/StreamArray.h"<br>
+#include "llvm/DebugInfo/MSF/StreamInterface.h"<br>
+#include "llvm/DebugInfo/MSF/StreamRef.h"<br>
 #include "llvm/Support/Endian.h"<br>
 #include "llvm/Support/Error.h"<br>
<br>
@@ -61,7 +61,7 @@ public:<br>
     }<br>
<br>
     if (NumElements > UINT32_MAX / sizeof(T))<br>
-      return make_error<MsfError>(msf_error_code::insufficient_buffer);<br>
+      return make_error<MSFError>(msf_error_code::insufficient_buffer);<br>
<br>
     if (auto EC = readBytes(Bytes, NumElements * sizeof(T)))<br>
       return EC;<br>
@@ -86,9 +86,9 @@ public:<br>
     }<br>
     uint32_t Length = NumItems * sizeof(T);<br>
     if (Length / sizeof(T) != NumItems)<br>
-      return make_error<MsfError>(msf_error_code::invalid_format);<br>
+      return make_error<MSFError>(msf_error_code::invalid_format);<br>
     if (Offset + Length > Stream.getLength())<br>
-      return make_error<MsfError>(msf_error_code::insufficient_buffer);<br>
+      return make_error<MSFError>(msf_error_code::insufficient_buffer);<br>
     ReadableStreamRef View = Stream.slice(Offset, Length);<br>
     Array = FixedStreamArray<T>(View);<br>
     Offset += Length;<br>
<br>
Copied: llvm/trunk/include/llvm/DebugInfo/MSF/StreamRef.h (from r277209, llvm/trunk/include/llvm/DebugInfo/Msf/StreamRef.h)<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/MSF/StreamRef.h?p2=llvm/trunk/include/llvm/DebugInfo/MSF/StreamRef.h&p1=llvm/trunk/include/llvm/DebugInfo/Msf/StreamRef.h&r1=277209&r2=277213&rev=277213&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/MSF/StreamRef.h?p2=llvm/trunk/include/llvm/DebugInfo/MSF/StreamRef.h&p1=llvm/trunk/include/llvm/DebugInfo/Msf/StreamRef.h&r1=277209&r2=277213&rev=277213&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/include/llvm/DebugInfo/Msf/StreamRef.h (original)<br>
+++ llvm/trunk/include/llvm/DebugInfo/MSF/StreamRef.h Fri Jul 29 15:56:36 2016<br>
@@ -10,8 +10,8 @@<br>
 #ifndef LLVM_DEBUGINFO_MSF_STREAMREF_H<br>
 #define LLVM_DEBUGINFO_MSF_STREAMREF_H<br>
<br>
-#include "llvm/DebugInfo/Msf/MsfError.h"<br>
-#include "llvm/DebugInfo/Msf/StreamInterface.h"<br>
+#include "llvm/DebugInfo/MSF/MSFError.h"<br>
+#include "llvm/DebugInfo/MSF/StreamInterface.h"<br>
<br>
 namespace llvm {<br>
 namespace msf {<br>
@@ -76,9 +76,9 @@ public:<br>
   Error readBytes(uint32_t Offset, uint32_t Size,<br>
                   ArrayRef<uint8_t> &Buffer) const {<br>
     if (ViewOffset + Offset < Offset)<br>
-      return make_error<MsfError>(msf_error_code::insufficient_buffer);<br>
+      return make_error<MSFError>(msf_error_code::insufficient_buffer);<br>
     if (Size + Offset > Length)<br>
-      return make_error<MsfError>(msf_error_code::insufficient_buffer);<br>
+      return make_error<MSFError>(msf_error_code::insufficient_buffer);<br>
     return Stream->readBytes(ViewOffset + Offset, Size, Buffer);<br>
   }<br>
<br>
@@ -87,7 +87,7 @@ public:<br>
   Error readLongestContiguousChunk(uint32_t Offset,<br>
                                    ArrayRef<uint8_t> &Buffer) const {<br>
     if (Offset >= Length)<br>
-      return make_error<MsfError>(msf_error_code::insufficient_buffer);<br>
+      return make_error<MSFError>(msf_error_code::insufficient_buffer);<br>
<br>
     if (auto EC = Stream->readLongestContiguousChunk(Offset, Buffer))<br>
       return EC;<br>
@@ -117,7 +117,7 @@ public:<br>
<br>
   Error writeBytes(uint32_t Offset, ArrayRef<uint8_t> Data) const {<br>
     if (Data.size() + Offset > Length)<br>
-      return make_error<MsfError>(msf_error_code::insufficient_buffer);<br>
+      return make_error<MSFError>(msf_error_code::insufficient_buffer);<br>
     return Stream->writeBytes(ViewOffset + Offset, Data);<br>
   }<br>
<br>
<br>
Copied: llvm/trunk/include/llvm/DebugInfo/MSF/StreamWriter.h (from r277209, llvm/trunk/include/llvm/DebugInfo/Msf/StreamWriter.h)<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/MSF/StreamWriter.h?p2=llvm/trunk/include/llvm/DebugInfo/MSF/StreamWriter.h&p1=llvm/trunk/include/llvm/DebugInfo/Msf/StreamWriter.h&r1=277209&r2=277213&rev=277213&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/MSF/StreamWriter.h?p2=llvm/trunk/include/llvm/DebugInfo/MSF/StreamWriter.h&p1=llvm/trunk/include/llvm/DebugInfo/Msf/StreamWriter.h&r1=277209&r2=277213&rev=277213&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/include/llvm/DebugInfo/Msf/StreamWriter.h (original)<br>
+++ llvm/trunk/include/llvm/DebugInfo/MSF/StreamWriter.h Fri Jul 29 15:56:36 2016<br>
@@ -11,10 +11,10 @@<br>
 #define LLVM_DEBUGINFO_MSF_STREAMWRITER_H<br>
<br>
 #include "llvm/ADT/ArrayRef.h"<br>
-#include "llvm/DebugInfo/Msf/MsfError.h"<br>
-#include "llvm/DebugInfo/Msf/StreamArray.h"<br>
-#include "llvm/DebugInfo/Msf/StreamInterface.h"<br>
-#include "llvm/DebugInfo/Msf/StreamRef.h"<br>
+#include "llvm/DebugInfo/MSF/MSFError.h"<br>
+#include "llvm/DebugInfo/MSF/StreamArray.h"<br>
+#include "llvm/DebugInfo/MSF/StreamInterface.h"<br>
+#include "llvm/DebugInfo/MSF/StreamRef.h"<br>
 #include "llvm/Support/Endian.h"<br>
 #include "llvm/Support/Error.h"<br>
<br>
@@ -54,7 +54,7 @@ public:<br>
       return Error::success();<br>
<br>
     if (Array.size() > UINT32_MAX / sizeof(T))<br>
-      return make_error<MsfError>(msf_error_code::insufficient_buffer);<br>
+      return make_error<MSFError>(msf_error_code::insufficient_buffer);<br>
<br>
     return writeBytes(<br>
         ArrayRef<uint8_t>(reinterpret_cast<const uint8_t *>(Array.data()),<br>
<br>
Removed: llvm/trunk/include/llvm/DebugInfo/Msf/ByteStream.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/Msf/ByteStream.h?rev=277212&view=auto" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/Msf/ByteStream.h?rev=277212&view=auto</a><br>
==============================================================================<br>
--- llvm/trunk/include/llvm/DebugInfo/Msf/ByteStream.h (original)<br>
+++ llvm/trunk/include/llvm/DebugInfo/Msf/ByteStream.h (removed)<br>
@@ -1,160 +0,0 @@<br>
-//===- ByteStream.h - Reads stream data from a byte sequence ----*- C++ -*-===//<br>
-//<br>
-//                     The LLVM Compiler Infrastructure<br>
-//<br>
-// This file is distributed under the University of Illinois Open Source<br>
-// License. See LICENSE.TXT for details.<br>
-//<br>
-//===----------------------------------------------------------------------===//<br>
-<br>
-#ifndef LLVM_DEBUGINFO_MSF_BYTESTREAM_H<br>
-#define LLVM_DEBUGINFO_MSF_BYTESTREAM_H<br>
-<br>
-#include "llvm/ADT/ArrayRef.h"<br>
-#include "llvm/ADT/StringRef.h"<br>
-#include "llvm/DebugInfo/Msf/MsfError.h"<br>
-#include "llvm/DebugInfo/Msf/StreamInterface.h"<br>
-#include "llvm/Support/Error.h"<br>
-#include "llvm/Support/FileOutputBuffer.h"<br>
-#include "llvm/Support/MemoryBuffer.h"<br>
-#include <cstdint><br>
-#include <memory><br>
-#include <type_traits><br>
-<br>
-namespace llvm {<br>
-namespace msf {<br>
-<br>
-class ByteStream : public ReadableStream {<br>
-public:<br>
-  ByteStream() {}<br>
-  explicit ByteStream(ArrayRef<uint8_t> Data) : Data(Data) {}<br>
-<br>
-  Error readBytes(uint32_t Offset, uint32_t Size,<br>
-                  ArrayRef<uint8_t> &Buffer) const override {<br>
-    if (Offset > Data.size())<br>
-      return make_error<MsfError>(msf_error_code::insufficient_buffer);<br>
-    if (Data.size() < Size + Offset)<br>
-      return make_error<MsfError>(msf_error_code::insufficient_buffer);<br>
-    Buffer = Data.slice(Offset, Size);<br>
-    return Error::success();<br>
-  }<br>
-  Error readLongestContiguousChunk(uint32_t Offset,<br>
-                                   ArrayRef<uint8_t> &Buffer) const override {<br>
-    if (Offset >= Data.size())<br>
-      return make_error<MsfError>(msf_error_code::insufficient_buffer);<br>
-    Buffer = Data.slice(Offset);<br>
-    return Error::success();<br>
-  }<br>
-<br>
-  uint32_t getLength() const override { return Data.size(); }<br>
-<br>
-  ArrayRef<uint8_t> data() const { return Data; }<br>
-<br>
-  StringRef str() const {<br>
-    const char *CharData = reinterpret_cast<const char *>(Data.data());<br>
-    return StringRef(CharData, Data.size());<br>
-  }<br>
-<br>
-protected:<br>
-  ArrayRef<uint8_t> Data;<br>
-};<br>
-<br>
-// MemoryBufferByteStream behaves like a read-only ByteStream, but has its data<br>
-// backed by an llvm::MemoryBuffer.  It also owns the underlying MemoryBuffer.<br>
-class MemoryBufferByteStream : public ByteStream {<br>
-public:<br>
-  explicit MemoryBufferByteStream(std::unique_ptr<MemoryBuffer> Buffer)<br>
-      : ByteStream(ArrayRef<uint8_t>(Buffer->getBuffer().bytes_begin(),<br>
-                                     Buffer->getBuffer().bytes_end())),<br>
-        MemBuffer(std::move(Buffer)) {}<br>
-<br>
-  std::unique_ptr<MemoryBuffer> MemBuffer;<br>
-};<br>
-<br>
-class MutableByteStream : public WritableStream {<br>
-public:<br>
-  MutableByteStream() {}<br>
-  explicit MutableByteStream(MutableArrayRef<uint8_t> Data)<br>
-      : Data(Data), ImmutableStream(Data) {}<br>
-<br>
-  Error readBytes(uint32_t Offset, uint32_t Size,<br>
-                  ArrayRef<uint8_t> &Buffer) const override {<br>
-    return ImmutableStream.readBytes(Offset, Size, Buffer);<br>
-  }<br>
-  Error readLongestContiguousChunk(uint32_t Offset,<br>
-                                   ArrayRef<uint8_t> &Buffer) const override {<br>
-    return ImmutableStream.readLongestContiguousChunk(Offset, Buffer);<br>
-  }<br>
-<br>
-  uint32_t getLength() const override { return ImmutableStream.getLength(); }<br>
-<br>
-  Error writeBytes(uint32_t Offset, ArrayRef<uint8_t> Buffer) const override {<br>
-    if (Data.size() < Buffer.size())<br>
-      return make_error<MsfError>(msf_error_code::insufficient_buffer);<br>
-    if (Offset > Buffer.size() - Data.size())<br>
-      return make_error<MsfError>(msf_error_code::insufficient_buffer);<br>
-<br>
-    uint8_t *DataPtr = const_cast<uint8_t *>(Data.data());<br>
-    ::memcpy(DataPtr + Offset, Buffer.data(), Buffer.size());<br>
-    return Error::success();<br>
-  }<br>
-<br>
-  Error commit() const override { return Error::success(); }<br>
-<br>
-  MutableArrayRef<uint8_t> data() const { return Data; }<br>
-<br>
-private:<br>
-  MutableArrayRef<uint8_t> Data;<br>
-  ByteStream ImmutableStream;<br>
-};<br>
-<br>
-// A simple adapter that acts like a ByteStream but holds ownership over<br>
-// and underlying FileOutputBuffer.<br>
-class FileBufferByteStream : public WritableStream {<br>
-private:<br>
-  class StreamImpl : public MutableByteStream {<br>
-  public:<br>
-    StreamImpl(std::unique_ptr<FileOutputBuffer> Buffer)<br>
-        : MutableByteStream(MutableArrayRef<uint8_t>(Buffer->getBufferStart(),<br>
-                                                     Buffer->getBufferEnd())),<br>
-          FileBuffer(std::move(Buffer)) {}<br>
-<br>
-    Error commit() const override {<br>
-      if (FileBuffer->commit())<br>
-        return llvm::make_error<MsfError>(msf_error_code::not_writable);<br>
-      return Error::success();<br>
-    }<br>
-<br>
-  private:<br>
-    std::unique_ptr<FileOutputBuffer> FileBuffer;<br>
-  };<br>
-<br>
-public:<br>
-  explicit FileBufferByteStream(std::unique_ptr<FileOutputBuffer> Buffer)<br>
-      : Impl(std::move(Buffer)) {}<br>
-<br>
-  Error readBytes(uint32_t Offset, uint32_t Size,<br>
-                  ArrayRef<uint8_t> &Buffer) const override {<br>
-    return Impl.readBytes(Offset, Size, Buffer);<br>
-  }<br>
-  Error readLongestContiguousChunk(uint32_t Offset,<br>
-                                   ArrayRef<uint8_t> &Buffer) const override {<br>
-    return Impl.readLongestContiguousChunk(Offset, Buffer);<br>
-  }<br>
-<br>
-  uint32_t getLength() const override { return Impl.getLength(); }<br>
-<br>
-  Error writeBytes(uint32_t Offset, ArrayRef<uint8_t> Data) const override {<br>
-    return Impl.writeBytes(Offset, Data);<br>
-  }<br>
-  Error commit() const override { return Impl.commit(); }<br>
-<br>
-private:<br>
-  StreamImpl Impl;<br>
-};<br>
-<br>
-<br>
-} // end namespace msf<br>
-} // end namespace llvm<br>
-<br>
-#endif // LLVM_DEBUGINFO_MSF_BYTESTREAM_H<br>
<br>
Removed: llvm/trunk/include/llvm/DebugInfo/Msf/IMsfFile.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/Msf/IMsfFile.h?rev=277212&view=auto" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/Msf/IMsfFile.h?rev=277212&view=auto</a><br>
==============================================================================<br>
--- llvm/trunk/include/llvm/DebugInfo/Msf/IMsfFile.h (original)<br>
+++ llvm/trunk/include/llvm/DebugInfo/Msf/IMsfFile.h (removed)<br>
@@ -1,44 +0,0 @@<br>
-//===- IMsfFile.h - Abstract base class for an MSF file ---------*- C++ -*-===//<br>
-//<br>
-//                     The LLVM Compiler Infrastructure<br>
-//<br>
-// This file is distributed under the University of Illinois Open Source<br>
-// License. See LICENSE.TXT for details.<br>
-//<br>
-//===----------------------------------------------------------------------===//<br>
-<br>
-#ifndef LLVM_DEBUGINFO_MSF_IMSFFILE_H<br>
-#define LLVM_DEBUGINFO_MSF_IMSFFILE_H<br>
-<br>
-#include "llvm/ADT/ArrayRef.h"<br>
-#include "llvm/ADT/StringRef.h"<br>
-#include "llvm/DebugInfo/Msf/StreamArray.h"<br>
-#include "llvm/Support/Endian.h"<br>
-#include "llvm/Support/Error.h"<br>
-<br>
-#include <stdint.h><br>
-<br>
-namespace llvm {<br>
-namespace msf {<br>
-<br>
-class IMsfFile {<br>
-public:<br>
-  virtual ~IMsfFile() {}<br>
-<br>
-  virtual uint32_t getBlockSize() const = 0;<br>
-  virtual uint32_t getBlockCount() const = 0;<br>
-<br>
-  virtual uint32_t getNumStreams() const = 0;<br>
-  virtual uint32_t getStreamByteSize(uint32_t StreamIndex) const = 0;<br>
-  virtual ArrayRef<support::ulittle32_t><br>
-  getStreamBlockList(uint32_t StreamIndex) const = 0;<br>
-<br>
-  virtual Expected<ArrayRef<uint8_t>> getBlockData(uint32_t BlockIndex,<br>
-                                                   uint32_t NumBytes) const = 0;<br>
-  virtual Error setBlockData(uint32_t BlockIndex, uint32_t Offset,<br>
-                             ArrayRef<uint8_t> Data) const = 0;<br>
-};<br>
-}<br>
-}<br>
-<br>
-#endif // LLVM_DEBUGINFO_MSF_IMSFFILE_H<br>
<br>
Removed: llvm/trunk/include/llvm/DebugInfo/Msf/MappedBlockStream.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/Msf/MappedBlockStream.h?rev=277212&view=auto" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/Msf/MappedBlockStream.h?rev=277212&view=auto</a><br>
==============================================================================<br>
--- llvm/trunk/include/llvm/DebugInfo/Msf/MappedBlockStream.h (original)<br>
+++ llvm/trunk/include/llvm/DebugInfo/Msf/MappedBlockStream.h (removed)<br>
@@ -1,139 +0,0 @@<br>
-//===- MappedBlockStream.h - Discontiguous stream data in an Msf -*- C++<br>
-//-*-===//<br>
-//<br>
-//                     The LLVM Compiler Infrastructure<br>
-//<br>
-// This file is distributed under the University of Illinois Open Source<br>
-// License. See LICENSE.TXT for details.<br>
-//<br>
-//===----------------------------------------------------------------------===//<br>
-<br>
-#ifndef LLVM_DEBUGINFO_MSF_MAPPEDBLOCKSTREAM_H<br>
-#define LLVM_DEBUGINFO_MSF_MAPPEDBLOCKSTREAM_H<br>
-<br>
-#include "llvm/ADT/ArrayRef.h"<br>
-#include "llvm/ADT/DenseMap.h"<br>
-#include "llvm/ADT/STLExtras.h"<br>
-#include "llvm/DebugInfo/Msf/MsfStreamLayout.h"<br>
-#include "llvm/DebugInfo/Msf/StreamInterface.h"<br>
-#include "llvm/Support/Allocator.h"<br>
-#include "llvm/Support/Endian.h"<br>
-#include "llvm/Support/Error.h"<br>
-#include <cstdint><br>
-#include <vector><br>
-<br>
-namespace llvm {<br>
-namespace msf {<br>
-<br>
-struct MsfLayout;<br>
-<br>
-/// MappedBlockStream represents data stored in an Msf file into chunks of a<br>
-/// particular size (called the Block Size), and whose chunks may not be<br>
-/// necessarily contiguous.  The arrangement of these chunks within the file<br>
-/// is described by some other metadata contained within the Msf file.  In<br>
-/// the case of a standard Msf Stream, the layout of the stream's blocks<br>
-/// is described by the Msf "directory", but in the case of the directory<br>
-/// itself, the layout is described by an array at a fixed location within<br>
-/// the Msf.  MappedBlockStream provides methods for reading from and writing<br>
-/// to one of these streams transparently, as if it were a contiguous sequence<br>
-/// of bytes.<br>
-class MappedBlockStream : public ReadableStream {<br>
-  friend class WritableMappedBlockStream;<br>
-<br>
-public:<br>
-  static std::unique_ptr<MappedBlockStream><br>
-  createStream(uint32_t BlockSize, uint32_t NumBlocks,<br>
-               const MsfStreamLayout &Layout, const ReadableStream &MsfData);<br>
-<br>
-  static std::unique_ptr<MappedBlockStream><br>
-  createIndexedStream(const MsfLayout &Layout, const ReadableStream &MsfData,<br>
-                      uint32_t StreamIndex);<br>
-<br>
-  static std::unique_ptr<MappedBlockStream><br>
-  createDirectoryStream(const MsfLayout &Layout, const ReadableStream &MsfData);<br>
-<br>
-  Error readBytes(uint32_t Offset, uint32_t Size,<br>
-                  ArrayRef<uint8_t> &Buffer) const override;<br>
-  Error readLongestContiguousChunk(uint32_t Offset,<br>
-                                   ArrayRef<uint8_t> &Buffer) const override;<br>
-<br>
-  uint32_t getLength() const override;<br>
-<br>
-  uint32_t getNumBytesCopied() const;<br>
-<br>
-  llvm::BumpPtrAllocator &getAllocator() { return Pool; }<br>
-<br>
-  void invalidateCache();<br>
-<br>
-  uint32_t getBlockSize() const { return BlockSize; }<br>
-  uint32_t getNumBlocks() const { return NumBlocks; }<br>
-  uint32_t getStreamLength() const { return StreamLayout.Length; }<br>
-<br>
-protected:<br>
-  MappedBlockStream(uint32_t BlockSize, uint32_t NumBlocks,<br>
-                    const MsfStreamLayout &StreamLayout,<br>
-                    const ReadableStream &MsfData);<br>
-<br>
-private:<br>
-  const MsfStreamLayout &getStreamLayout() const { return StreamLayout; }<br>
-  void fixCacheAfterWrite(uint32_t Offset, ArrayRef<uint8_t> Data) const;<br>
-<br>
-  Error readBytes(uint32_t Offset, MutableArrayRef<uint8_t> Buffer) const;<br>
-  bool tryReadContiguously(uint32_t Offset, uint32_t Size,<br>
-                           ArrayRef<uint8_t> &Buffer) const;<br>
-<br>
-  const uint32_t BlockSize;<br>
-  const uint32_t NumBlocks;<br>
-  const MsfStreamLayout StreamLayout;<br>
-  const ReadableStream &MsfData;<br>
-<br>
-  typedef MutableArrayRef<uint8_t> CacheEntry;<br>
-  mutable llvm::BumpPtrAllocator Pool;<br>
-  mutable DenseMap<uint32_t, std::vector<CacheEntry>> CacheMap;<br>
-};<br>
-<br>
-class WritableMappedBlockStream : public WritableStream {<br>
-public:<br>
-  static std::unique_ptr<WritableMappedBlockStream><br>
-  createStream(uint32_t BlockSize, uint32_t NumBlocks,<br>
-               const MsfStreamLayout &Layout, const WritableStream &MsfData);<br>
-<br>
-  static std::unique_ptr<WritableMappedBlockStream><br>
-  createIndexedStream(const MsfLayout &Layout, const WritableStream &MsfData,<br>
-                      uint32_t StreamIndex);<br>
-<br>
-  static std::unique_ptr<WritableMappedBlockStream><br>
-  createDirectoryStream(const MsfLayout &Layout, const WritableStream &MsfData);<br>
-<br>
-  Error readBytes(uint32_t Offset, uint32_t Size,<br>
-                  ArrayRef<uint8_t> &Buffer) const override;<br>
-  Error readLongestContiguousChunk(uint32_t Offset,<br>
-                                   ArrayRef<uint8_t> &Buffer) const override;<br>
-  uint32_t getLength() const override;<br>
-<br>
-  Error writeBytes(uint32_t Offset, ArrayRef<uint8_t> Buffer) const override;<br>
-<br>
-  Error commit() const override;<br>
-<br>
-  const MsfStreamLayout &getStreamLayout() const {<br>
-    return ReadInterface.getStreamLayout();<br>
-  }<br>
-  uint32_t getBlockSize() const { return ReadInterface.getBlockSize(); }<br>
-  uint32_t getNumBlocks() const { return ReadInterface.getNumBlocks(); }<br>
-  uint32_t getStreamLength() const { return ReadInterface.getStreamLength(); }<br>
-<br>
-protected:<br>
-  WritableMappedBlockStream(uint32_t BlockSize, uint32_t NumBlocks,<br>
-                            const MsfStreamLayout &StreamLayout,<br>
-                            const WritableStream &MsfData);<br>
-<br>
-private:<br>
-  MappedBlockStream ReadInterface;<br>
-<br>
-  const WritableStream &WriteInterface;<br>
-};<br>
-<br>
-} // end namespace pdb<br>
-} // end namespace llvm<br>
-<br>
-#endif // LLVM_DEBUGINFO_MSF_MAPPEDBLOCKSTREAM_H<br>
<br>
Removed: llvm/trunk/include/llvm/DebugInfo/Msf/MsfBuilder.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/Msf/MsfBuilder.h?rev=277212&view=auto" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/Msf/MsfBuilder.h?rev=277212&view=auto</a><br>
==============================================================================<br>
--- llvm/trunk/include/llvm/DebugInfo/Msf/MsfBuilder.h (original)<br>
+++ llvm/trunk/include/llvm/DebugInfo/Msf/MsfBuilder.h (removed)<br>
@@ -1,140 +0,0 @@<br>
-//===- MSFBuilder.h - MSF Directory & Metadata Builder ----------*- C++ -*-===//<br>
-//<br>
-//                     The LLVM Compiler Infrastructure<br>
-//<br>
-// This file is distributed under the University of Illinois Open Source<br>
-// License. See LICENSE.TXT for details.<br>
-//<br>
-//===----------------------------------------------------------------------===//<br>
-<br>
-#ifndef LLVM_DEBUGINFO_MSF_MSFBUILDER_H<br>
-#define LLVM_DEBUGINFO_MSF_MSFBUILDER_H<br>
-<br>
-#include "llvm/ADT/ArrayRef.h"<br>
-#include "llvm/ADT/BitVector.h"<br>
-<br>
-#include "llvm/DebugInfo/Msf/MsfCommon.h"<br>
-<br>
-#include "llvm/Support/Allocator.h"<br>
-#include "llvm/Support/Endian.h"<br>
-#include "llvm/Support/Error.h"<br>
-<br>
-#include <utility><br>
-#include <vector><br>
-<br>
-namespace llvm {<br>
-namespace msf {<br>
-class MsfBuilder {<br>
-public:<br>
-  /// \brief Create a new `MsfBuilder`.<br>
-  ///<br>
-  /// \param BlockSize The internal block size used by the PDB file.  See<br>
-  /// isValidBlockSize() for a list of valid block sizes.<br>
-  ///<br>
-  /// \param MinBlockCount Causes the builder to reserve up front space for<br>
-  /// at least `MinBlockCount` blocks.  This is useful when using `MsfBuilder`<br>
-  /// to read an existing MSF that you want to write back out later.  The<br>
-  /// original MSF file's SuperBlock contains the exact number of blocks used<br>
-  /// by the file, so is a good hint as to how many blocks the new MSF file<br>
-  /// will contain.  Furthermore, it is actually necessary in this case.  To<br>
-  /// preserve stability of the file's layout, it is helpful to try to keep<br>
-  /// all streams mapped to their original block numbers.  To ensure that this<br>
-  /// is possible, space for all blocks must be allocated beforehand so that<br>
-  /// streams can be assigned to them.<br>
-  ///<br>
-  /// \param CanGrow If true, any operation which results in an attempt to<br>
-  /// locate a free block when all available blocks have been exhausted will<br>
-  /// allocate a new block, thereby growing the size of the final MSF file.<br>
-  /// When false, any such attempt will result in an error.  This is especially<br>
-  /// useful in testing scenarios when you know your test isn't going to do<br>
-  /// anything to increase the size of the file, so having an Error returned if<br>
-  /// it were to happen would catch a programming error<br>
-  ///<br>
-  /// \returns an llvm::Error representing whether the operation succeeded or<br>
-  /// failed.  Currently the only way this can fail is if an invalid block size<br>
-  /// is specified, or `MinBlockCount` does not leave enough room for the<br>
-  /// mandatory reserved blocks required by an MSF file.<br>
-  static Expected<MsfBuilder> create(BumpPtrAllocator &Allocator,<br>
-                                     uint32_t BlockSize,<br>
-                                     uint32_t MinBlockCount = 0,<br>
-                                     bool CanGrow = true);<br>
-<br>
-  /// Request the block map to be at a specific block address.  This is useful<br>
-  /// when editing a MSF and you want the layout to be as stable as possible.<br>
-  Error setBlockMapAddr(uint32_t Addr);<br>
-  Error setDirectoryBlocksHint(ArrayRef<uint32_t> DirBlocks);<br>
-  void setFreePageMap(uint32_t Fpm);<br>
-  void setUnknown1(uint32_t Unk1);<br>
-<br>
-  /// Add a stream to the MSF file with the given size, occupying the given<br>
-  /// list of blocks.  This is useful when reading a MSF file and you want a<br>
-  /// particular stream to occupy the original set of blocks.  If the given<br>
-  /// blocks are already allocated, or if the number of blocks specified is<br>
-  /// incorrect for the given stream size, this function will return an Error.<br>
-  Error addStream(uint32_t Size, ArrayRef<uint32_t> Blocks);<br>
-<br>
-  /// Add a stream to the MSF file with the given size, occupying any available<br>
-  /// blocks that the builder decides to use.  This is useful when building a<br>
-  /// new PDB file from scratch and you don't care what blocks a stream occupies<br>
-  /// but you just want it to work.<br>
-  Error addStream(uint32_t Size);<br>
-<br>
-  /// Update the size of an existing stream.  This will allocate or deallocate<br>
-  /// blocks as needed to match the requested size.  This can fail if `CanGrow`<br>
-  /// was set to false when initializing the `MsfBuilder`.<br>
-  Error setStreamSize(uint32_t Idx, uint32_t Size);<br>
-<br>
-  /// Get the total number of streams in the MSF layout.  This should return 1<br>
-  /// for every call to `addStream`.<br>
-  uint32_t getNumStreams() const;<br>
-<br>
-  /// Get the size of a stream by index.<br>
-  uint32_t getStreamSize(uint32_t StreamIdx) const;<br>
-<br>
-  /// Get the list of blocks allocated to a particular stream.<br>
-  ArrayRef<uint32_t> getStreamBlocks(uint32_t StreamIdx) const;<br>
-<br>
-  /// Get the total number of blocks that will be allocated to actual data in<br>
-  /// this MSF file.<br>
-  uint32_t getNumUsedBlocks() const;<br>
-<br>
-  /// Get the total number of blocks that exist in the MSF file but are not<br>
-  /// allocated to any valid data.<br>
-  uint32_t getNumFreeBlocks() const;<br>
-<br>
-  /// Get the total number of blocks in the MSF file.  In practice this is equal<br>
-  /// to `getNumUsedBlocks() + getNumFreeBlocks()`.<br>
-  uint32_t getTotalBlockCount() const;<br>
-<br>
-  /// Check whether a particular block is allocated or free.<br>
-  bool isBlockFree(uint32_t Idx) const;<br>
-<br>
-  /// Finalize the layout and build the headers and structures that describe the<br>
-  /// MSF layout and can be written directly to the MSF file.<br>
-  Expected<MsfLayout> build();<br>
-<br>
-private:<br>
-  MsfBuilder(uint32_t BlockSize, uint32_t MinBlockCount, bool CanGrow,<br>
-             BumpPtrAllocator &Allocator);<br>
-<br>
-  Error allocateBlocks(uint32_t NumBlocks, MutableArrayRef<uint32_t> Blocks);<br>
-  uint32_t computeDirectoryByteSize() const;<br>
-<br>
-  typedef std::vector<uint32_t> BlockList;<br>
-<br>
-  BumpPtrAllocator &Allocator;<br>
-<br>
-  bool IsGrowable;<br>
-  uint32_t FreePageMap;<br>
-  uint32_t Unknown1;<br>
-  uint32_t BlockSize;<br>
-  uint32_t MininumBlocks;<br>
-  uint32_t BlockMapAddr;<br>
-  BitVector FreeBlocks;<br>
-  std::vector<uint32_t> DirectoryBlocks;<br>
-  std::vector<std::pair<uint32_t, BlockList>> StreamData;<br>
-};<br>
-} // namespace msf<br>
-} // namespace llvm<br>
-<br>
-#endif // LLVM_DEBUGINFO_MSF_MSFBUILDER_H<br>
<br>
Removed: llvm/trunk/include/llvm/DebugInfo/Msf/MsfCommon.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/Msf/MsfCommon.h?rev=277212&view=auto" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/Msf/MsfCommon.h?rev=277212&view=auto</a><br>
==============================================================================<br>
--- llvm/trunk/include/llvm/DebugInfo/Msf/MsfCommon.h (original)<br>
+++ llvm/trunk/include/llvm/DebugInfo/Msf/MsfCommon.h (removed)<br>
@@ -1,89 +0,0 @@<br>
-//===- MsfCommon.h - Common types and functions for MSF files ---*- C++ -*-===//<br>
-//<br>
-//                     The LLVM Compiler Infrastructure<br>
-//<br>
-// This file is distributed under the University of Illinois Open Source<br>
-// License. See LICENSE.TXT for details.<br>
-//<br>
-//===----------------------------------------------------------------------===//<br>
-<br>
-#ifndef LLVM_DEBUGINFO_MSF_MSFCOMMON_H<br>
-#define LLVM_DEBUGINFO_MSF_MSFCOMMON_H<br>
-<br>
-#include "llvm/ADT/ArrayRef.h"<br>
-<br>
-#include "llvm/Support/Endian.h"<br>
-#include "llvm/Support/Error.h"<br>
-#include "llvm/Support/MathExtras.h"<br>
-<br>
-#include <vector><br>
-<br>
-namespace llvm {<br>
-namespace msf {<br>
-static const char Magic[] = {'M',  'i',  'c',    'r', 'o', 's',  'o',  'f',<br>
-                             't',  ' ',  'C',    '/', 'C', '+',  '+',  ' ',<br>
-                             'M',  'S',  'F',    ' ', '7', '.',  '0',  '0',<br>
-                             '\r', '\n', '\x1a', 'D', 'S', '\0', '\0', '\0'};<br>
-<br>
-// The superblock is overlaid at the beginning of the file (offset 0).<br>
-// It starts with a magic header and is followed by information which<br>
-// describes the layout of the file system.<br>
-struct SuperBlock {<br>
-  char MagicBytes[sizeof(Magic)];<br>
-  // The file system is split into a variable number of fixed size elements.<br>
-  // These elements are referred to as blocks.  The size of a block may vary<br>
-  // from system to system.<br>
-  support::ulittle32_t BlockSize;<br>
-  // The index of the free block map.<br>
-  support::ulittle32_t FreeBlockMapBlock;<br>
-  // This contains the number of blocks resident in the file system.  In<br>
-  // practice, NumBlocks * BlockSize is equivalent to the size of the MSF<br>
-  // file.<br>
-  support::ulittle32_t NumBlocks;<br>
-  // This contains the number of bytes which make up the directory.<br>
-  support::ulittle32_t NumDirectoryBytes;<br>
-  // This field's purpose is not yet known.<br>
-  support::ulittle32_t Unknown1;<br>
-  // This contains the block # of the block map.<br>
-  support::ulittle32_t BlockMapAddr;<br>
-};<br>
-<br>
-struct MsfLayout {<br>
-  MsfLayout() : SB(nullptr) {}<br>
-  const SuperBlock *SB;<br>
-  ArrayRef<support::ulittle32_t> DirectoryBlocks;<br>
-  ArrayRef<support::ulittle32_t> StreamSizes;<br>
-  std::vector<ArrayRef<support::ulittle32_t>> StreamMap;<br>
-};<br>
-<br>
-inline bool isValidBlockSize(uint32_t Size) {<br>
-  switch (Size) {<br>
-  case 512:<br>
-  case 1024:<br>
-  case 2048:<br>
-  case 4096:<br>
-    return true;<br>
-  }<br>
-  return false;<br>
-}<br>
-<br>
-// Super Block, Fpm0, Fpm1, and Block Map<br>
-inline uint32_t getMinimumBlockCount() { return 4; }<br>
-<br>
-// Super Block, Fpm0, and Fpm1 are reserved.  The Block Map, although required<br>
-// need not be at block 3.<br>
-inline uint32_t getFirstUnreservedBlock() { return 3; }<br>
-<br>
-inline uint64_t bytesToBlocks(uint64_t NumBytes, uint64_t BlockSize) {<br>
-  return alignTo(NumBytes, BlockSize) / BlockSize;<br>
-}<br>
-<br>
-inline uint64_t blockToOffset(uint64_t BlockNumber, uint64_t BlockSize) {<br>
-  return BlockNumber * BlockSize;<br>
-}<br>
-<br>
-Error validateSuperBlock(const SuperBlock &SB);<br>
-} // namespace msf<br>
-} // namespace llvm<br>
-<br>
-#endif // LLVM_DEBUGINFO_MSF_MSFCOMMON_H<br>
<br>
Removed: llvm/trunk/include/llvm/DebugInfo/Msf/MsfError.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/Msf/MsfError.h?rev=277212&view=auto" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/Msf/MsfError.h?rev=277212&view=auto</a><br>
==============================================================================<br>
--- llvm/trunk/include/llvm/DebugInfo/Msf/MsfError.h (original)<br>
+++ llvm/trunk/include/llvm/DebugInfo/Msf/MsfError.h (removed)<br>
@@ -1,47 +0,0 @@<br>
-//===- MsfError.h - Error extensions for Msf Files --------------*- C++ -*-===//<br>
-//<br>
-//                     The LLVM Compiler Infrastructure<br>
-//<br>
-// This file is distributed under the University of Illinois Open Source<br>
-// License. See LICENSE.TXT for details.<br>
-//<br>
-//===----------------------------------------------------------------------===//<br>
-<br>
-#ifndef LLVM_DEBUGINFO_MSF_MSFERROR_H<br>
-#define LLVM_DEBUGINFO_MSF_MSFERROR_H<br>
-<br>
-#include "llvm/Support/Error.h"<br>
-<br>
-#include <string><br>
-<br>
-namespace llvm {<br>
-namespace msf {<br>
-enum class msf_error_code {<br>
-  unspecified = 1,<br>
-  insufficient_buffer,<br>
-  not_writable,<br>
-  no_stream,<br>
-  invalid_format,<br>
-  block_in_use<br>
-};<br>
-<br>
-/// Base class for errors originating when parsing raw PDB files<br>
-class MsfError : public ErrorInfo<MsfError> {<br>
-public:<br>
-  static char ID;<br>
-  MsfError(msf_error_code C);<br>
-  MsfError(const std::string &Context);<br>
-  MsfError(msf_error_code C, const std::string &Context);<br>
-<br>
-  void log(raw_ostream &OS) const override;<br>
-  const std::string &getErrorMessage() const;<br>
-  std::error_code convertToErrorCode() const override;<br>
-<br>
-private:<br>
-  std::string ErrMsg;<br>
-  msf_error_code Code;<br>
-};<br>
-} // namespace msf<br>
-} // namespace llvm<br>
-<br>
-#endif // LLVM_DEBUGINFO_MSF_MSFERROR_H<br>
<br>
Removed: llvm/trunk/include/llvm/DebugInfo/Msf/MsfStreamLayout.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/Msf/MsfStreamLayout.h?rev=277212&view=auto" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/Msf/MsfStreamLayout.h?rev=277212&view=auto</a><br>
==============================================================================<br>
--- llvm/trunk/include/llvm/DebugInfo/Msf/MsfStreamLayout.h (original)<br>
+++ llvm/trunk/include/llvm/DebugInfo/Msf/MsfStreamLayout.h (removed)<br>
@@ -1,35 +0,0 @@<br>
-//===- MsfStreamLayout.h - Describes the layout of a stream -----*- C++ -*-===//<br>
-//<br>
-//                     The LLVM Compiler Infrastructure<br>
-//<br>
-// This file is distributed under the University of Illinois Open Source<br>
-// License. See LICENSE.TXT for details.<br>
-//<br>
-//===----------------------------------------------------------------------===//<br>
-<br>
-#ifndef LLVM_DEBUGINFO_MSF_MSFSTREAMLAYOUT_H<br>
-#define LLVM_DEBUGINFO_MSF_MSFSTREAMLAYOUT_H<br>
-<br>
-#include "llvm/ADT/ArrayRef.h"<br>
-#include "llvm/Support/Endian.h"<br>
-<br>
-#include <cstdint><br>
-<br>
-namespace llvm {<br>
-namespace msf {<br>
-<br>
-/// \brief Describes the layout of a stream in an Msf layout.  A "stream" here<br>
-/// is defined as any logical unit of data which may be arranged inside the Msf<br>
-/// file as a sequence of (possibly discontiguous) blocks.  When we want to read<br>
-/// from a particular Msf Stream, we fill out a stream layout structure and the<br>
-/// reader uses it to determine which blocks in the underlying Msf file contain<br>
-/// the data, so that it can be pieced together in the right order.<br>
-class MsfStreamLayout {<br>
-public:<br>
-  uint32_t Length;<br>
-  ArrayRef<support::ulittle32_t> Blocks;<br>
-};<br>
-} // namespace msf<br>
-} // namespace llvm<br>
-<br>
-#endif // LLVM_DEBUGINFO_MSF_MSFSTREAMLAYOUT_H<br>
<br>
Removed: llvm/trunk/include/llvm/DebugInfo/Msf/StreamArray.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/Msf/StreamArray.h?rev=277212&view=auto" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/Msf/StreamArray.h?rev=277212&view=auto</a><br>
==============================================================================<br>
--- llvm/trunk/include/llvm/DebugInfo/Msf/StreamArray.h (original)<br>
+++ llvm/trunk/include/llvm/DebugInfo/Msf/StreamArray.h (removed)<br>
@@ -1,277 +0,0 @@<br>
-//===- StreamArray.h - Array backed by an arbitrary stream ----------------===//<br>
-//<br>
-//                     The LLVM Compiler Infrastructure<br>
-//<br>
-// This file is distributed under the University of Illinois Open Source<br>
-// License. See LICENSE.TXT for details.<br>
-//<br>
-//===----------------------------------------------------------------------===//<br>
-<br>
-#ifndef LLVM_DEBUGINFO_MSF_STREAMARRAY_H<br>
-#define LLVM_DEBUGINFO_MSF_STREAMARRAY_H<br>
-<br>
-#include "llvm/DebugInfo/Msf/StreamRef.h"<br>
-#include "llvm/Support/Error.h"<br>
-<br>
-#include <functional><br>
-#include <type_traits><br>
-<br>
-namespace llvm {<br>
-namespace msf {<br>
-<br>
-/// VarStreamArrayExtractor is intended to be specialized to provide customized<br>
-/// extraction logic.  On input it receives a StreamRef pointing to the<br>
-/// beginning of the next record, but where the length of the record is not yet<br>
-/// known.  Upon completion, it should return an appropriate Error instance if<br>
-/// a record could not be extracted, or if one could be extracted it should<br>
-/// return success and set Len to the number of bytes this record occupied in<br>
-/// the underlying stream, and it should fill out the fields of the value type<br>
-/// Item appropriately to represent the current record.<br>
-///<br>
-/// You can specialize this template for your own custom value types to avoid<br>
-/// having to specify a second template argument to VarStreamArray (documented<br>
-/// below).<br>
-template <typename T> struct VarStreamArrayExtractor {<br>
-  // Method intentionally deleted.  You must provide an explicit specialization<br>
-  // with the following method implemented.<br>
-  Error operator()(ReadableStreamRef Stream, uint32_t &Len,<br>
-                   T &Item) const = delete;<br>
-};<br>
-<br>
-/// VarStreamArray represents an array of variable length records backed by a<br>
-/// stream.  This could be a contiguous sequence of bytes in memory, it could<br>
-/// be a file on disk, or it could be a PDB stream where bytes are stored as<br>
-/// discontiguous blocks in a file.  Usually it is desirable to treat arrays<br>
-/// as contiguous blocks of memory, but doing so with large PDB files, for<br>
-/// example, could mean allocating huge amounts of memory just to allow<br>
-/// re-ordering of stream data to be contiguous before iterating over it.  By<br>
-/// abstracting this out, we need not duplicate this memory, and we can<br>
-/// iterate over arrays in arbitrarily formatted streams.  Elements are parsed<br>
-/// lazily on iteration, so there is no upfront cost associated with building<br>
-/// a VarStreamArray, no matter how large it may be.<br>
-///<br>
-/// You create a VarStreamArray by specifying a ValueType and an Extractor type.<br>
-/// If you do not specify an Extractor type, it expects you to specialize<br>
-/// VarStreamArrayExtractor<T> for your ValueType.<br>
-///<br>
-/// By default an Extractor is default constructed in the class, but in some<br>
-/// cases you might find it useful for an Extractor to maintain state across<br>
-/// extractions.  In this case you can provide your own Extractor through a<br>
-/// secondary constructor.  The following examples show various ways of<br>
-/// creating a VarStreamArray.<br>
-///<br>
-///       // Will use VarStreamArrayExtractor<MyType> as the extractor.<br>
-///       VarStreamArray<MyType> MyTypeArray;<br>
-///<br>
-///       // Will use a default-constructed MyExtractor as the extractor.<br>
-///       VarStreamArray<MyType, MyExtractor> MyTypeArray2;<br>
-///<br>
-///       // Will use the specific instance of MyExtractor provided.<br>
-///       // MyExtractor need not be default-constructible in this case.<br>
-///       MyExtractor E(SomeContext);<br>
-///       VarStreamArray<MyType, MyExtractor> MyTypeArray3(E);<br>
-///<br>
-template <typename ValueType, typename Extractor> class VarStreamArrayIterator;<br>
-<br>
-template <typename ValueType,<br>
-          typename Extractor = VarStreamArrayExtractor<ValueType>><br>
-class VarStreamArray {<br>
-  friend class VarStreamArrayIterator<ValueType, Extractor>;<br>
-<br>
-public:<br>
-  typedef VarStreamArrayIterator<ValueType, Extractor> Iterator;<br>
-<br>
-  VarStreamArray() {}<br>
-  explicit VarStreamArray(const Extractor &E) : E(E) {}<br>
-<br>
-  explicit VarStreamArray(ReadableStreamRef Stream) : Stream(Stream) {}<br>
-  VarStreamArray(ReadableStreamRef Stream, const Extractor &E)<br>
-      : Stream(Stream), E(E) {}<br>
-<br>
-  VarStreamArray(const VarStreamArray<ValueType, Extractor> &Other)<br>
-      : Stream(Other.Stream), E(Other.E) {}<br>
-<br>
-  Iterator begin(bool *HadError = nullptr) const {<br>
-    return Iterator(*this, E, HadError);<br>
-  }<br>
-<br>
-  Iterator end() const { return Iterator(E); }<br>
-<br>
-  const Extractor &getExtractor() const { return E; }<br>
-<br>
-  ReadableStreamRef getUnderlyingStream() const { return Stream; }<br>
-<br>
-private:<br>
-  ReadableStreamRef Stream;<br>
-  Extractor E;<br>
-};<br>
-<br>
-template <typename ValueType, typename Extractor> class VarStreamArrayIterator {<br>
-  typedef VarStreamArrayIterator<ValueType, Extractor> IterType;<br>
-  typedef VarStreamArray<ValueType, Extractor> ArrayType;<br>
-<br>
-public:<br>
-  VarStreamArrayIterator(const ArrayType &Array, const Extractor &E,<br>
-                         bool *HadError = nullptr)<br>
-      : IterRef(Array.Stream), Array(&Array), HadError(HadError), Extract(E) {<br>
-    if (IterRef.getLength() == 0)<br>
-      moveToEnd();<br>
-    else {<br>
-      auto EC = Extract(IterRef, ThisLen, ThisValue);<br>
-      if (EC) {<br>
-        consumeError(std::move(EC));<br>
-        markError();<br>
-      }<br>
-    }<br>
-  }<br>
-  VarStreamArrayIterator() {}<br>
-  explicit VarStreamArrayIterator(const Extractor &E) : Extract(E) {}<br>
-  ~VarStreamArrayIterator() {}<br>
-<br>
-  bool operator==(const IterType &R) const {<br>
-    if (Array && R.Array) {<br>
-      // Both have a valid array, make sure they're same.<br>
-      assert(Array == R.Array);<br>
-      return IterRef == R.IterRef;<br>
-    }<br>
-<br>
-    // Both iterators are at the end.<br>
-    if (!Array && !R.Array)<br>
-      return true;<br>
-<br>
-    // One is not at the end and one is.<br>
-    return false;<br>
-  }<br>
-<br>
-  bool operator!=(const IterType &R) { return !(*this == R); }<br>
-<br>
-  const ValueType &operator*() const {<br>
-    assert(Array && !HasError);<br>
-    return ThisValue;<br>
-  }<br>
-<br>
-  IterType &operator++() {<br>
-    // We are done with the current record, discard it so that we are<br>
-    // positioned at the next record.<br>
-    IterRef = IterRef.drop_front(ThisLen);<br>
-    if (IterRef.getLength() == 0) {<br>
-      // There is nothing after the current record, we must make this an end<br>
-      // itera</blockquote></div><div dir="ltr">-- <br></div><div data-smartmail="gmail_signature">Mike<br>Sent from phone</div>
</blockquote></div>
</div></div><br>_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
<br></blockquote></div><br></div>