Files
archived-llvm/include/llvm/DebugInfo/PDB/Native/InjectedSourceStream.h
Nico Weber 50d692d959 Teach llvm-pdbutil pretty -native about -injected-sources
`pretty -native -injected-sources -injected-source-content` works with
this patch, and produces identical output to the dia version.

Differential Revision: https://reviews.llvm.org/D64428

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@366236 91177308-0d34-0410-b5e6-96231b3b80d8
2019-07-16 18:04:26 +00:00

45 lines
1.3 KiB
C++

//===- InjectedSourceStream.h - PDB Headerblock Stream Access ---*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_DEBUGINFO_PDB_RAW_PDBINJECTEDSOURCESTREAM_H
#define LLVM_DEBUGINFO_PDB_RAW_PDBINJECTEDSOURCESTREAM_H
#include "llvm/DebugInfo/PDB/Native/HashTable.h"
#include "llvm/DebugInfo/PDB/Native/RawTypes.h"
#include "llvm/Support/Error.h"
namespace llvm {
namespace msf {
class MappedBlockStream;
}
namespace pdb {
class PDBFile;
class PDBStringTable;
class InjectedSourceStream {
public:
InjectedSourceStream(std::unique_ptr<msf::MappedBlockStream> Stream);
Error reload(const PDBStringTable &Strings);
using const_iterator = HashTable<SrcHeaderBlockEntry>::const_iterator;
const_iterator begin() const { return InjectedSourceTable.begin(); }
const_iterator end() const { return InjectedSourceTable.end(); }
uint32_t size() const { return InjectedSourceTable.size(); }
private:
std::unique_ptr<msf::MappedBlockStream> Stream;
const SrcHeaderBlockHeader* Header;
HashTable<SrcHeaderBlockEntry> InjectedSourceTable;
};
}
}
#endif