Make ModRefBehavior a lattice. Use this to clean up AliasAnalysis
[oota-llvm.git] / include / llvm / Bitcode / ReaderWriter.h
index 45eb801a8c031a38e9b18887e6c0c7cfe161fb0b..fa754c014621f52af5698561d1718ae014f24bca 100644 (file)
@@ -33,6 +33,15 @@ namespace llvm {
                                LLVMContext& Context,
                                std::string *ErrMsg = 0);
 
+  /// getBitcodeTargetTriple - Read the header of the specified bitcode
+  /// buffer and extract just the triple information. If successful,
+  /// this returns a string and *does not* take ownership
+  /// of 'buffer'. On error, this returns "", and fills in *ErrMsg
+  /// if ErrMsg is non-null.
+  std::string getBitcodeTargetTriple(MemoryBuffer *Buffer,
+                                     LLVMContext& Context,
+                                     std::string *ErrMsg = 0);
+
   /// ParseBitcodeFile - Read the specified bitcode file, returning the module.
   /// If an error occurs, this returns null and fills in *ErrMsg if it is
   /// non-null.  This method *never* takes ownership of Buffer.
@@ -40,7 +49,8 @@ namespace llvm {
                            std::string *ErrMsg = 0);
 
   /// WriteBitcodeToFile - Write the specified module to the specified
-  /// raw output stream.
+  /// raw output stream.  For streams where it matters, the given stream
+  /// should be in "binary" mode.
   void WriteBitcodeToFile(const Module *M, raw_ostream &Out);
 
   /// WriteBitcodeToStream - Write the specified module to the specified