本文整理汇总了C++中MutableArrayRef::drop_front方法的典型用法代码示例。如果您正苦于以下问题:C++ MutableArrayRef::drop_front方法的具体用法?C++ MutableArrayRef::drop_front怎么用?C++ MutableArrayRef::drop_front使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MutableArrayRef
的用法示例。
在下文中一共展示了MutableArrayRef::drop_front方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: mergeSymbolRecords
static void mergeSymbolRecords(BumpPtrAllocator &Alloc, ObjectFile *File,
ArrayRef<TypeIndex> TypeIndexMap,
BinaryStreamRef SymData) {
// FIXME: Improve error recovery by warning and skipping records when
// possible.
CVSymbolArray Syms;
BinaryStreamReader Reader(SymData);
ExitOnErr(Reader.readArray(Syms, Reader.getLength()));
for (const CVSymbol &Sym : Syms) {
// Discover type index references in the record. Skip it if we don't know
// where they are.
SmallVector<TiReference, 32> TypeRefs;
if (!discoverTypeIndices(Sym, TypeRefs)) {
log("ignoring unknown symbol record with kind 0x" + utohexstr(Sym.kind()));
continue;
}
// Copy the symbol record so we can mutate it.
MutableArrayRef<uint8_t> NewData = copySymbolForPdb(Sym, Alloc);
// Re-map all the type index references.
MutableArrayRef<uint8_t> Contents =
NewData.drop_front(sizeof(RecordPrefix));
if (!remapTypesInSymbolRecord(File, Contents, TypeIndexMap, TypeRefs))
continue;
// FIXME: Fill in "Parent" and "End" fields by maintaining a stack of
// scopes.
// Add the symbol to the module.
File->ModuleDBI->addSymbol(CVSymbol(Sym.kind(), NewData));
}
}