summaryrefslogtreecommitdiffstats
path: root/llvm/lib/ExecutionEngine/TargetSelect.cpp
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@gmail.com>2014-04-15 06:32:26 +0000
committerCraig Topper <craig.topper@gmail.com>2014-04-15 06:32:26 +0000
commit2617dccea2721fd74677f0a7bcf5a768238421d0 (patch)
treead5ee2efaff543d7da11f1599bdabb6588d1c1dd /llvm/lib/ExecutionEngine/TargetSelect.cpp
parentd82d4cc3567e896fad35372adba9a676c7776cd0 (diff)
downloadbcm5719-llvm-2617dccea2721fd74677f0a7bcf5a768238421d0.tar.gz
bcm5719-llvm-2617dccea2721fd74677f0a7bcf5a768238421d0.zip
[C++11] More 'nullptr' conversion. In some cases just using a boolean check instead of comparing to nullptr.
llvm-svn: 206252
Diffstat (limited to 'llvm/lib/ExecutionEngine/TargetSelect.cpp')
-rw-r--r--llvm/lib/ExecutionEngine/TargetSelect.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/ExecutionEngine/TargetSelect.cpp b/llvm/lib/ExecutionEngine/TargetSelect.cpp
index 9b7d3489790..b10d51f6486 100644
--- a/llvm/lib/ExecutionEngine/TargetSelect.cpp
+++ b/llvm/lib/ExecutionEngine/TargetSelect.cpp
@@ -47,7 +47,7 @@ TargetMachine *EngineBuilder::selectTarget(const Triple &TargetTriple,
TheTriple.setTriple(sys::getProcessTriple());
// Adjust the triple to match what the user requested.
- const Target *TheTarget = 0;
+ const Target *TheTarget = nullptr;
if (!MArch.empty()) {
for (TargetRegistry::iterator it = TargetRegistry::begin(),
ie = TargetRegistry::end(); it != ie; ++it) {
@@ -61,7 +61,7 @@ TargetMachine *EngineBuilder::selectTarget(const Triple &TargetTriple,
if (ErrorStr)
*ErrorStr = "No available targets are compatible with this -march, "
"see -version for the available targets.\n";
- return 0;
+ return nullptr;
}
// Adjust the triple to match (if known), otherwise stick with the
@@ -72,10 +72,10 @@ TargetMachine *EngineBuilder::selectTarget(const Triple &TargetTriple,
} else {
std::string Error;
TheTarget = TargetRegistry::lookupTarget(TheTriple.getTriple(), Error);
- if (TheTarget == 0) {
+ if (!TheTarget) {
if (ErrorStr)
*ErrorStr = Error;
- return 0;
+ return nullptr;
}
}
OpenPOWER on IntegriCloud