[llvm-commits] CVS: llvm/include/llvm/System/Path.h

Chris Lattner sabre at nondot.org
Sat May 5 22:30:28 PDT 2007



Changes in directory llvm/include/llvm/System:

Path.h updated: 1.57 -> 1.58
---
Log message:

add support for identifying bitcode files


---
Diffs of the changes:  (+8 -0)

 Path.h |    8 ++++++++
 1 files changed, 8 insertions(+)


Index: llvm/include/llvm/System/Path.h
diff -u llvm/include/llvm/System/Path.h:1.57 llvm/include/llvm/System/Path.h:1.58
--- llvm/include/llvm/System/Path.h:1.57	Thu May  3 13:14:56 2007
+++ llvm/include/llvm/System/Path.h	Sun May  6 00:30:10 2007
@@ -313,6 +313,13 @@
       /// @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 @@
   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






More information about the llvm-commits mailing list