aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/Module.h
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2009-07-01 21:22:36 +0000
committerOwen Anderson <resistor@mac.com>2009-07-01 21:22:36 +0000
commit31895e73591d3c9ceae731a1274c8f56194b9616 (patch)
tree9e5f714db4af7dddfab061cb0016489f6d114c56 /include/llvm/Module.h
parentfcd65ae28fe797c174be350a07955713fd42d110 (diff)
Hold the LLVMContext by reference rather than by pointer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74640 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Module.h')
-rw-r--r--include/llvm/Module.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/llvm/Module.h b/include/llvm/Module.h
index 8370ffb872..8efa8e0e0e 100644
--- a/include/llvm/Module.h
+++ b/include/llvm/Module.h
@@ -110,7 +110,7 @@ public:
/// @name Member Variables
/// @{
private:
- LLVMContext* Context; ///< The LLVMContext from which types and
+ const LLVMContext& Context; ///< The LLVMContext from which types and
///< constants are allocated.
GlobalListType GlobalList; ///< The Global Variables in the module
FunctionListType FunctionList; ///< The Functions in the module
@@ -131,7 +131,7 @@ private:
public:
/// The Module constructor. Note that there is no default constructor. You
/// must provide a name for the module upon construction.
- explicit Module(const std::string &ModuleID, LLVMContext* C);
+ explicit Module(const std::string &ModuleID, const LLVMContext& C);
/// The module destructor. This will dropAllReferences.
~Module();
@@ -162,7 +162,7 @@ public:
/// Get the global data context.
/// @returns LLVMContext - a container for LLVM's global information
- LLVMContext* getContext() const { return Context; }
+ const LLVMContext& getContext() const { return Context; }
/// Get any module-scope inline assembly blocks.
/// @returns a string containing the module-scope inline assembly blocks.