diff options
author | Owen Anderson <resistor@mac.com> | 2009-07-01 21:22:36 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2009-07-01 21:22:36 +0000 |
commit | 31895e73591d3c9ceae731a1274c8f56194b9616 (patch) | |
tree | 9e5f714db4af7dddfab061cb0016489f6d114c56 /lib/Debugger/Debugger.cpp | |
parent | fcd65ae28fe797c174be350a07955713fd42d110 (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 'lib/Debugger/Debugger.cpp')
-rw-r--r-- | lib/Debugger/Debugger.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Debugger/Debugger.cpp b/lib/Debugger/Debugger.cpp index dbfbbed1dc..61d8358d08 100644 --- a/lib/Debugger/Debugger.cpp +++ b/lib/Debugger/Debugger.cpp @@ -46,7 +46,8 @@ std::string Debugger::getProgramPath() const { } static Module * -getMaterializedModuleProvider(const std::string &Filename, LLVMContext* C) { +getMaterializedModuleProvider(const std::string &Filename, + const LLVMContext& C) { std::auto_ptr<MemoryBuffer> Buffer; Buffer.reset(MemoryBuffer::getFileOrSTDIN(Filename.c_str())); if (Buffer.get()) @@ -58,7 +59,7 @@ getMaterializedModuleProvider(const std::string &Filename, LLVMContext* C) { /// the PATH for the specified program, loading it when found. If the /// specified program cannot be found, an exception is thrown to indicate the /// error. -void Debugger::loadProgram(const std::string &Filename, LLVMContext* C) { +void Debugger::loadProgram(const std::string &Filename, const LLVMContext& C) { if ((Program = getMaterializedModuleProvider(Filename, C)) || (Program = getMaterializedModuleProvider(Filename+".bc", C))) return; // Successfully loaded the program. |