summaryrefslogtreecommitdiff
path: root/include/llvm/Assembly
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2009-07-01 16:58:40 +0000
committerOwen Anderson <resistor@mac.com>2009-07-01 16:58:40 +0000
commit8b477ed579794ba6d76915d56b3f448a7dd20120 (patch)
tree70d3be97f6ecf1ab7962e6cfafd113f2f7ce2579 /include/llvm/Assembly
parent4fb75e542539153acaf31d9221845a7d0feccbf6 (diff)
downloadllvm-8b477ed579794ba6d76915d56b3f448a7dd20120.tar.gz
llvm-8b477ed579794ba6d76915d56b3f448a7dd20120.tar.bz2
llvm-8b477ed579794ba6d76915d56b3f448a7dd20120.tar.xz
Add a pointer to the owning LLVMContext to Module. This requires threading LLVMContext through a lot
of the bitcode reader and ASM parser APIs, as well as supporting it in all of the tools. Patches for Clang and LLVM-GCC to follow. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74614 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Assembly')
-rw-r--r--include/llvm/Assembly/Parser.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/include/llvm/Assembly/Parser.h b/include/llvm/Assembly/Parser.h
index e4a38e41b6..2a5bac7a70 100644
--- a/include/llvm/Assembly/Parser.h
+++ b/include/llvm/Assembly/Parser.h
@@ -21,6 +21,7 @@ namespace llvm {
class Module;
class ParseError;
class raw_ostream;
+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
@@ -30,7 +31,8 @@ class raw_ostream;
/// @brief Parse LLVM Assembly from a file
Module *ParseAssemblyFile(
const std::string &Filename, ///< The name of the file to parse
- ParseError &Error ///< If not null, an object to return errors in.
+ ParseError &Error, ///< If not null, an object to return errors in.
+ LLVMContext* Context ///< Context in which to allocate globals info.
);
/// The function is a secondary interface to the LLVM Assembly Parser. It parses
@@ -42,7 +44,8 @@ Module *ParseAssemblyFile(
Module *ParseAssemblyString(
const char *AsmString, ///< The string containing assembly
Module *M, ///< A module to add the assembly too.
- ParseError &Error ///< If not null, an object to return errors in.
+ ParseError &Error, ///< If not null, an object to return errors in.
+ LLVMContext* Context
);
//===------------------------------------------------------------------------===