diff options
| author | Craig Topper <craig.topper@gmail.com> | 2014-04-24 06:44:33 +0000 |
|---|---|---|
| committer | Craig Topper <craig.topper@gmail.com> | 2014-04-24 06:44:33 +0000 |
| commit | 353eda484cf0ddae4272a337d2a0e6b9c2e57c5f (patch) | |
| tree | 9d28747d86d0af4642a2fcb007136dfa01e2eed6 /llvm/lib/ExecutionEngine/Interpreter | |
| parent | 150a5f1dd3edef5f7ab39b326be954d3d8ef4acf (diff) | |
| download | bcm5719-llvm-353eda484cf0ddae4272a337d2a0e6b9c2e57c5f.tar.gz bcm5719-llvm-353eda484cf0ddae4272a337d2a0e6b9c2e57c5f.zip | |
[C++] Use 'nullptr'.
llvm-svn: 207083
Diffstat (limited to 'llvm/lib/ExecutionEngine/Interpreter')
| -rw-r--r-- | llvm/lib/ExecutionEngine/Interpreter/Execution.cpp | 2 | ||||
| -rw-r--r-- | llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp | 6 | ||||
| -rw-r--r-- | llvm/lib/ExecutionEngine/Interpreter/Interpreter.cpp | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/llvm/lib/ExecutionEngine/Interpreter/Execution.cpp b/llvm/lib/ExecutionEngine/Interpreter/Execution.cpp index a0a945be625..2275f57ab8e 100644 --- a/llvm/lib/ExecutionEngine/Interpreter/Execution.cpp +++ b/llvm/lib/ExecutionEngine/Interpreter/Execution.cpp @@ -897,7 +897,7 @@ void Interpreter::visitSwitchInst(SwitchInst &I) { GenericValue CondVal = getOperandValue(Cond, SF); // Check to see if any of the cases match... - BasicBlock *Dest = 0; + BasicBlock *Dest = nullptr; for (SwitchInst::CaseIt i = I.case_begin(), e = I.case_end(); i != e; ++i) { GenericValue CaseVal = getOperandValue(i.getCaseValue(), SF); if (executeICMP_EQ(CondVal, CaseVal, ElTy).IntVal != 0) { diff --git a/llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp b/llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp index a03c7f55968..671bbeea8d0 100644 --- a/llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp +++ b/llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp @@ -98,13 +98,13 @@ static ExFunc lookupFunction(const Function *F) { sys::ScopedLock Writer(*FunctionsLock); ExFunc FnPtr = FuncNames[ExtName]; - if (FnPtr == 0) + if (!FnPtr) FnPtr = FuncNames["lle_X_" + F->getName().str()]; - if (FnPtr == 0) // Try calling a generic function... if it exists... + if (!FnPtr) // Try calling a generic function... if it exists... FnPtr = (ExFunc)(intptr_t) sys::DynamicLibrary::SearchForAddressOfSymbol("lle_X_" + F->getName().str()); - if (FnPtr != 0) + if (FnPtr) ExportedFunctions->insert(std::make_pair(F, FnPtr)); // Cache for later return FnPtr; } diff --git a/llvm/lib/ExecutionEngine/Interpreter/Interpreter.cpp b/llvm/lib/ExecutionEngine/Interpreter/Interpreter.cpp index 6d4f6f716fc..c589457b670 100644 --- a/llvm/lib/ExecutionEngine/Interpreter/Interpreter.cpp +++ b/llvm/lib/ExecutionEngine/Interpreter/Interpreter.cpp @@ -38,7 +38,7 @@ ExecutionEngine *Interpreter::create(Module *M, std::string* ErrStr) { if (ErrStr) *ErrStr = EC.message(); // We got an error, just return 0 - return 0; + return nullptr; } return new Interpreter(M); |

