aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/System/Path.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-05-06 05:30:10 +0000
committerChris Lattner <sabre@nondot.org>2007-05-06 05:30:10 +0000
commit609083b9e035b1545cf75111c576fc32aa536d6d (patch)
tree26e23621d7c77d3ae68caa4f268f2928915baeab /include/llvm/System/Path.h
parentb958ba3761e12f99b89ad4feb33be95137f526c0 (diff)
add support for identifying bitcode files
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36845 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/System/Path.h')
-rw-r--r--include/llvm/System/Path.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/llvm/System/Path.h b/include/llvm/System/Path.h
index 04b5d95e1e..97876a3f81 100644
--- a/include/llvm/System/Path.h
+++ b/include/llvm/System/Path.h
@@ -313,6 +313,13 @@ namespace sys {
/// @brief Determine if the path references a bytecode file.
bool isBytecodeFile() const;
+ /// This function determines if the path name in the object references an
+ /// LLVM Bitcode file by looking at its magic number.
+ /// @returns true if the file starts with the magic number for LLVM
+ /// bitcode files.
+ /// @brief Determine if the path references a bitcode file.
+ bool isBitcodeFile() const;
+
/// This function determines if the path name in the object references a
/// native Dynamic Library (shared library, shared object) by looking at
/// the file's magic number. The Path object must reference a file, not a
@@ -615,6 +622,7 @@ namespace sys {
enum LLVMFileType {
Unknown_FileType = 0, ///< Unrecognized file
Bytecode_FileType, ///< Uncompressed bytecode file
+ Bitcode_FileType, ///< Bitcode file
CompressedBytecode_FileType, ///< Compressed bytecode file
Archive_FileType, ///< ar style archive file
ELF_Relocatable_FileType, ///< ELF Relocatable object file