Add writeAsBinary(raw_ostream &) method to BinaryRef.
[oota-llvm.git] / include / llvm / Assembly / Parser.h
index 6ab43825c87572612b6fcfa7ad9e0042eab5a474..b971c531ae05f72d2352fa30e8e0ba507a0da1c1 100644 (file)
@@ -19,9 +19,9 @@
 namespace llvm {
 
 class Module;
+class MemoryBuffer;
 class SMDiagnostic;
-class raw_ostream;
-struct LLVMContext;
+class LLVMContext;
 
 /// This function is the main interface to the LLVM Assembly Parser. It parses
 /// an ASCII file that (presumably) contains LLVM Assembly code. It returns a
@@ -48,6 +48,17 @@ Module *ParseAssemblyString(
   LLVMContext &Context
 );
 
+/// This function is the low-level interface to the LLVM Assembly Parser.
+/// ParseAssemblyFile and ParseAssemblyString are wrappers around this function.
+/// @brief Parse LLVM Assembly from a MemoryBuffer. This function *always*
+/// takes ownership of the MemoryBuffer.
+Module *ParseAssembly(
+    MemoryBuffer *F,     ///< The MemoryBuffer containing assembly
+    Module *M,           ///< A module to add the assembly too.
+    SMDiagnostic &Err,   ///< Error result info.
+    LLVMContext &Context
+);
+
 } // End llvm namespace
 
 #endif