BugDriver.h (193323) | BugDriver.h (195340) |
---|---|
1//===- BugDriver.h - Top-Level BugPoint class -------------------*- C++ -*-===// 2// 3// The LLVM Compiler Infrastructure 4// 5// This file is distributed under the University of Illinois Open Source 6// License. See LICENSE.TXT for details. 7// 8//===----------------------------------------------------------------------===// --- 16 unchanged lines hidden (view full) --- 25class Value; 26class PassInfo; 27class Module; 28class GlobalVariable; 29class Function; 30class BasicBlock; 31class AbstractInterpreter; 32class Instruction; | 1//===- BugDriver.h - Top-Level BugPoint class -------------------*- C++ -*-===// 2// 3// The LLVM Compiler Infrastructure 4// 5// This file is distributed under the University of Illinois Open Source 6// License. See LICENSE.TXT for details. 7// 8//===----------------------------------------------------------------------===// --- 16 unchanged lines hidden (view full) --- 25class Value; 26class PassInfo; 27class Module; 28class GlobalVariable; 29class Function; 30class BasicBlock; 31class AbstractInterpreter; 32class Instruction; |
33class LLVMContext; |
|
33 34class DebugCrashes; 35 36class GCC; 37 38extern bool DisableSimplifyCFG; 39 40/// BugpointIsInterrupted - Set to true when the user presses ctrl-c. 41/// 42extern bool BugpointIsInterrupted; 43 44class BugDriver { | 34 35class DebugCrashes; 36 37class GCC; 38 39extern bool DisableSimplifyCFG; 40 41/// BugpointIsInterrupted - Set to true when the user presses ctrl-c. 42/// 43extern bool BugpointIsInterrupted; 44 45class BugDriver { |
46 LLVMContext& Context; |
|
45 const std::string ToolName; // Name of bugpoint 46 std::string ReferenceOutputFile; // Name of `good' output file 47 Module *Program; // The raw program, linked together 48 std::vector<const PassInfo*> PassesToRun; 49 AbstractInterpreter *Interpreter; // How to run the program 50 AbstractInterpreter *SafeInterpreter; // To generate reference output, etc. 51 GCC *gcc; 52 bool run_as_child; 53 bool run_find_bugs; 54 unsigned Timeout; 55 unsigned MemoryLimit; 56 57 // FIXME: sort out public/private distinctions... 58 friend class ReducePassList; 59 friend class ReduceMisCodegenFunctions; 60 61public: 62 BugDriver(const char *toolname, bool as_child, bool find_bugs, | 47 const std::string ToolName; // Name of bugpoint 48 std::string ReferenceOutputFile; // Name of `good' output file 49 Module *Program; // The raw program, linked together 50 std::vector<const PassInfo*> PassesToRun; 51 AbstractInterpreter *Interpreter; // How to run the program 52 AbstractInterpreter *SafeInterpreter; // To generate reference output, etc. 53 GCC *gcc; 54 bool run_as_child; 55 bool run_find_bugs; 56 unsigned Timeout; 57 unsigned MemoryLimit; 58 59 // FIXME: sort out public/private distinctions... 60 friend class ReducePassList; 61 friend class ReduceMisCodegenFunctions; 62 63public: 64 BugDriver(const char *toolname, bool as_child, bool find_bugs, |
63 unsigned timeout, unsigned memlimit); | 65 unsigned timeout, unsigned memlimit, LLVMContext& ctxt); |
64 65 const std::string &getToolName() const { return ToolName; } 66 | 66 67 const std::string &getToolName() const { return ToolName; } 68 |
69 LLVMContext& getContext() { return Context; } 70 |
|
67 // Set up methods... these methods are used to copy information about the 68 // command line arguments into instance variables of BugDriver. 69 // 70 bool addSources(const std::vector<std::string> &FileNames); 71 template<class It> 72 void addPasses(It I, It E) { PassesToRun.insert(PassesToRun.end(), I, E); } 73 void setPassesToRun(const std::vector<const PassInfo*> &PTR) { 74 PassesToRun = PTR; --- 210 unchanged lines hidden (view full) --- 285 /// environment for executing LLVM programs. 286 /// 287 bool initializeExecutionEnvironment(); 288}; 289 290/// ParseInputFile - Given a bitcode or assembly input filename, parse and 291/// return it, or return null if not possible. 292/// | 71 // Set up methods... these methods are used to copy information about the 72 // command line arguments into instance variables of BugDriver. 73 // 74 bool addSources(const std::vector<std::string> &FileNames); 75 template<class It> 76 void addPasses(It I, It E) { PassesToRun.insert(PassesToRun.end(), I, E); } 77 void setPassesToRun(const std::vector<const PassInfo*> &PTR) { 78 PassesToRun = PTR; --- 210 unchanged lines hidden (view full) --- 289 /// environment for executing LLVM programs. 290 /// 291 bool initializeExecutionEnvironment(); 292}; 293 294/// ParseInputFile - Given a bitcode or assembly input filename, parse and 295/// return it, or return null if not possible. 296/// |
293Module *ParseInputFile(const std::string &InputFilename); | 297Module *ParseInputFile(const std::string &InputFilename, 298 LLVMContext& ctxt); |
294 295 296/// getPassesString - Turn a list of passes into a string which indicates the 297/// command line options that must be passed to add the passes. 298/// 299std::string getPassesString(const std::vector<const PassInfo*> &Passes); 300 301/// PrintFunctionList - prints out list of problematic functions --- 21 unchanged lines hidden --- | 299 300 301/// getPassesString - Turn a list of passes into a string which indicates the 302/// command line options that must be passed to add the passes. 303/// 304std::string getPassesString(const std::vector<const PassInfo*> &Passes); 305 306/// PrintFunctionList - prints out list of problematic functions --- 21 unchanged lines hidden --- |