mirror of
https://github.com/RPCS3/llvm.git
synced 2025-05-23 13:56:06 +00:00

After several smaller patches to get most of the core improvements finished up, this patch is a straight move and header fixup of the source. Differential Revision: https://reviews.llvm.org/D30266 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296810 91177308-0d34-0410-b5e6-96231b3b80d8
43 lines
1.2 KiB
C++
43 lines
1.2 KiB
C++
//===- GlobalsStream.cpp - PDB Index of Symbols by Name ---- ----*- 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/Native/GlobalsStream.h"
|
|
#include "GSI.h"
|
|
#include "llvm/Support/BinaryStreamReader.h"
|
|
#include "llvm/Support/Error.h"
|
|
#include <algorithm>
|
|
|
|
using namespace llvm;
|
|
using namespace llvm::msf;
|
|
using namespace llvm::pdb;
|
|
|
|
GlobalsStream::GlobalsStream(std::unique_ptr<MappedBlockStream> Stream)
|
|
: Stream(std::move(Stream)) {}
|
|
|
|
GlobalsStream::~GlobalsStream() = default;
|
|
|
|
Error GlobalsStream::reload() {
|
|
BinaryStreamReader Reader(*Stream);
|
|
|
|
const GSIHashHeader *HashHdr;
|
|
if (auto EC = readGSIHashHeader(HashHdr, Reader))
|
|
return EC;
|
|
|
|
if (auto EC = readGSIHashRecords(HashRecords, HashHdr, Reader))
|
|
return EC;
|
|
|
|
if (auto EC = readGSIHashBuckets(HashBuckets, HashHdr, Reader))
|
|
return EC;
|
|
NumBuckets = HashBuckets.size();
|
|
|
|
return Error::success();
|
|
}
|
|
|
|
Error GlobalsStream::commit() { return Error::success(); }
|