From 8b477ed579794ba6d76915d56b3f448a7dd20120 Mon Sep 17 00:00:00 2001 From: Owen Anderson Date: Wed, 1 Jul 2009 16:58:40 +0000 Subject: 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 --- include/llvm/Assembly/Parser.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'include/llvm/Assembly') diff --git a/include/llvm/Assembly/Parser.h b/include/llvm/Assembly/Parser.h index e4a38e4..2a5bac7 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 ); //===------------------------------------------------------------------------=== -- cgit v1.1