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 | a148fdd8312c060c65bacf8fe61a6db5b2add6a5 (patch) | |
| tree | 9e5f714db4af7dddfab061cb0016489f6d114c56 /tools/bugpoint/BugDriver.cpp | |
| parent | a0619e843be1fcf8fba618ed93207cf5db42cc26 (diff) | |
| download | external_llvm-a148fdd8312c060c65bacf8fe61a6db5b2add6a5.zip external_llvm-a148fdd8312c060c65bacf8fe61a6db5b2add6a5.tar.gz external_llvm-a148fdd8312c060c65bacf8fe61a6db5b2add6a5.tar.bz2 | |
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 'tools/bugpoint/BugDriver.cpp')
| -rw-r--r-- | tools/bugpoint/BugDriver.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/bugpoint/BugDriver.cpp b/tools/bugpoint/BugDriver.cpp index 340522a..93b09fb 100644 --- a/tools/bugpoint/BugDriver.cpp +++ b/tools/bugpoint/BugDriver.cpp @@ -64,7 +64,8 @@ std::string llvm::getPassesString(const std::vector<const PassInfo*> &Passes) { } BugDriver::BugDriver(const char *toolname, bool as_child, bool find_bugs, - unsigned timeout, unsigned memlimit, LLVMContext* ctxt) + unsigned timeout, unsigned memlimit, + const LLVMContext& ctxt) : Context(ctxt), ToolName(toolname), ReferenceOutputFile(OutputFile), Program(0), Interpreter(0), SafeInterpreter(0), gcc(0), run_as_child(as_child), run_find_bugs(find_bugs), Timeout(timeout), @@ -74,7 +75,8 @@ BugDriver::BugDriver(const char *toolname, bool as_child, bool find_bugs, /// ParseInputFile - Given a bitcode or assembly input filename, parse and /// return it, or return null if not possible. /// -Module *llvm::ParseInputFile(const std::string &Filename, LLVMContext* Ctxt) { +Module *llvm::ParseInputFile(const std::string &Filename, + const LLVMContext& Ctxt) { std::auto_ptr<MemoryBuffer> Buffer(MemoryBuffer::getFileOrSTDIN(Filename)); Module *Result = 0; if (Buffer.get()) |
