diff options
Diffstat (limited to 'llvm/lib/DebugInfo/PDB')
-rw-r--r-- | llvm/lib/DebugInfo/PDB/CMakeLists.txt | 1 | ||||
-rw-r--r-- | llvm/lib/DebugInfo/PDB/Raw/ModStream.cpp | 2 | ||||
-rw-r--r-- | llvm/lib/DebugInfo/PDB/Raw/ModuleSubstreamRecord.cpp | 49 |
3 files changed, 1 insertions, 51 deletions
diff --git a/llvm/lib/DebugInfo/PDB/CMakeLists.txt b/llvm/lib/DebugInfo/PDB/CMakeLists.txt index 4dc0b4f8c31..46074f769cd 100644 --- a/llvm/lib/DebugInfo/PDB/CMakeLists.txt +++ b/llvm/lib/DebugInfo/PDB/CMakeLists.txt @@ -33,7 +33,6 @@ add_pdb_impl_folder(Raw Raw/InfoStream.cpp Raw/MappedBlockStream.cpp Raw/ModInfo.cpp - Raw/ModuleSubstreamRecord.cpp Raw/ModStream.cpp Raw/NameHashTable.cpp Raw/NameMap.cpp diff --git a/llvm/lib/DebugInfo/PDB/Raw/ModStream.cpp b/llvm/lib/DebugInfo/PDB/Raw/ModStream.cpp index a6d1977165f..14c55906e06 100644 --- a/llvm/lib/DebugInfo/PDB/Raw/ModStream.cpp +++ b/llvm/lib/DebugInfo/PDB/Raw/ModStream.cpp @@ -69,7 +69,7 @@ ModStream::symbols(bool *HadError) const { SymbolsSubstream.end()); } -iterator_range<ModStream::LineInfoArray::Iterator> +iterator_range<codeview::ModuleSubstreamArray::Iterator> ModStream::lines(bool *HadError) const { return llvm::make_range(LineInfo.begin(HadError), LineInfo.end()); } diff --git a/llvm/lib/DebugInfo/PDB/Raw/ModuleSubstreamRecord.cpp b/llvm/lib/DebugInfo/PDB/Raw/ModuleSubstreamRecord.cpp deleted file mode 100644 index 3e0573bf5ef..00000000000 --- a/llvm/lib/DebugInfo/PDB/Raw/ModuleSubstreamRecord.cpp +++ /dev/null @@ -1,49 +0,0 @@ -//===- ModuleSubstreamRecord.cpp --------------------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#include "llvm/DebugInfo/PDB/Raw/ModuleSubstreamRecord.h" - -#include "llvm/DebugInfo/CodeView/StreamReader.h" -#include "llvm/DebugInfo/PDB/Raw/RawTypes.h" - -using namespace llvm; -using namespace llvm::codeview; -using namespace llvm::pdb; - -ModuleSubstreamRecord::ModuleSubstreamRecord() - : Kind(ModuleSubstreamKind::None) {} - -ModuleSubstreamRecord::ModuleSubstreamRecord(ModuleSubstreamKind Kind, - StreamRef Data) - : Kind(Kind), Data(Data) {} - -Error ModuleSubstreamRecord::initialize(StreamRef Stream, - ModuleSubstreamRecord &Info) { - const ModuleSubsectionHeader *Header; - StreamReader Reader(Stream); - if (auto EC = Reader.readObject(Header)) - return EC; - - ModuleSubstreamKind Kind = - static_cast<ModuleSubstreamKind>(uint32_t(Header->Kind)); - if (auto EC = Reader.readStreamRef(Info.Data, Header->Length)) - return EC; - Info.Kind = Kind; - return Error::success(); -} - -uint32_t ModuleSubstreamRecord::getRecordLength() const { - return sizeof(ModuleSubsectionHeader) + Data.getLength(); -} - -ModuleSubstreamKind ModuleSubstreamRecord::getSubstreamKind() const { - return Kind; -} - -StreamRef ModuleSubstreamRecord::getRecordData() const { return Data; } |