本文整理汇总了C++中mcassembler::iterator::begin方法的典型用法代码示例。如果您正苦于以下问题:C++ iterator::begin方法的具体用法?C++ iterator::begin怎么用?C++ iterator::begin使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类mcassembler::iterator
的用法示例。
在下文中一共展示了iterator::begin方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: FinishImpl
void MCMachOStreamer::FinishImpl() {
EmitFrames(&getAssembler().getBackend(), true);
// We have to set the fragment atom associations so we can relax properly for
// Mach-O.
// First, scan the symbol table to build a lookup table from fragments to
// defining symbols.
DenseMap<const MCFragment*, MCSymbolData*> DefiningSymbolMap;
for (MCSymbolData &SD : getAssembler().symbols()) {
if (getAssembler().isSymbolLinkerVisible(SD.getSymbol()) &&
SD.getFragment()) {
// An atom defining symbol should never be internal to a fragment.
assert(SD.getOffset() == 0 && "Invalid offset in atom defining symbol!");
DefiningSymbolMap[SD.getFragment()] = &SD;
}
}
// Set the fragment atom associations by tracking the last seen atom defining
// symbol.
for (MCAssembler::iterator it = getAssembler().begin(),
ie = getAssembler().end(); it != ie; ++it) {
MCSymbolData *CurrentAtom = nullptr;
for (MCSectionData::iterator it2 = it->begin(),
ie2 = it->end(); it2 != ie2; ++it2) {
if (MCSymbolData *SD = DefiningSymbolMap.lookup(it2))
CurrentAtom = SD;
it2->setAtom(CurrentAtom);
}
}
this->MCObjectStreamer::FinishImpl();
}