diff options
author | Craig Topper <craig.topper@gmail.com> | 2014-04-25 04:24:47 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@gmail.com> | 2014-04-25 04:24:47 +0000 |
commit | 573faecacf5277b338f27c541c93c364ff284304 (patch) | |
tree | e240fe811c81316de881fab14446e6faeab052e4 /tools/opt | |
parent | ac16f0e024c5517c01692b6f7bb5a85616575f4f (diff) | |
download | llvm-573faecacf5277b338f27c541c93c364ff284304.tar.gz llvm-573faecacf5277b338f27c541c93c364ff284304.tar.bz2 llvm-573faecacf5277b338f27c541c93c364ff284304.tar.xz |
[C++] Use 'nullptr'. Tools edition.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207176 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/opt')
-rw-r--r-- | tools/opt/PrintSCC.cpp | 4 | ||||
-rw-r--r-- | tools/opt/opt.cpp | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/tools/opt/PrintSCC.cpp b/tools/opt/PrintSCC.cpp index cbc0a55996..d5d4336ea5 100644 --- a/tools/opt/PrintSCC.cpp +++ b/tools/opt/PrintSCC.cpp @@ -39,7 +39,7 @@ namespace { CFGSCC() : FunctionPass(ID) {} bool runOnFunction(Function& func) override; - void print(raw_ostream &O, const Module* = 0) const override { } + void print(raw_ostream &O, const Module* = nullptr) const override { } void getAnalysisUsage(AnalysisUsage &AU) const override { AU.setPreservesAll(); @@ -53,7 +53,7 @@ namespace { // run - Print out SCCs in the call graph for the specified module. bool runOnModule(Module &M) override; - void print(raw_ostream &O, const Module* = 0) const override { } + void print(raw_ostream &O, const Module* = nullptr) const override { } // getAnalysisUsage - This pass requires the CallGraph. void getAnalysisUsage(AnalysisUsage &AU) const override { diff --git a/tools/opt/opt.cpp b/tools/opt/opt.cpp index 006d4144d3..9b3ce9bdbe 100644 --- a/tools/opt/opt.cpp +++ b/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()) |