[C++11] More 'nullptr' conversion. In some cases just using a boolean check instead of comparing to nullptr.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206252 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Craig Topper
2014-04-15 06:32:26 +00:00
parent eb19b8f58b
commit 0b6cb7104b
73 changed files with 461 additions and 456 deletions

View File

@ -181,7 +181,7 @@ public:
/// freeMachineCodeForFunction works.
static ExecutionEngine *create(Module *M,
bool ForceInterpreter = false,
std::string *ErrorStr = 0,
std::string *ErrorStr = nullptr,
CodeGenOpt::Level OptLevel =
CodeGenOpt::Default,
bool GVsWithCode = true);
@ -193,8 +193,8 @@ public:
/// Clients should make sure to initialize targets prior to calling this
/// function.
static ExecutionEngine *createJIT(Module *M,
std::string *ErrorStr = 0,
JITMemoryManager *JMM = 0,
std::string *ErrorStr = nullptr,
JITMemoryManager *JMM = nullptr,
CodeGenOpt::Level OptLevel =
CodeGenOpt::Default,
bool GVsWithCode = true,
@ -411,7 +411,7 @@ public:
}
// The JIT overrides a version that actually does this.
virtual void runJITOnFunction(Function *, MachineCodeInfo * = 0) { }
virtual void runJITOnFunction(Function *, MachineCodeInfo * = nullptr) { }
/// getGlobalValueAtAddress - Return the LLVM global value object that starts
/// at the specified address.
@ -478,7 +478,7 @@ public:
}
/// Return the target machine (if available).
virtual TargetMachine *getTargetMachine() { return NULL; }
virtual TargetMachine *getTargetMachine() { return nullptr; }
/// DisableLazyCompilation - When lazy compilation is off (the default), the
/// JIT will eagerly compile every function reachable from the argument to
@ -576,10 +576,10 @@ private:
/// InitEngine - Does the common initialization of default options.
void InitEngine() {
WhichEngine = EngineKind::Either;
ErrorStr = NULL;
ErrorStr = nullptr;
OptLevel = CodeGenOpt::Default;
MCJMM = NULL;
JMM = NULL;
MCJMM = nullptr;
JMM = nullptr;
Options = TargetOptions();
AllocateGVsWithCode = false;
RelocModel = Reloc::Default;
@ -610,7 +610,7 @@ public:
/// the setJITMemoryManager() option.
EngineBuilder &setMCJITMemoryManager(RTDyldMemoryManager *mcjmm) {
MCJMM = mcjmm;
JMM = NULL;
JMM = nullptr;
return *this;
}
@ -622,7 +622,7 @@ public:
/// memory manager. This option defaults to NULL. This option overrides
/// setMCJITMemoryManager() as well.
EngineBuilder &setJITMemoryManager(JITMemoryManager *jmm) {
MCJMM = NULL;
MCJMM = nullptr;
JMM = jmm;
return *this;
}