10#include "llvm/Support/NativeFormatting.h"
22struct CompilandIdRepr {
28struct CompilandSymIdRepr {
35struct GlobalSymIdRepr {
49struct FieldListMemberIdRepr {
56static_assert(
sizeof(CompilandIdRepr) == 8,
"Invalid structure size!");
57static_assert(
sizeof(CompilandSymIdRepr) == 8,
"Invalid structure size!");
58static_assert(
sizeof(GlobalSymIdRepr) == 8,
"Invalid structure size!");
59static_assert(
sizeof(TypeSymIdRepr) == 8,
"Invalid structure size!");
60static_assert(
sizeof(FieldListMemberIdRepr) == 8,
"Invalid structure size!");
63template <
typename OutT,
typename InT>
static OutT
repr_cast(
const InT &value) {
65 ::memcpy(&result, &value,
sizeof(value));
71 ::memset(&repr, 0,
sizeof(repr));
78 CompilandSymIdRepr repr;
79 ::memset(&repr, 0,
sizeof(repr));
80 repr.modi = csid.
modi;
88 ::memset(&repr, 0,
sizeof(repr));
97 ::memset(&repr, 0,
sizeof(repr));
98 repr.index = tsid.
index.getIndex();
105 FieldListMemberIdRepr repr;
106 ::memset(&repr, 0,
sizeof(repr));
107 repr.index = flmid.
index.getIndex();
108 repr.offset = flmid.
offset;
122 result.
modi = repr.modi;
130 result.
modi = repr.modi;
131 result.
offset = repr.offset;
141 result.
offset = repr.offset;
149 result.
index.setIndex(repr.index);
158 result.
index.setIndex(repr.index);
159 result.
offset = repr.offset;
187 write_hex(
Stream, V.
index.getIndex(), HexPrintStyle::PrefixLower);
static OutT repr_cast(const InT &value)
A stream class that can stream formatted output to a file.
PdbGlobalSymId asGlobalSym() const
PdbCompilandId asCompiland() const
PdbCompilandSymId asCompilandSym() const
PdbTypeSymId asTypeSym() const
PdbFieldListMemberId asFieldListMember() const
PdbSymUidKind kind() const
A class that represents a running process on the host machine.
llvm::codeview::TypeIndex index
llvm::codeview::TypeIndex index