diff options
-rw-r--r-- | include/Support/FileUtilities.h | 19 | ||||
-rw-r--r-- | include/llvm/Support/FileUtilities.h | 19 |
2 files changed, 34 insertions, 4 deletions
diff --git a/include/Support/FileUtilities.h b/include/Support/FileUtilities.h index d55ba52a98..0dfa625362 100644 --- a/include/Support/FileUtilities.h +++ b/include/Support/FileUtilities.h @@ -17,8 +17,23 @@ #include <string> -/// 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 d55ba52a98..0dfa625362 100644 --- a/include/llvm/Support/FileUtilities.h +++ b/include/llvm/Support/FileUtilities.h @@ -17,8 +17,23 @@ #include <string> -/// 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); |