From: Brian Gaeke Date: Tue, 11 Nov 2003 21:53:29 +0000 (+0000) Subject: Add prototypes for CheckMagic, IsArchive, and IsBytecode. X-Git-Url: http://plrg.eecs.uci.edu/git/?p=oota-llvm.git;a=commitdiff_plain;h=f33d00f0d8ffb41a57ce86672de5c3590903db01 Add prototypes for CheckMagic, IsArchive, and IsBytecode. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9900 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/Support/FileUtilities.h b/include/Support/FileUtilities.h index d55ba52a98a..0dfa6253621 100644 --- a/include/Support/FileUtilities.h +++ b/include/Support/FileUtilities.h @@ -17,8 +17,23 @@ #include -/// FileOpenable - Returns true IFF Filename names an existing regular -/// file which we can successfully open. +/// CheckMagic - Returns true IFF the file named FN begins with Magic. FN must +/// name a readable file. +/// +bool CheckMagic (const std::string &FN, const std::string &Magic); + +/// IsArchive - Returns true IFF the file named FN appears to be a "ar" library +/// archive. The file named FN must exist. +/// +bool IsArchive (const std::string &FN); + +/// IsBytecode - Returns true IFF the file named FN appears to be an LLVM +/// bytecode file. The file named FN must exist. +/// +bool IsBytecode (const std::string &FN); + +/// FileOpenable - Returns true IFF Filename names an existing regular file +/// which we can successfully open. /// bool FileOpenable (const std::string &Filename); diff --git a/include/llvm/Support/FileUtilities.h b/include/llvm/Support/FileUtilities.h index d55ba52a98a..0dfa6253621 100644 --- a/include/llvm/Support/FileUtilities.h +++ b/include/llvm/Support/FileUtilities.h @@ -17,8 +17,23 @@ #include -/// FileOpenable - Returns true IFF Filename names an existing regular -/// file which we can successfully open. +/// CheckMagic - Returns true IFF the file named FN begins with Magic. FN must +/// name a readable file. +/// +bool CheckMagic (const std::string &FN, const std::string &Magic); + +/// IsArchive - Returns true IFF the file named FN appears to be a "ar" library +/// archive. The file named FN must exist. +/// +bool IsArchive (const std::string &FN); + +/// IsBytecode - Returns true IFF the file named FN appears to be an LLVM +/// bytecode file. The file named FN must exist. +/// +bool IsBytecode (const std::string &FN); + +/// FileOpenable - Returns true IFF Filename names an existing regular file +/// which we can successfully open. /// bool FileOpenable (const std::string &Filename);