61 return 2 + Sizes[
N - LF_NUMERIC];
65 const char *S =
reinterpret_cast<const char *
>(
Data.data());
73 while (!Content.
empty()) {
213 while (!Content.
empty()) {
254 if (!Content.
empty()) {
256 if (Pad >= LF_PAD0) {
281 case TypeLeafKind::LF_FUNC_ID:
285 case TypeLeafKind::LF_MFUNC_ID:
288 case TypeLeafKind::LF_STRING_ID:
291 case TypeLeafKind::LF_SUBSTR_LIST:
296 case TypeLeafKind::LF_BUILDINFO:
301 case TypeLeafKind::LF_UDT_SRC_LINE:
305 case TypeLeafKind::LF_UDT_MOD_SRC_LINE:
308 case TypeLeafKind::LF_MODIFIER:
311 case TypeLeafKind::LF_PROCEDURE:
315 case TypeLeafKind::LF_MFUNCTION:
319 case TypeLeafKind::LF_ARGLIST:
324 case TypeLeafKind::LF_ARRAY:
327 case TypeLeafKind::LF_CLASS:
328 case TypeLeafKind::LF_STRUCTURE:
329 case TypeLeafKind::LF_INTERFACE:
332 case TypeLeafKind::LF_UNION:
335 case TypeLeafKind::LF_ENUM:
338 case TypeLeafKind::LF_BITFIELD:
341 case TypeLeafKind::LF_VFTABLE:
344 case TypeLeafKind::LF_VTSHAPE:
346 case TypeLeafKind::LF_METHODLIST:
349 case TypeLeafKind::LF_FIELDLIST:
352 case TypeLeafKind::LF_POINTER:
367 case SymbolKind::S_GPROC32_ID:
368 case SymbolKind::S_LPROC32_ID:
369 case SymbolKind::S_LPROC32_DPC:
370 case SymbolKind::S_LPROC32_DPC_ID:
373 case SymbolKind::S_GPROC32:
374 case SymbolKind::S_LPROC32:
377 case SymbolKind::S_UDT:
380 case SymbolKind::S_GDATA32:
381 case SymbolKind::S_LDATA32:
384 case SymbolKind::S_BUILDINFO:
387 case SymbolKind::S_LTHREAD32:
388 case SymbolKind::S_GTHREAD32:
391 case SymbolKind::S_FILESTATIC:
394 case SymbolKind::S_LOCAL:
397 case SymbolKind::S_REGISTER:
400 case SymbolKind::S_CONSTANT:
403 case SymbolKind::S_BPREL32:
404 case SymbolKind::S_REGREL32:
407 case SymbolKind::S_CALLSITEINFO:
410 case SymbolKind::S_CALLERS:
411 case SymbolKind::S_CALLEES:
412 case SymbolKind::S_INLINEES:
417 case SymbolKind::S_INLINESITE:
420 case SymbolKind::S_HEAPALLOCSITE:
425 case SymbolKind::S_DEFRANGE_REGISTER:
426 case SymbolKind::S_DEFRANGE_REGISTER_REL:
427 case SymbolKind::S_DEFRANGE_FRAMEPOINTER_REL:
428 case SymbolKind::S_DEFRANGE_FRAMEPOINTER_REL_FULL_SCOPE:
429 case SymbolKind::S_DEFRANGE_SUBFIELD_REGISTER:
430 case SymbolKind::S_DEFRANGE_SUBFIELD:
434 case SymbolKind::S_LABEL32:
435 case SymbolKind::S_OBJNAME:
436 case SymbolKind::S_COMPILE:
437 case SymbolKind::S_COMPILE2:
438 case SymbolKind::S_COMPILE3:
439 case SymbolKind::S_ENVBLOCK:
440 case SymbolKind::S_BLOCK32:
441 case SymbolKind::S_FRAMEPROC:
442 case SymbolKind::S_THUNK32:
443 case SymbolKind::S_FRAMECOOKIE:
444 case SymbolKind::S_UNAMESPACE:
445 case SymbolKind::S_ARMSWITCHTABLE:
448 case SymbolKind::S_END:
449 case SymbolKind::S_INLINESITE_END:
450 case SymbolKind::S_PROC_ID_END:
474 for (
const auto &
Ref : Refs) {
478 Indices.
append(Run.begin(), Run.end());
505 return ::discoverTypeIndices(Sym.
content(), K, Refs);
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
#define LLVM_UNLIKELY(EXPR)
static cl::opt< RegAllocEvictionAdvisorAnalysisLegacy::AdvisorMode > Mode("regalloc-enable-advisor", cl::Hidden, cl::init(RegAllocEvictionAdvisorAnalysisLegacy::AdvisorMode::Default), cl::desc("Enable regalloc advisor mode"), cl::values(clEnumValN(RegAllocEvictionAdvisorAnalysisLegacy::AdvisorMode::Default, "default", "Default"), clEnumValN(RegAllocEvictionAdvisorAnalysisLegacy::AdvisorMode::Release, "release", "precompiled"), clEnumValN(RegAllocEvictionAdvisorAnalysisLegacy::AdvisorMode::Development, "development", "for training")))
static uint32_t getCStringLength(ArrayRef< uint8_t > Data)
static uint32_t handleDataMember(ArrayRef< uint8_t > Data, uint32_t Offset, SmallVectorImpl< TiReference > &Refs)
static uint32_t handleListContinuation(ArrayRef< uint8_t > Data, uint32_t Offset, SmallVectorImpl< TiReference > &Refs)
static void resolveTypeIndexReferences(ArrayRef< uint8_t > RecordData, ArrayRef< TiReference > Refs, SmallVectorImpl< TypeIndex > &Indices)
static uint32_t handleEnumerator(ArrayRef< uint8_t > Data, uint32_t Offset, SmallVectorImpl< TiReference > &Refs)
static bool isMemberPointer(uint32_t Attrs)
static uint32_t handleNestedType(ArrayRef< uint8_t > Data, uint32_t Offset, SmallVectorImpl< TiReference > &Refs)
static uint32_t getEncodedIntegerLength(ArrayRef< uint8_t > Data)
static uint32_t handleVFPtr(ArrayRef< uint8_t > Data, uint32_t Offset, SmallVectorImpl< TiReference > &Refs)
static uint32_t handleOneMethod(ArrayRef< uint8_t > Data, uint32_t Offset, SmallVectorImpl< TiReference > &Refs)
static void handleFieldList(ArrayRef< uint8_t > Content, SmallVectorImpl< TiReference > &Refs)
static uint32_t handleBaseClass(ArrayRef< uint8_t > Data, uint32_t Offset, SmallVectorImpl< TiReference > &Refs)
static void handlePointer(ArrayRef< uint8_t > Content, SmallVectorImpl< TiReference > &Refs)
static void handleMethodOverloadList(ArrayRef< uint8_t > Content, SmallVectorImpl< TiReference > &Refs)
static uint32_t handleVirtualBaseClass(ArrayRef< uint8_t > Data, uint32_t Offset, bool IsIndirect, SmallVectorImpl< TiReference > &Refs)
static PointerMode getPointerMode(uint32_t Attrs)
static MethodKind getMethodKind(uint16_t Attrs)
static uint32_t handleOverloadedMethod(ArrayRef< uint8_t > Data, uint32_t Offset, SmallVectorImpl< TiReference > &Refs)
static bool isIntroVirtual(uint16_t Attrs)
static uint32_t handleStaticDataMember(ArrayRef< uint8_t > Data, uint32_t Offset, SmallVectorImpl< TiReference > &Refs)
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
ArrayRef< T > drop_front(size_t N=1) const
Drop the first N elements of the array.
const T & front() const
front - Get the first element.
bool empty() const
empty - Check if the array is empty.
Provides read only access to a subclass of BinaryStream.
void setOffset(uint64_t Off)
Error readArray(ArrayRef< T > &Array, uint32_t NumElements)
Get a reference to a NumElements element array of objects of type T from the underlying stream as if ...
FixedStreamArray is similar to VarStreamArray, except with each record having a fixed-length.
This class consists of common code factored out of the SmallVector class to reduce code duplication b...
void append(ItTy in_start, ItTy in_end)
Add the specified range to the end of the SmallVector.
void push_back(const T &Elt)
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
The instances of the Type class are immutable: once they are created, they are never changed.
ArrayRef< uint8_t > content() const
static const uint32_t PointerModeShift
static const uint32_t PointerModeMask
PointerMode
Equivalent to CV_ptrmode_e.
@ PointerToMemberFunction
LLVM_ABI bool discoverTypeIndicesInSymbol(const CVSymbol &Symbol, SmallVectorImpl< TiReference > &Refs)
Discover type indices in symbol records.
MethodKind
Part of member attribute flags. (CV_methodprop_e)
CVRecord< TypeLeafKind > CVType
LLVM_ABI void discoverTypeIndices(ArrayRef< uint8_t > RecordData, SmallVectorImpl< TiReference > &Refs)
CVRecord< SymbolKind > CVSymbol
TypeLeafKind
Duplicate copy of the above enum, but using the official CV names.
SymbolKind
Duplicate copy of the above enum, but using the official CV names.
uint16_t read16le(const void *P)
uint32_t read32le(const void *P)
detail::packed_endian_specific_integral< uint32_t, llvm::endianness::little, unaligned > ulittle32_t
This is an optimization pass for GlobalISel generic memory operations.
FunctionAddr VTableAddr Count
@ Ref
The access may reference the value stored in memory.
void cantFail(Error Err, const char *Msg=nullptr)
Report a fatal error if Err is a failure value.
FunctionAddr VTableAddr uintptr_t uintptr_t Data