Make error message more useful.

llvm-svn: 129209
This commit is contained in:
Benjamin Kramer 2011-04-09 10:10:35 +00:00
parent 6bd36d56e4
commit 2792f2b86b
1 changed files with 2 additions and 2 deletions

View File

@ -293,7 +293,7 @@ loadSegment32(const MachOObject *Obj,
if (!STE)
return Error("unable to read symbol: '" + Twine(i) + "'");
if (STE->SectionIndex > Segment32LC->NumSections)
return Error("invalid section index for symbol: '" + Twine() + "'");
return Error("invalid section index for symbol: '" + Twine(i) + "'");
// Just skip symbols not defined in this section.
if ((unsigned)STE->SectionIndex - 1 != SectNum)
@ -372,7 +372,7 @@ loadSegment64(const MachOObject *Obj,
if (!STE)
return Error("unable to read symbol: '" + Twine(i) + "'");
if (STE->SectionIndex > Segment64LC->NumSections)
return Error("invalid section index for symbol: '" + Twine() + "'");
return Error("invalid section index for symbol: '" + Twine(i) + "'");
// Just skip symbols not defined in this section.
if ((unsigned)STE->SectionIndex - 1 != SectNum)