Make error message more useful.
authorBenjamin Kramer <benny.kra@googlemail.com>
Sat, 9 Apr 2011 10:10:35 +0000 (10:10 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Sat, 9 Apr 2011 10:10:35 +0000 (10:10 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129209 91177308-0d34-0410-b5e6-96231b3b80d8

lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp

index 3c3030731e02fbe5a8f805d078417619ae5a2126..5084b9664d167d4b0041625c643a9bb2e371a90c 100644 (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)