aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/Assembly/Parser.h
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2009-09-02 17:18:19 +0000
committerDan Gohman <gohman@apple.com>2009-09-02 17:18:19 +0000
commit2ec5fe524c6ab957524fa02422b026cfe168d948 (patch)
treecd6d88f5b95a397f6220aca1e69cfca836fdb46b /include/llvm/Assembly/Parser.h
parent3445d9a72aec68512df265705e2be7704496f541 (diff)
downloadexternal_llvm-2ec5fe524c6ab957524fa02422b026cfe168d948.zip
external_llvm-2ec5fe524c6ab957524fa02422b026cfe168d948.tar.gz
external_llvm-2ec5fe524c6ab957524fa02422b026cfe168d948.tar.bz2
Refactor common code from ParseAssemblyString and ParseAssemblyFile,
to expose a low-level interface for parsing from an existing MemoryBuffer. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80803 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Assembly/Parser.h')
-rw-r--r--include/llvm/Assembly/Parser.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/llvm/Assembly/Parser.h b/include/llvm/Assembly/Parser.h
index 966abaa..dc790b0 100644
--- a/include/llvm/Assembly/Parser.h
+++ b/include/llvm/Assembly/Parser.h
@@ -19,6 +19,7 @@
namespace llvm {
class Module;
+class MemoryBuffer;
class SMDiagnostic;
class raw_ostream;
class LLVMContext;
@@ -48,6 +49,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.
+Module *ParseAssembly(
+ MemoryBuffer *F, ///< The MemoryBuffer containing assembly
+ const std::string &Name, ///< The name of the original source file
+ Module *M, ///< A module to add the assembly too.
+ SMDiagnostic &Err, ///< Error result info.
+ LLVMContext &Context
+);
+
} // End llvm namespace
#endif