mirror of
https://github.com/RPCSX/llvm.git
synced 2024-12-04 10:04:33 +00:00
llvm-cov: Further improved error messages.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196542 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
298c76540e
commit
7d3a11fd9f
@ -159,7 +159,8 @@ bool GCOVFunction::readGCNO(GCOVBuffer &Buff, GCOV::GCOVVersion Version) {
|
|||||||
uint32_t BlockNo;
|
uint32_t BlockNo;
|
||||||
if (!Buff.readInt(BlockNo)) return false;
|
if (!Buff.readInt(BlockNo)) return false;
|
||||||
if (BlockNo >= BlockCount) {
|
if (BlockNo >= BlockCount) {
|
||||||
errs() << "Unexpected block number (in " << Name << ").\n";
|
errs() << "Unexpected block number: " << BlockNo << " (in " << Name
|
||||||
|
<< ").\n";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
for (uint32_t i = 0, e = EdgeCount; i != e; ++i) {
|
for (uint32_t i = 0, e = EdgeCount; i != e; ++i) {
|
||||||
@ -181,7 +182,8 @@ bool GCOVFunction::readGCNO(GCOVBuffer &Buff, GCOV::GCOVVersion Version) {
|
|||||||
uint32_t BlockNo;
|
uint32_t BlockNo;
|
||||||
if (!Buff.readInt(BlockNo)) return false;
|
if (!Buff.readInt(BlockNo)) return false;
|
||||||
if (BlockNo >= BlockCount) {
|
if (BlockNo >= BlockCount) {
|
||||||
errs() << "Unexpected block number (in " << Name << ").\n";
|
errs() << "Unexpected block number: " << BlockNo << " (in " << Name
|
||||||
|
<< ").\n";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
GCOVBlock *Block = Blocks[BlockNo];
|
GCOVBlock *Block = Blocks[BlockNo];
|
||||||
@ -189,9 +191,9 @@ bool GCOVFunction::readGCNO(GCOVBuffer &Buff, GCOV::GCOVVersion Version) {
|
|||||||
while (Buff.getCursor() != (EndPos - 4)) {
|
while (Buff.getCursor() != (EndPos - 4)) {
|
||||||
StringRef F;
|
StringRef F;
|
||||||
if (!Buff.readString(F)) return false;
|
if (!Buff.readString(F)) return false;
|
||||||
if (F != Filename) {
|
if (Filename != F) {
|
||||||
errs() << "Multiple sources for a single basic block (in "
|
errs() << "Multiple sources for a single basic block: " << Filename
|
||||||
<< Name << ").\n";
|
<< " != " << F << " (in " << Name << ").\n";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (Buff.getCursor() == (EndPos - 4)) break;
|
if (Buff.getCursor() == (EndPos - 4)) break;
|
||||||
|
Loading…
Reference in New Issue
Block a user