Compute the firstFileOffset correctly after reading the LLVM symbol table.
authorReid Spencer <rspencer@reidspencer.com>
Sun, 28 Nov 2004 03:13:02 +0000 (03:13 +0000)
committerReid Spencer <rspencer@reidspencer.com>
Sun, 28 Nov 2004 03:13:02 +0000 (03:13 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18300 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Archive/ArchiveReader.cpp
lib/Bytecode/Archive/ArchiveReader.cpp

index 34413e53bd255c5a608811700ac7a3d90dfcc8c0..34b36a6f38a8d0ae84be96485b53108aae06e0c2 100644 (file)
@@ -354,9 +354,10 @@ Archive::loadSymbolTable() {
   // See if its the symbol table
   if (mbr->isLLVMSymbolTable()) {
     parseSymbolTable(mbr->getData(), mbr->getSize());
-    FirstFile = At + mbr->getSize();
+    At += mbr->getSize();
     if ((intptr_t(At) & 1) == 1)
-      FirstFile++;
+      At++;
+    FirstFile = At;
   } else {
     // There's no symbol table in the file. We have to rebuild it from scratch
     // because the intent of this method is to get the symbol table loaded so 
index 34413e53bd255c5a608811700ac7a3d90dfcc8c0..34b36a6f38a8d0ae84be96485b53108aae06e0c2 100644 (file)
@@ -354,9 +354,10 @@ Archive::loadSymbolTable() {
   // See if its the symbol table
   if (mbr->isLLVMSymbolTable()) {
     parseSymbolTable(mbr->getData(), mbr->getSize());
-    FirstFile = At + mbr->getSize();
+    At += mbr->getSize();
     if ((intptr_t(At) & 1) == 1)
-      FirstFile++;
+      At++;
+    FirstFile = At;
   } else {
     // There's no symbol table in the file. We have to rebuild it from scratch
     // because the intent of this method is to get the symbol table loaded so