summaryrefslogtreecommitdiff
path: root/tools/bugpoint/BugDriver.h
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 /tools/bugpoint/BugDriver.h
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 'tools/bugpoint/BugDriver.h')
-rw-r--r--tools/bugpoint/BugDriver.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/tools/bugpoint/BugDriver.h b/tools/bugpoint/BugDriver.h
index 96e9fb9801..4c81cc2a2b 100644
--- a/tools/bugpoint/BugDriver.h
+++ b/tools/bugpoint/BugDriver.h
@@ -30,6 +30,7 @@ class Function;
class BasicBlock;
class AbstractInterpreter;
class Instruction;
+class LLVMContext;
class DebugCrashes;
@@ -42,6 +43,7 @@ extern bool DisableSimplifyCFG;
extern bool BugpointIsInterrupted;
class BugDriver {
+ LLVMContext* Context;
const std::string ToolName; // Name of bugpoint
std::string ReferenceOutputFile; // Name of `good' output file
Module *Program; // The raw program, linked together
@@ -60,10 +62,12 @@ class BugDriver {
public:
BugDriver(const char *toolname, bool as_child, bool find_bugs,
- unsigned timeout, unsigned memlimit);
+ unsigned timeout, unsigned memlimit, LLVMContext* ctxt);
const std::string &getToolName() const { return ToolName; }
+ LLVMContext* getContext() { return Context; }
+
// Set up methods... these methods are used to copy information about the
// command line arguments into instance variables of BugDriver.
//
@@ -290,7 +294,7 @@ private:
/// ParseInputFile - Given a bitcode or assembly input filename, parse and
/// return it, or return null if not possible.
///
-Module *ParseInputFile(const std::string &InputFilename);
+Module *ParseInputFile(const std::string &InputFilename, LLVMContext* ctxt);
/// getPassesString - Turn a list of passes into a string which indicates the