X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=include%2Fllvm%2FAssembly%2FParser.h;h=b971c531ae05f72d2352fa30e8e0ba507a0da1c1;hb=639adc59f86d0526dbace4a1ecc4924c6c52e1cd;hp=6ab43825c87572612b6fcfa7ad9e0042eab5a474;hpb=48b2f3e4850cd27d54224cd42da8a160d6b95984;p=oota-llvm.git diff --git a/include/llvm/Assembly/Parser.h b/include/llvm/Assembly/Parser.h index 6ab43825c87..b971c531ae0 100644 --- a/include/llvm/Assembly/Parser.h +++ b/include/llvm/Assembly/Parser.h @@ -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