2017-05-02 14:30:13 -04:00
|
|
|
//===- ModuleDebugStream.h - PDB Module Info Stream Access ----------------===//
|
2016-07-23 16:41:05 -04:00
|
|
|
//
|
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
|
//
|
|
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
|
// License. See LICENSE.TXT for details.
|
|
|
|
|
//
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
2017-05-02 14:30:13 -04:00
|
|
|
#ifndef LLVM_DEBUGINFO_PDB_RAW_MODULEDEBUGSTREAM_H
|
|
|
|
|
#define LLVM_DEBUGINFO_PDB_RAW_MODULEDEBUGSTREAM_H
|
2016-07-23 16:41:05 -04:00
|
|
|
|
|
|
|
|
#include "llvm/ADT/iterator_range.h"
|
|
|
|
|
#include "llvm/DebugInfo/CodeView/CVRecord.h"
|
2017-05-02 14:30:13 -04:00
|
|
|
#include "llvm/DebugInfo/CodeView/ModuleDebugFragmentRecord.h"
|
2016-07-23 16:41:05 -04:00
|
|
|
#include "llvm/DebugInfo/CodeView/SymbolRecord.h"
|
2017-01-02 14:17:04 -05:00
|
|
|
#include "llvm/DebugInfo/MSF/MappedBlockStream.h"
|
2017-04-16 12:01:22 -04:00
|
|
|
#include "llvm/Support/BinaryStreamArray.h"
|
|
|
|
|
#include "llvm/Support/BinaryStreamRef.h"
|
2016-07-23 16:41:05 -04:00
|
|
|
#include "llvm/Support/Error.h"
|
|
|
|
|
|
|
|
|
|
namespace llvm {
|
|
|
|
|
namespace pdb {
|
|
|
|
|
class PDBFile;
|
2017-05-02 14:30:13 -04:00
|
|
|
class DbiModuleDescriptor;
|
|
|
|
|
|
|
|
|
|
class ModuleDebugStreamRef {
|
|
|
|
|
typedef codeview::ModuleDebugFragmentArray::Iterator
|
|
|
|
|
LinesAndChecksumsIterator;
|
2016-07-23 16:41:05 -04:00
|
|
|
|
|
|
|
|
public:
|
2017-05-02 14:30:13 -04:00
|
|
|
ModuleDebugStreamRef(const DbiModuleDescriptor &Module,
|
|
|
|
|
std::unique_ptr<msf::MappedBlockStream> Stream);
|
|
|
|
|
~ModuleDebugStreamRef();
|
2016-07-23 16:41:05 -04:00
|
|
|
|
|
|
|
|
Error reload();
|
|
|
|
|
|
2017-01-02 14:17:04 -05:00
|
|
|
uint32_t signature() const { return Signature; }
|
|
|
|
|
|
2016-07-23 16:41:05 -04:00
|
|
|
iterator_range<codeview::CVSymbolArray::Iterator>
|
|
|
|
|
symbols(bool *HadError) const;
|
|
|
|
|
|
2017-05-02 14:30:13 -04:00
|
|
|
llvm::iterator_range<LinesAndChecksumsIterator> linesAndChecksums() const;
|
2016-07-23 16:41:05 -04:00
|
|
|
|
2017-04-26 15:45:00 -04:00
|
|
|
bool hasLineInfo() const;
|
|
|
|
|
|
2016-07-23 16:41:05 -04:00
|
|
|
Error commit();
|
|
|
|
|
|
|
|
|
|
private:
|
2017-05-02 14:30:13 -04:00
|
|
|
const DbiModuleDescriptor &Mod;
|
2016-07-23 16:41:05 -04:00
|
|
|
|
2017-01-02 14:17:04 -05:00
|
|
|
uint32_t Signature;
|
|
|
|
|
|
|
|
|
|
std::unique_ptr<msf::MappedBlockStream> Stream;
|
2016-07-23 16:41:05 -04:00
|
|
|
|
|
|
|
|
codeview::CVSymbolArray SymbolsSubstream;
|
2017-05-02 14:30:13 -04:00
|
|
|
BinaryStreamRef C11LinesSubstream;
|
2017-04-16 12:01:22 -04:00
|
|
|
BinaryStreamRef C13LinesSubstream;
|
|
|
|
|
BinaryStreamRef GlobalRefsSubstream;
|
2016-07-23 16:41:05 -04:00
|
|
|
|
2017-05-02 14:30:13 -04:00
|
|
|
codeview::ModuleDebugFragmentArray LinesAndChecksums;
|
2016-07-23 16:41:05 -04:00
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endif
|