[llvm-commits] CVS: llvm/lib/Bytecode/Archive/ArchiveReader.cpp
Reid Spencer
reid at x10sys.com
Wed Nov 17 10:25:32 PST 2004
Changes in directory llvm/lib/Bytecode/Archive:
ArchiveReader.cpp updated: 1.26 -> 1.27
---
Log message:
Make sure we parse bytecode with a module identifier that reflects the full
name of the module: "Archive.a(object.o)"
---
Diffs of the changes: (+9 -3)
Index: llvm/lib/Bytecode/Archive/ArchiveReader.cpp
diff -u llvm/lib/Bytecode/Archive/ArchiveReader.cpp:1.26 llvm/lib/Bytecode/Archive/ArchiveReader.cpp:1.27
--- llvm/lib/Bytecode/Archive/ArchiveReader.cpp:1.26 Wed Nov 17 10:13:11 2004
+++ llvm/lib/Bytecode/Archive/ArchiveReader.cpp Wed Nov 17 12:25:21 2004
@@ -282,8 +282,10 @@
for (iterator I=begin(), E=end(); I != E; ++I) {
if (I->isBytecode() || I->isCompressedBytecode()) {
+ std::string FullMemberName = archPath.get() +
+ "(" + I->getPath().get() + ")";
Module* M = ParseBytecodeBuffer((const unsigned char*)I->getData(),
- I->getSize(), I->getPath().get(), ErrMessage);
+ I->getSize(), FullMemberName, ErrMessage);
if (!M)
return true;
@@ -391,9 +393,11 @@
ArchiveMember* mbr = parseMemberHeader(modptr, base + mapfile->size());
// Now, load the bytecode module to get the ModuleProvider
+ std::string FullMemberName = archPath.get() + "(" +
+ mbr->getPath().get() + ")";
ModuleProvider* mp = getBytecodeBufferModuleProvider(
(const unsigned char*) mbr->getData(), mbr->getSize(),
- mbr->getPath().get(), 0);
+ FullMemberName, 0);
modules.insert(std::make_pair(fileOffset,std::make_pair(mp,mbr)));
@@ -428,8 +432,10 @@
if (mbr->isBytecode() || mbr->isCompressedBytecode()) {
// Get the symbols
std::vector<std::string> symbols;
+ std::string FullMemberName = archPath.get() + "(" +
+ mbr->getPath().get() + ")";
ModuleProvider* MP = GetBytecodeSymbols((const unsigned char*)At,
- mbr->getSize(), mbr->getPath().get(),symbols);
+ mbr->getSize(), FullMemberName, symbols);
if (MP) {
// Insert the module's symbols into the symbol table
More information about the llvm-commits
mailing list