#include "llvm/DebugInfo/CodeView/LazyRandomTypeCollection.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/DebugInfo/CodeView/CodeView.h"
#include "llvm/DebugInfo/CodeView/CodeViewError.h"
#include "llvm/DebugInfo/CodeView/RecordName.h"
#include "llvm/DebugInfo/CodeView/RecordSerialization.h"
#include "llvm/Support/BinaryStreamReader.h"
#include "llvm/Support/Error.h"
#include <algorithm>
#include <cassert>
#include <cstdint>
#include <iterator>
usingnamespacellvm;
usingnamespacellvm::codeview;
static void error(Error &&EC) { … }
LazyRandomTypeCollection::LazyRandomTypeCollection(uint32_t RecordCountHint)
: … { … }
LazyRandomTypeCollection::LazyRandomTypeCollection(
const CVTypeArray &Types, uint32_t RecordCountHint,
PartialOffsetArray PartialOffsets)
: … { … }
LazyRandomTypeCollection::LazyRandomTypeCollection(ArrayRef<uint8_t> Data,
uint32_t RecordCountHint)
: … { … }
LazyRandomTypeCollection::LazyRandomTypeCollection(StringRef Data,
uint32_t RecordCountHint)
: … { … }
LazyRandomTypeCollection::LazyRandomTypeCollection(const CVTypeArray &Types,
uint32_t NumRecords)
: … { … }
void LazyRandomTypeCollection::reset(BinaryStreamReader &Reader,
uint32_t RecordCountHint) { … }
void LazyRandomTypeCollection::reset(StringRef Data, uint32_t RecordCountHint) { … }
void LazyRandomTypeCollection::reset(ArrayRef<uint8_t> Data,
uint32_t RecordCountHint) { … }
uint32_t LazyRandomTypeCollection::getOffsetOfType(TypeIndex Index) { … }
CVType LazyRandomTypeCollection::getType(TypeIndex Index) { … }
std::optional<CVType> LazyRandomTypeCollection::tryGetType(TypeIndex Index) { … }
StringRef LazyRandomTypeCollection::getTypeName(TypeIndex Index) { … }
bool LazyRandomTypeCollection::contains(TypeIndex Index) { … }
uint32_t LazyRandomTypeCollection::size() { … }
uint32_t LazyRandomTypeCollection::capacity() { … }
Error LazyRandomTypeCollection::ensureTypeExists(TypeIndex TI) { … }
void LazyRandomTypeCollection::ensureCapacityFor(TypeIndex Index) { … }
Error LazyRandomTypeCollection::visitRangeForType(TypeIndex TI) { … }
std::optional<TypeIndex> LazyRandomTypeCollection::getFirst() { … }
std::optional<TypeIndex> LazyRandomTypeCollection::getNext(TypeIndex Prev) { … }
Error LazyRandomTypeCollection::fullScanForType(TypeIndex TI) { … }
void LazyRandomTypeCollection::visitRange(TypeIndex Begin, uint32_t BeginOffset,
TypeIndex End) { … }
bool LazyRandomTypeCollection::replaceType(TypeIndex &Index, CVType Data,
bool Stabilize) { … }