本文整理汇总了C++中DiagnosticsEngine::hasErrorOccurred方法的典型用法代码示例。如果您正苦于以下问题:C++ DiagnosticsEngine::hasErrorOccurred方法的具体用法?C++ DiagnosticsEngine::hasErrorOccurred怎么用?C++ DiagnosticsEngine::hasErrorOccurred使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DiagnosticsEngine
的用法示例。
在下文中一共展示了DiagnosticsEngine::hasErrorOccurred方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ElfSymbol
bool
ElfConfig::ReadSymbolTable(const MemoryBuffer& in,
const ElfSection& symtab_sect,
ElfSymtab& symtab,
Object& object,
const StringTable& strtab,
Section* sections[],
DiagnosticsEngine& diags) const
{
ElfSize symsize = symtab_sect.getEntSize();
if (symsize == 0)
{
diags.Report(SourceLocation(), diag::err_symbol_entity_size_zero);
return false;
}
unsigned long size = symtab_sect.getSize().getUInt();
// Symbol table always starts with null entry
symtab.push_back(SymbolRef(0));
ElfSymbolIndex index = 1;
for (unsigned long pos=symsize; pos<size; pos += symsize, ++index)
{
std::auto_ptr<ElfSymbol> elfsym(
new ElfSymbol(*this, in, symtab_sect, index, sections, diags));
if (diags.hasErrorOccurred())
return false;
SymbolRef sym = elfsym->CreateSymbol(object, strtab);
symtab.push_back(sym);
if (sym)
sym->AddAssocData(elfsym); // Associate symbol data with symbol
}
return true;
}