aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2004-11-28 03:13:02 +0000
committerReid Spencer <rspencer@reidspencer.com>2004-11-28 03:13:02 +0000
commit8dde18fc505c438041987a540977a240f258332e (patch)
tree1d139dd0dd10efa42177735e316f6d21ea9ca643
parent04cf0c29a2d8b8be997bf21d4571a797548b8849 (diff)
downloadexternal_llvm-8dde18fc505c438041987a540977a240f258332e.zip
external_llvm-8dde18fc505c438041987a540977a240f258332e.tar.gz
external_llvm-8dde18fc505c438041987a540977a240f258332e.tar.bz2
Compute the firstFileOffset correctly after reading the LLVM symbol table.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18300 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Archive/ArchiveReader.cpp5
-rw-r--r--lib/Bytecode/Archive/ArchiveReader.cpp5
2 files changed, 6 insertions, 4 deletions
diff --git a/lib/Archive/ArchiveReader.cpp b/lib/Archive/ArchiveReader.cpp
index 34413e5..34b36a6 100644
--- a/lib/Archive/ArchiveReader.cpp
+++ b/lib/Archive/ArchiveReader.cpp
@@ -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
diff --git a/lib/Bytecode/Archive/ArchiveReader.cpp b/lib/Bytecode/Archive/ArchiveReader.cpp
index 34413e5..34b36a6 100644
--- a/lib/Bytecode/Archive/ArchiveReader.cpp
+++ b/lib/Bytecode/Archive/ArchiveReader.cpp
@@ -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