Implement an isBytecodeArchive method to determine if an archive contains

bytecode file members or not.
Patch Contributed By Adam Treat


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20338 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Reid Spencer
2005-02-26 22:00:32 +00:00
parent 7ffc07dcf7
commit eaa06bb979
3 changed files with 67 additions and 0 deletions

View File

@ -414,6 +414,15 @@ class Archive {
std::set<std::string>& symbols, ///< Symbols to be sought
std::set<ModuleProvider*>& modules ///< The modules matching \p symbols
);
/// This method determines whether the archive is a properly formed llvm
/// bytecode archive. It first makes sure the symbol table has been loaded
/// and has a non-zero size. If it does, then it is an archive. If not,
/// then it tries to load all the bytecode modules of the archive. Finally,
/// it returns whether it was successfull.
/// @returns true if the archive is a proper llvm bytecode archive
/// @brief Determine whether the archive is a proper llvm bytecode archive.
bool isBytecodeArchive();
/// @}
/// @name Mutators