diff options
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/DebugInfo/CodeView/StringsAndChecksums.cpp | 7 | ||||
| -rw-r--r-- | llvm/lib/DebugInfo/PDB/Native/ModuleDebugStream.cpp | 9 | ||||
| -rw-r--r-- | llvm/lib/DebugInfo/PDB/Native/PDBFile.cpp | 10 | 
3 files changed, 17 insertions, 9 deletions
diff --git a/llvm/lib/DebugInfo/CodeView/StringsAndChecksums.cpp b/llvm/lib/DebugInfo/CodeView/StringsAndChecksums.cpp index ccd9aba45ea..928bf8c94f7 100644 --- a/llvm/lib/DebugInfo/CodeView/StringsAndChecksums.cpp +++ b/llvm/lib/DebugInfo/CodeView/StringsAndChecksums.cpp @@ -36,6 +36,13 @@ void StringsAndChecksumsRef::initializeStrings(    Strings = OwnedStrings.get();  } +void StringsAndChecksumsRef::setChecksums( +    const DebugChecksumsSubsectionRef &CS) { +  OwnedChecksums = llvm::make_unique<DebugChecksumsSubsectionRef>(); +  *OwnedChecksums = CS; +  Checksums = OwnedChecksums.get(); +} +  void StringsAndChecksumsRef::initializeChecksums(      const DebugSubsectionRecord &FCR) {    assert(FCR.kind() == DebugSubsectionKind::FileChecksums); diff --git a/llvm/lib/DebugInfo/PDB/Native/ModuleDebugStream.cpp b/llvm/lib/DebugInfo/PDB/Native/ModuleDebugStream.cpp index 1ddad45df34..4186f2eb6ba 100644 --- a/llvm/lib/DebugInfo/PDB/Native/ModuleDebugStream.cpp +++ b/llvm/lib/DebugInfo/PDB/Native/ModuleDebugStream.cpp @@ -30,15 +30,6 @@ ModuleDebugStreamRef::ModuleDebugStreamRef(      std::unique_ptr<MappedBlockStream> Stream)      : Mod(Module), Stream(std::move(Stream)) {} -ModuleDebugStreamRef::ModuleDebugStreamRef(ModuleDebugStreamRef &&Other) -    : Mod(Other.Mod), Signature(Other.Signature), -      Stream(std::move(Other.Stream)), -      SymbolsSubstream(std::move(Other.SymbolsSubstream)), -      C11LinesSubstream(std::move(Other.C11LinesSubstream)), -      C13LinesSubstream(std::move(Other.C13LinesSubstream)), -      GlobalRefsSubstream(std::move(Other.GlobalRefsSubstream)), -      Subsections(std::move(Other.Subsections)) {} -  ModuleDebugStreamRef::~ModuleDebugStreamRef() = default;  Error ModuleDebugStreamRef::reload() { diff --git a/llvm/lib/DebugInfo/PDB/Native/PDBFile.cpp b/llvm/lib/DebugInfo/PDB/Native/PDBFile.cpp index 1254e23c73e..a9597cdf4c4 100644 --- a/llvm/lib/DebugInfo/PDB/Native/PDBFile.cpp +++ b/llvm/lib/DebugInfo/PDB/Native/PDBFile.cpp @@ -363,6 +363,16 @@ Expected<PDBStringTable &> PDBFile::getStringTable() {    return *Strings;  } +uint32_t PDBFile::getPointerSize() { +  auto DbiS = getPDBDbiStream(); +  if (!DbiS) +    return 0; +  PDB_Machine Machine = DbiS->getMachineType(); +  if (Machine == PDB_Machine::Amd64) +    return 8; +  return 4; +} +  bool PDBFile::hasPDBDbiStream() const { return StreamDBI < getNumStreams(); }  bool PDBFile::hasPDBGlobalsStream() {  | 

