[llvm-commits] CVS: llvm/lib/Bytecode/Reader/ReaderWrappers.cpp
Reid Spencer
reid at x10sys.com
Sun Nov 14 17:20:57 PST 2004
Changes in directory llvm/lib/Bytecode/Reader:
ReaderWrappers.cpp updated: 1.34 -> 1.35
---
Log message:
Changes necessary to enable linking of archives without LLVM symbol tables.
---
Diffs of the changes: (+8 -7)
Index: llvm/lib/Bytecode/Reader/ReaderWrappers.cpp
diff -u llvm/lib/Bytecode/Reader/ReaderWrappers.cpp:1.34 llvm/lib/Bytecode/Reader/ReaderWrappers.cpp:1.35
--- llvm/lib/Bytecode/Reader/ReaderWrappers.cpp:1.34 Sun Nov 14 16:00:48 2004
+++ llvm/lib/Bytecode/Reader/ReaderWrappers.cpp Sun Nov 14 19:20:11 2004
@@ -391,26 +391,27 @@
}
}
-bool llvm::GetBytecodeSymbols(const unsigned char*Buffer, unsigned Length,
+ModuleProvider*
+llvm::GetBytecodeSymbols(const unsigned char*Buffer, unsigned Length,
const std::string& ModuleID,
std::vector<std::string>& symbols) {
try {
- std::auto_ptr<ModuleProvider>
- AMP(getBytecodeBufferModuleProvider(Buffer, Length, ModuleID));
+ ModuleProvider* MP =
+ getBytecodeBufferModuleProvider(Buffer, Length, ModuleID);
// Get the module from the provider
- Module* M = AMP->releaseModule();
+ Module* M = MP->materializeModule();
// Get the symbols
getSymbols(M, symbols);
// Done with the module
- delete M;
- return true;
+ return MP;
} catch (...) {
- return false;
+ // Fall through
}
+ return 0;
}
// vim: sw=2 ai
More information about the llvm-commits
mailing list