summaryrefslogtreecommitdiffstats
path: root/llvm/tools/opt/opt.cpp
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@gmail.com>2014-04-25 04:24:47 +0000
committerCraig Topper <craig.topper@gmail.com>2014-04-25 04:24:47 +0000
commite6cb63e471c56fa7e90916ec81da76a2604e388f (patch)
treed28cb6c8432d2e14d395d098272faa726a0cd01b /llvm/tools/opt/opt.cpp
parent409ac186bb7724c93d76db93b17ad6b1fdeea234 (diff)
downloadbcm5719-llvm-e6cb63e471c56fa7e90916ec81da76a2604e388f.tar.gz
bcm5719-llvm-e6cb63e471c56fa7e90916ec81da76a2604e388f.zip
[C++] Use 'nullptr'. Tools edition.
llvm-svn: 207176
Diffstat (limited to 'llvm/tools/opt/opt.cpp')
-rw-r--r--llvm/tools/opt/opt.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/tools/opt/opt.cpp b/llvm/tools/opt/opt.cpp
index 006d4144d37..9b3ce9bdbec 100644
--- a/llvm/tools/opt/opt.cpp
+++ b/llvm/tools/opt/opt.cpp
@@ -295,7 +295,7 @@ static TargetMachine* GetTargetMachine(Triple TheTriple) {
Error);
// Some modules don't specify a triple, and this is okay.
if (!TheTarget) {
- return 0;
+ return nullptr;
}
// Package up features to be passed to target/subtarget
@@ -373,7 +373,7 @@ int main(int argc, char **argv) {
std::unique_ptr<Module> M;
M.reset(ParseIRFile(InputFilename, Err, Context));
- if (M.get() == 0) {
+ if (!M.get()) {
Err.print(argv[0], errs());
return 1;
}
@@ -453,7 +453,7 @@ int main(int argc, char **argv) {
Passes.add(new DataLayoutPass(M.get()));
Triple ModuleTriple(M->getTargetTriple());
- TargetMachine *Machine = 0;
+ TargetMachine *Machine = nullptr;
if (ModuleTriple.getArch())
Machine = GetTargetMachine(Triple(ModuleTriple));
std::unique_ptr<TargetMachine> TM(Machine);
@@ -537,7 +537,7 @@ int main(int argc, char **argv) {
}
const PassInfo *PassInf = PassList[i];
- Pass *P = 0;
+ Pass *P = nullptr;
if (PassInf->getTargetMachineCtor())
P = PassInf->getTargetMachineCtor()(TM.get());
else if (PassInf->getNormalCtor())
OpenPOWER on IntegriCloud