[llvm] r277213 - [msf] Resubmit "Rename Msf -> MSF".

Zachary Turner via llvm-commits llvm-commits at lists.llvm.org
Sat Jul 30 20:47:35 PDT 2016


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
On Sat, Jul 30, 2016 at 3:08 PM Mike Aizatsky <aizatsky at google.com> wrote:

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


More information about the llvm-commits mailing list