diff options
author | Stephen Hines <srhines@google.com> | 2014-05-29 02:49:00 -0700 |
---|---|---|
committer | Stephen Hines <srhines@google.com> | 2014-05-29 02:49:00 -0700 |
commit | dce4a407a24b04eebc6a376f8e62b41aaa7b071f (patch) | |
tree | dcebc53f2b182f145a2e659393bf9a0472cedf23 /tools/bugpoint | |
parent | 220b921aed042f9e520c26cffd8282a94c66c3d5 (diff) | |
download | external_llvm-dce4a407a24b04eebc6a376f8e62b41aaa7b071f.zip external_llvm-dce4a407a24b04eebc6a376f8e62b41aaa7b071f.tar.gz external_llvm-dce4a407a24b04eebc6a376f8e62b41aaa7b071f.tar.bz2 |
Update LLVM for 3.5 rebase (r209712).
Change-Id: I149556c940fb7dc92d075273c87ff584f400941f
Diffstat (limited to 'tools/bugpoint')
-rw-r--r-- | tools/bugpoint/BugDriver.cpp | 14 | ||||
-rw-r--r-- | tools/bugpoint/BugDriver.h | 6 | ||||
-rw-r--r-- | tools/bugpoint/CrashDebugger.cpp | 9 | ||||
-rw-r--r-- | tools/bugpoint/ExecutionDriver.cpp | 8 | ||||
-rw-r--r-- | tools/bugpoint/ExtractFunction.cpp | 24 | ||||
-rw-r--r-- | tools/bugpoint/FindBugs.cpp | 2 | ||||
-rw-r--r-- | tools/bugpoint/Miscompilation.cpp | 6 | ||||
-rw-r--r-- | tools/bugpoint/OptimizerDriver.cpp | 16 | ||||
-rw-r--r-- | tools/bugpoint/ToolRunner.cpp | 37 | ||||
-rw-r--r-- | tools/bugpoint/ToolRunner.h | 16 | ||||
-rw-r--r-- | tools/bugpoint/bugpoint.cpp | 2 |
11 files changed, 76 insertions, 64 deletions
diff --git a/tools/bugpoint/BugDriver.cpp b/tools/bugpoint/BugDriver.cpp index 2d1b903..cecccbe 100644 --- a/tools/bugpoint/BugDriver.cpp +++ b/tools/bugpoint/BugDriver.cpp @@ -70,12 +70,16 @@ BugDriver::BugDriver(const char *toolname, bool find_bugs, unsigned timeout, unsigned memlimit, bool use_valgrind, LLVMContext& ctxt) : Context(ctxt), ToolName(toolname), ReferenceOutputFile(OutputFile), - Program(0), Interpreter(0), SafeInterpreter(0), gcc(0), - run_find_bugs(find_bugs), Timeout(timeout), + Program(nullptr), Interpreter(nullptr), SafeInterpreter(nullptr), + gcc(nullptr), run_find_bugs(find_bugs), Timeout(timeout), MemoryLimit(memlimit), UseValgrind(use_valgrind) {} BugDriver::~BugDriver() { delete Program; + if (Interpreter != SafeInterpreter) + delete Interpreter; + delete SafeInterpreter; + delete gcc; } @@ -112,18 +116,18 @@ Module *llvm::ParseInputFile(const std::string &Filename, // parsed), and false on success. // bool BugDriver::addSources(const std::vector<std::string> &Filenames) { - assert(Program == 0 && "Cannot call addSources multiple times!"); + assert(!Program && "Cannot call addSources multiple times!"); assert(!Filenames.empty() && "Must specify at least on input filename!"); // Load the first input file. Program = ParseInputFile(Filenames[0], Context); - if (Program == 0) return true; + if (!Program) return true; outs() << "Read input file : '" << Filenames[0] << "'\n"; for (unsigned i = 1, e = Filenames.size(); i != e; ++i) { std::unique_ptr<Module> M(ParseInputFile(Filenames[i], Context)); - if (M.get() == 0) return true; + if (!M.get()) return true; outs() << "Linking in input file: '" << Filenames[i] << "'\n"; std::string ErrorMessage; diff --git a/tools/bugpoint/BugDriver.h b/tools/bugpoint/BugDriver.h index c01bbe5..3169d29 100644 --- a/tools/bugpoint/BugDriver.h +++ b/tools/bugpoint/BugDriver.h @@ -202,7 +202,7 @@ public: const std::string &BitcodeFile = "", const std::string &SharedObj = "", bool RemoveBitcode = false, - std::string *Error = 0) const; + std::string *Error = nullptr) const; /// EmitProgressBitcode - This function is used to output M to a file named /// "bugpoint-ID.bc". @@ -244,7 +244,7 @@ public: /// this method will never return null. Module *runPassesOn(Module *M, const std::vector<std::string> &Passes, bool AutoDebugCrashes = false, unsigned NumExtraArgs = 0, - const char * const *ExtraArgs = NULL); + const char * const *ExtraArgs = nullptr); /// runPasses - Run the specified passes on Program, outputting a bitcode /// file and writting the filename into OutputFile if successful. If the @@ -259,7 +259,7 @@ public: const std::vector<std::string> &PassesToRun, std::string &OutputFilename, bool DeleteOutput = false, bool Quiet = false, unsigned NumExtraArgs = 0, - const char * const *ExtraArgs = NULL) const; + const char * const *ExtraArgs = nullptr) const; /// runManyPasses - Take the specified pass list and create different /// combinations of passes to compile the program with. Compile the program with diff --git a/tools/bugpoint/CrashDebugger.cpp b/tools/bugpoint/CrashDebugger.cpp index bdaa6c9..8bd61b3 100644 --- a/tools/bugpoint/CrashDebugger.cpp +++ b/tools/bugpoint/CrashDebugger.cpp @@ -63,7 +63,7 @@ ReducePassList::doTest(std::vector<std::string> &Prefix, std::vector<std::string> &Suffix, std::string &Error) { std::string PrefixOutput; - Module *OrigProgram = 0; + Module *OrigProgram = nullptr; if (!Prefix.empty()) { outs() << "Checking to see if these passes crash: " << getPassesString(Prefix) << ": "; @@ -73,7 +73,7 @@ ReducePassList::doTest(std::vector<std::string> &Prefix, OrigProgram = BD.Program; BD.Program = ParseInputFile(PrefixOutput, BD.getContext()); - if (BD.Program == 0) { + if (BD.Program == nullptr) { errs() << BD.getToolName() << ": Error reading bitcode file '" << PrefixOutput << "'!\n"; exit(1); @@ -149,7 +149,7 @@ ReduceCrashingGlobalVariables::TestGlobalVariables( for (Module::global_iterator I = M->global_begin(), E = M->global_end(); I != E; ++I) if (I->hasInitializer() && !GVSet.count(I)) { - I->setInitializer(0); + I->setInitializer(nullptr); I->setLinkage(GlobalValue::ExternalLinkage); } @@ -410,6 +410,7 @@ bool ReduceCrashingInstructions::TestInsts(std::vector<const Instruction*> // Verify that this is still valid. PassManager Passes; Passes.add(createVerifierPass()); + Passes.add(createDebugInfoVerifierPass()); Passes.run(*M); // Try running on the hacked up program... @@ -446,7 +447,7 @@ static bool DebugACrash(BugDriver &BD, for (Module::global_iterator I = M->global_begin(), E = M->global_end(); I != E; ++I) if (I->hasInitializer()) { - I->setInitializer(0); + I->setInitializer(nullptr); I->setLinkage(GlobalValue::ExternalLinkage); DeletedInit = true; } diff --git a/tools/bugpoint/ExecutionDriver.cpp b/tools/bugpoint/ExecutionDriver.cpp index 609de03..5ed7d2c 100644 --- a/tools/bugpoint/ExecutionDriver.cpp +++ b/tools/bugpoint/ExecutionDriver.cpp @@ -145,7 +145,7 @@ bool BugDriver::initializeExecutionEnvironment() { // Create an instance of the AbstractInterpreter interface as specified on // the command line - SafeInterpreter = 0; + SafeInterpreter = nullptr; std::string Message; switch (InterpreterSel) { @@ -256,7 +256,7 @@ bool BugDriver::initializeExecutionEnvironment() { if (!gcc) { outs() << Message << "\nExiting.\n"; exit(1); } // If there was an error creating the selected interpreter, quit with error. - return Interpreter == 0; + return Interpreter == nullptr; } /// compileProgram - Try to compile the specified module, returning false and @@ -298,7 +298,7 @@ std::string BugDriver::executeProgram(const Module *Program, const std::string &SharedObj, AbstractInterpreter *AI, std::string *Error) const { - if (AI == 0) AI = Interpreter; + if (!AI) AI = Interpreter; assert(AI && "Interpreter should have been created already!"); bool CreatedBitcode = false; if (BitcodeFile.empty()) { @@ -445,7 +445,7 @@ bool BugDriver::diffProgram(const Module *Program, std::string *ErrMsg) const { // Execute the program, generating an output file... std::string Output( - executeProgram(Program, "", BitcodeFile, SharedObject, 0, ErrMsg)); + executeProgram(Program, "", BitcodeFile, SharedObject, nullptr, ErrMsg)); if (!ErrMsg->empty()) return false; diff --git a/tools/bugpoint/ExtractFunction.cpp b/tools/bugpoint/ExtractFunction.cpp index 8bcae8a..38cdf24 100644 --- a/tools/bugpoint/ExtractFunction.cpp +++ b/tools/bugpoint/ExtractFunction.cpp @@ -34,6 +34,8 @@ #include <set> using namespace llvm; +#define DEBUG_TYPE "bugpoint" + namespace llvm { bool DisableSimplifyCFG = false; extern cl::opt<std::string> OutputPrefix; @@ -49,7 +51,7 @@ namespace { Function* globalInitUsesExternalBA(GlobalVariable* GV) { if (!GV->hasInitializer()) - return 0; + return nullptr; Constant *I = GV->getInitializer(); @@ -76,7 +78,7 @@ namespace { Todo.push_back(C); } } - return 0; + return nullptr; } } // end anonymous namespace @@ -148,7 +150,7 @@ Module *BugDriver::performFinalCleanups(Module *M, bool MayModifySemantics) { CleanupPasses.push_back("deadargelim"); Module *New = runPassesOn(M, CleanupPasses); - if (New == 0) { + if (!New) { errs() << "Final cleanups failed. Sorry. :( Please report a bug!\n"; return M; } @@ -165,11 +167,11 @@ Module *BugDriver::ExtractLoop(Module *M) { LoopExtractPasses.push_back("loop-extract-single"); Module *NewM = runPassesOn(M, LoopExtractPasses); - if (NewM == 0) { + if (!NewM) { outs() << "*** Loop extraction failed: "; EmitProgressBitcode(M, "loopextraction", true); outs() << "*** Sorry. :( Please report a bug!\n"; - return 0; + return nullptr; } // Check to see if we created any new functions. If not, no loops were @@ -178,7 +180,7 @@ Module *BugDriver::ExtractLoop(Module *M) { static unsigned NumExtracted = 32; if (M->size() == NewM->size() || --NumExtracted == 0) { delete NewM; - return 0; + return nullptr; } else { assert(M->size() < NewM->size() && "Loop extract removed functions?"); Module::iterator MI = NewM->begin(); @@ -335,10 +337,10 @@ llvm::SplitFunctionsOutOfModule(Module *M, << "' and from test function '" << TestFn->getName() << "'.\n"; exit(1); } - I->setInitializer(0); // Delete the initializer to make it external + I->setInitializer(nullptr); // Delete the initializer to make it external } else { // If we keep it in the safe module, then delete it in the test module - GV->setInitializer(0); + GV->setInitializer(nullptr); } } @@ -370,7 +372,7 @@ Module *BugDriver::ExtractMappedBlocksFromModule(const outs() << "*** Basic Block extraction failed!\n"; errs() << "Error creating temporary file: " << EC.message() << "\n"; EmitProgressBitcode(M, "basicblockextractfail", true); - return 0; + return nullptr; } sys::RemoveFileOnSignal(Filename); @@ -389,7 +391,7 @@ Module *BugDriver::ExtractMappedBlocksFromModule(const errs() << "Error writing list of blocks to not extract\n"; EmitProgressBitcode(M, "basicblockextractfail", true); BlocksToNotExtractFile.os().clear_error(); - return 0; + return nullptr; } BlocksToNotExtractFile.keep(); @@ -403,7 +405,7 @@ Module *BugDriver::ExtractMappedBlocksFromModule(const sys::fs::remove(Filename.c_str()); - if (Ret == 0) { + if (!Ret) { outs() << "*** Basic Block extraction failed, please report a bug!\n"; EmitProgressBitcode(M, "basicblockextractfail", true); } diff --git a/tools/bugpoint/FindBugs.cpp b/tools/bugpoint/FindBugs.cpp index e2941f6..a0c859b 100644 --- a/tools/bugpoint/FindBugs.cpp +++ b/tools/bugpoint/FindBugs.cpp @@ -45,7 +45,7 @@ bool BugDriver::runManyPasses(const std::vector<std::string> &AllPasses, return false; } - srand(time(NULL)); + srand(time(nullptr)); unsigned num = 1; while(1) { diff --git a/tools/bugpoint/Miscompilation.cpp b/tools/bugpoint/Miscompilation.cpp index fecae60..f5936ac 100644 --- a/tools/bugpoint/Miscompilation.cpp +++ b/tools/bugpoint/Miscompilation.cpp @@ -235,7 +235,7 @@ static Module *TestMergedProgram(const BugDriver &BD, Module *M1, Module *M2, if (!Error.empty()) { // Delete the linked module delete M1; - return NULL; + return nullptr; } return M1; } @@ -592,7 +592,7 @@ static bool ExtractBlocks(BugDriver &BD, MiscompiledFunctions, VMap); Module *Extracted = BD.ExtractMappedBlocksFromModule(Blocks, ToExtract); - if (Extracted == 0) { + if (!Extracted) { // Weird, extraction should have worked. errs() << "Nondeterministic problem extracting blocks??\n"; delete ProgClone; @@ -845,7 +845,7 @@ static void CleanupAndPrepareModules(BugDriver &BD, Module *&Test, Safe->getOrInsertFunction("getPointerToNamedFunction", Type::getInt8PtrTy(Safe->getContext()), Type::getInt8PtrTy(Safe->getContext()), - (Type *)0); + (Type *)nullptr); // Use the function we just added to get addresses of functions we need. for (Module::iterator F = Safe->begin(), E = Safe->end(); F != E; ++F) { diff --git a/tools/bugpoint/OptimizerDriver.cpp b/tools/bugpoint/OptimizerDriver.cpp index f91f493..b2722e6 100644 --- a/tools/bugpoint/OptimizerDriver.cpp +++ b/tools/bugpoint/OptimizerDriver.cpp @@ -36,6 +36,8 @@ using namespace llvm; +#define DEBUG_TYPE "bugpoint" + namespace llvm { extern cl::opt<std::string> OutputPrefix; } @@ -194,7 +196,7 @@ bool BugDriver::runPasses(Module *Program, Args.push_back(InputFilename.c_str()); for (unsigned i = 0; i < NumExtraArgs; ++i) Args.push_back(*ExtraArgs); - Args.push_back(0); + Args.push_back(nullptr); DEBUG(errs() << "\nAbout to run:\t"; for (unsigned i = 0, e = Args.size()-1; i != e; ++i) @@ -210,12 +212,12 @@ bool BugDriver::runPasses(Module *Program, // Redirect stdout and stderr to nowhere if SilencePasses is given StringRef Nowhere; - const StringRef *Redirects[3] = {0, &Nowhere, &Nowhere}; + const StringRef *Redirects[3] = {nullptr, &Nowhere, &Nowhere}; std::string ErrMsg; - int result = sys::ExecuteAndWait(Prog, Args.data(), 0, - (SilencePasses ? Redirects : 0), Timeout, - MemoryLimit, &ErrMsg); + int result = sys::ExecuteAndWait(Prog, Args.data(), nullptr, + (SilencePasses ? Redirects : nullptr), + Timeout, MemoryLimit, &ErrMsg); // If we are supposed to delete the bitcode file or if the passes crashed, // remove it now. This may fail if the file was never created, but that's ok. @@ -262,11 +264,11 @@ Module *BugDriver::runPassesOn(Module *M, EmitProgressBitcode(M, "pass-error", false); exit(debugOptimizerCrash()); } - return 0; + return nullptr; } Module *Ret = ParseInputFile(BitcodeResult, Context); - if (Ret == 0) { + if (!Ret) { errs() << getToolName() << ": Error reading bitcode file '" << BitcodeResult << "'!\n"; exit(1); diff --git a/tools/bugpoint/ToolRunner.cpp b/tools/bugpoint/ToolRunner.cpp index f0fb4bf..c481b03 100644 --- a/tools/bugpoint/ToolRunner.cpp +++ b/tools/bugpoint/ToolRunner.cpp @@ -11,7 +11,6 @@ // //===----------------------------------------------------------------------===// -#define DEBUG_TYPE "toolrunner" #include "ToolRunner.h" #include "llvm/Config/config.h" // for HAVE_LINK_R #include "llvm/Support/CommandLine.h" @@ -24,6 +23,8 @@ #include <sstream> using namespace llvm; +#define DEBUG_TYPE "toolrunner" + namespace llvm { cl::opt<bool> SaveTemps("save-temps", cl::init(false), cl::desc("Save temporary files")); @@ -61,7 +62,7 @@ static int RunProgramWithTimeout(StringRef ProgramPath, StringRef StdErrFile, unsigned NumSeconds = 0, unsigned MemoryLimit = 0, - std::string *ErrMsg = 0) { + std::string *ErrMsg = nullptr) { const StringRef *Redirects[3] = { &StdInFile, &StdOutFile, &StdErrFile }; #if 0 // For debug purposes @@ -73,7 +74,7 @@ static int RunProgramWithTimeout(StringRef ProgramPath, } #endif - return sys::ExecuteAndWait(ProgramPath, Args, 0, Redirects, + return sys::ExecuteAndWait(ProgramPath, Args, nullptr, Redirects, NumSeconds, MemoryLimit, ErrMsg); } @@ -102,7 +103,7 @@ static int RunProgramRemotelyWithTimeout(StringRef RemoteClientPath, #endif // Run the program remotely with the remote client - int ReturnCode = sys::ExecuteAndWait(RemoteClientPath, Args, 0, + int ReturnCode = sys::ExecuteAndWait(RemoteClientPath, Args, nullptr, Redirects, NumSeconds, MemoryLimit); // Has the remote client fail? @@ -218,7 +219,7 @@ int LLI::ExecuteProgram(const std::string &Bitcode, // Add optional parameters to the running program from Argv for (unsigned i=0, e = Args.size(); i != e; ++i) LLIArgs.push_back(Args[i].c_str()); - LLIArgs.push_back(0); + LLIArgs.push_back(nullptr); outs() << "<lli>"; outs().flush(); DEBUG(errs() << "\nAbout to run:\t"; @@ -276,7 +277,7 @@ AbstractInterpreter *AbstractInterpreter::createLLI(const char *Argv0, } Message = "Cannot find `lli' in executable directory!\n"; - return 0; + return nullptr; } //===---------------------------------------------------------------------===// @@ -327,7 +328,7 @@ void CustomCompiler::compileProgram(const std::string &Bitcode, for (std::size_t i = 0; i < CompilerArgs.size(); ++i) ProgramArgs.push_back(CompilerArgs.at(i).c_str()); ProgramArgs.push_back(Bitcode.c_str()); - ProgramArgs.push_back(0); + ProgramArgs.push_back(nullptr); // Add optional parameters to the running program from Argv for (unsigned i = 0, e = CompilerArgs.size(); i != e; ++i) @@ -384,7 +385,7 @@ int CustomExecutor::ExecuteProgram(const std::string &Bitcode, for (std::size_t i = 0; i < ExecutorArgs.size(); ++i) ProgramArgs.push_back(ExecutorArgs.at(i).c_str()); ProgramArgs.push_back(Bitcode.c_str()); - ProgramArgs.push_back(0); + ProgramArgs.push_back(nullptr); // Add optional parameters to the running program from Argv for (unsigned i = 0, e = Args.size(); i != e; ++i) @@ -447,7 +448,7 @@ AbstractInterpreter *AbstractInterpreter::createCustomCompiler( std::vector<std::string> Args; lexCommand(Message, CompileCommandLine, CmdPath, Args); if (CmdPath.empty()) - return 0; + return nullptr; return new CustomCompiler(CmdPath, Args); } @@ -463,7 +464,7 @@ AbstractInterpreter *AbstractInterpreter::createCustomExecutor( std::vector<std::string> Args; lexCommand(Message, ExecCommandLine, CmdPath, Args); if (CmdPath.empty()) - return 0; + return nullptr; return new CustomExecutor(CmdPath, Args); } @@ -498,7 +499,7 @@ GCC::FileType LLC::OutputCode(const std::string &Bitcode, if (UseIntegratedAssembler) LLCArgs.push_back("-filetype=obj"); - LLCArgs.push_back (0); + LLCArgs.push_back (nullptr); outs() << (UseIntegratedAssembler ? "<llc-ia>" : "<llc>"); outs().flush(); @@ -558,7 +559,7 @@ LLC *AbstractInterpreter::createLLC(const char *Argv0, PrependMainExecutablePath("llc", Argv0, (void *)(intptr_t) & createLLC); if (LLCPath.empty()) { Message = "Cannot find `llc' in executable directory!\n"; - return 0; + return nullptr; } GCC *gcc = GCC::create(Message, GCCBinary, GCCArgs); @@ -624,7 +625,7 @@ int JIT::ExecuteProgram(const std::string &Bitcode, // Add optional parameters to the running program from Argv for (unsigned i=0, e = Args.size(); i != e; ++i) JITArgs.push_back(Args[i].c_str()); - JITArgs.push_back(0); + JITArgs.push_back(nullptr); outs() << "<jit>"; outs().flush(); DEBUG(errs() << "\nAbout to run:\t"; @@ -650,7 +651,7 @@ AbstractInterpreter *AbstractInterpreter::createJIT(const char *Argv0, } Message = "Cannot find `lli' in executable directory!\n"; - return 0; + return nullptr; } //===---------------------------------------------------------------------===// @@ -736,7 +737,7 @@ int GCC::ExecuteProgram(const std::string &ProgramFile, #endif if (TargetTriple.getArch() == Triple::sparc) GCCArgs.push_back("-mcpu=v9"); - GCCArgs.push_back(0); // NULL terminator + GCCArgs.push_back(nullptr); // NULL terminator outs() << "<gcc>"; outs().flush(); DEBUG(errs() << "\nAbout to run:\t"; @@ -785,7 +786,7 @@ int GCC::ExecuteProgram(const std::string &ProgramFile, // Add optional parameters to the running program from Argv for (unsigned i = 0, e = Args.size(); i != e; ++i) ProgramArgs.push_back(Args[i].c_str()); - ProgramArgs.push_back(0); // NULL terminator + ProgramArgs.push_back(nullptr); // NULL terminator // Now that we have a binary, run it! outs() << "<program>"; outs().flush(); @@ -884,7 +885,7 @@ int GCC::MakeSharedObject(const std::string &InputFile, FileType fileType, // command line, so this should be safe. for (unsigned i = 0, e = ArgsForGCC.size(); i != e; ++i) GCCArgs.push_back(ArgsForGCC[i].c_str()); - GCCArgs.push_back(0); // NULL terminator + GCCArgs.push_back(nullptr); // NULL terminator @@ -909,7 +910,7 @@ GCC *GCC::create(std::string &Message, std::string GCCPath = sys::FindProgramByName(GCCBinary); if (GCCPath.empty()) { Message = "Cannot find `"+ GCCBinary +"' in PATH!\n"; - return 0; + return nullptr; } std::string RemoteClientPath; diff --git a/tools/bugpoint/ToolRunner.h b/tools/bugpoint/ToolRunner.h index 38a5835..6e7b95c 100644 --- a/tools/bugpoint/ToolRunner.h +++ b/tools/bugpoint/ToolRunner.h @@ -63,7 +63,7 @@ public: FileType fileType, const std::string &InputFile, const std::string &OutputFile, - std::string *Error = 0, + std::string *Error = nullptr, const std::vector<std::string> &GCCArgs = std::vector<std::string>(), unsigned Timeout = 0, @@ -89,15 +89,17 @@ class AbstractInterpreter { public: static LLC *createLLC(const char *Argv0, std::string &Message, const std::string &GCCBinary, - const std::vector<std::string> *Args = 0, - const std::vector<std::string> *GCCArgs = 0, + const std::vector<std::string> *Args = nullptr, + const std::vector<std::string> *GCCArgs = nullptr, bool UseIntegratedAssembler = false); - static AbstractInterpreter* createLLI(const char *Argv0, std::string &Message, - const std::vector<std::string> *Args=0); + static AbstractInterpreter* + createLLI(const char *Argv0, std::string &Message, + const std::vector<std::string> *Args = nullptr); - static AbstractInterpreter* createJIT(const char *Argv0, std::string &Message, - const std::vector<std::string> *Args=0); + static AbstractInterpreter* + createJIT(const char *Argv0, std::string &Message, + const std::vector<std::string> *Args = nullptr); static AbstractInterpreter* createCustomCompiler(std::string &Message, diff --git a/tools/bugpoint/bugpoint.cpp b/tools/bugpoint/bugpoint.cpp index 5c03b41..c7dae0f 100644 --- a/tools/bugpoint/bugpoint.cpp +++ b/tools/bugpoint/bugpoint.cpp @@ -99,7 +99,7 @@ namespace { class AddToDriver : public FunctionPassManager { BugDriver &D; public: - AddToDriver(BugDriver &_D) : FunctionPassManager(0), D(_D) {} + AddToDriver(BugDriver &_D) : FunctionPassManager(nullptr), D(_D) {} void add(Pass *P) override { const void *ID = P->getPassID(); |