aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/Bytecode/Archive.h
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2005-02-26 22:00:32 +0000
committerReid Spencer <rspencer@reidspencer.com>2005-02-26 22:00:32 +0000
commiteaa06bb9792f14628402da55caa554965f25e49c (patch)
treef5fb03b2b289584534b959462d7167b06a347321 /include/llvm/Bytecode/Archive.h
parent7ffc07dcf7a0afc5e70e799f26de75750a8008d5 (diff)
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
Diffstat (limited to 'include/llvm/Bytecode/Archive.h')
-rw-r--r--include/llvm/Bytecode/Archive.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/llvm/Bytecode/Archive.h b/include/llvm/Bytecode/Archive.h
index 102bb5c507..3805d0b249 100644
--- a/include/llvm/Bytecode/Archive.h
+++ b/include/llvm/Bytecode/Archive.h
@@ -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