本文整理汇总了C++中module::alias_iterator::getAliasedGlobal方法的典型用法代码示例。如果您正苦于以下问题:C++ alias_iterator::getAliasedGlobal方法的具体用法?C++ alias_iterator::getAliasedGlobal怎么用?C++ alias_iterator::getAliasedGlobal使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类module::alias_iterator
的用法示例。
在下文中一共展示了alias_iterator::getAliasedGlobal方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: parseSymbols
/// parseSymbols - Parse the symbols from the module and model-level ASM and add
/// them to either the defined or undefined lists.
bool LTOModule::parseSymbols(std::string &errMsg) {
// add functions
for (Module::iterator f = _module->begin(), e = _module->end(); f != e; ++f) {
if (isDeclaration(*f))
addPotentialUndefinedSymbol(f, true);
else
addDefinedFunctionSymbol(f);
}
// add data
for (Module::global_iterator v = _module->global_begin(),
e = _module->global_end(); v != e; ++v) {
if (isDeclaration(*v))
addPotentialUndefinedSymbol(v, false);
else
addDefinedDataSymbol(v);
}
// add asm globals
if (addAsmGlobalSymbols(errMsg))
return true;
// add aliases
for (Module::alias_iterator a = _module->alias_begin(),
e = _module->alias_end(); a != e; ++a) {
if (isDeclaration(*a->getAliasedGlobal()))
// Is an alias to a declaration.
addPotentialUndefinedSymbol(a, false);
else
addDefinedDataSymbol(a);
}
// make symbols for all undefines
for (StringMap<NameAndAttributes>::iterator u =_undefines.begin(),
e = _undefines.end(); u != e; ++u) {
// If this symbol also has a definition, then don't make an undefine because
// it is a tentative definition.
if (_defines.count(u->getKey())) continue;
NameAndAttributes info = u->getValue();
_symbols.push_back(info);
}
return false;
}