diff options
author | Craig Topper <craig.topper@gmail.com> | 2014-04-15 04:59:12 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@gmail.com> | 2014-04-15 04:59:12 +0000 |
commit | 9f008867c063919762189487e78bcb7ace2b256d (patch) | |
tree | a768a65bc7a91c59f5d98aadbb7d827fdeb30ccd /llvm/lib/Analysis/MemDepPrinter.cpp | |
parent | 4a7a0509102a0af018011d2708bf321fa6984596 (diff) | |
download | bcm5719-llvm-9f008867c063919762189487e78bcb7ace2b256d.tar.gz bcm5719-llvm-9f008867c063919762189487e78bcb7ace2b256d.zip |
[C++11] More 'nullptr' conversion. In some cases just using a boolean check instead of comparing to nullptr.
llvm-svn: 206243
Diffstat (limited to 'llvm/lib/Analysis/MemDepPrinter.cpp')
-rw-r--r-- | llvm/lib/Analysis/MemDepPrinter.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/llvm/lib/Analysis/MemDepPrinter.cpp b/llvm/lib/Analysis/MemDepPrinter.cpp index bc1dc69137d..10da3d5d618 100644 --- a/llvm/lib/Analysis/MemDepPrinter.cpp +++ b/llvm/lib/Analysis/MemDepPrinter.cpp @@ -46,7 +46,7 @@ namespace { bool runOnFunction(Function &F) override; - void print(raw_ostream &OS, const Module * = 0) const override; + void print(raw_ostream &OS, const Module * = nullptr) const override; void getAnalysisUsage(AnalysisUsage &AU) const override { AU.addRequiredTransitive<AliasAnalysis>(); @@ -56,7 +56,7 @@ namespace { void releaseMemory() override { Deps.clear(); - F = 0; + F = nullptr; } private: @@ -106,7 +106,7 @@ bool MemDepPrinter::runOnFunction(Function &F) { MemDepResult Res = MDA.getDependency(Inst); if (!Res.isNonLocal()) { Deps[Inst].insert(std::make_pair(getInstTypePair(Res), - static_cast<BasicBlock *>(0))); + static_cast<BasicBlock *>(nullptr))); } else if (CallSite CS = cast<Value>(Inst)) { const MemoryDependenceAnalysis::NonLocalDepInfo &NLDI = MDA.getNonLocalCallDependency(CS); @@ -122,8 +122,8 @@ bool MemDepPrinter::runOnFunction(Function &F) { if (LoadInst *LI = dyn_cast<LoadInst>(Inst)) { if (!LI->isUnordered()) { // FIXME: Handle atomic/volatile loads. - Deps[Inst].insert(std::make_pair(getInstTypePair(0, Unknown), - static_cast<BasicBlock *>(0))); + Deps[Inst].insert(std::make_pair(getInstTypePair(nullptr, Unknown), + static_cast<BasicBlock *>(nullptr))); continue; } AliasAnalysis::Location Loc = AA.getLocation(LI); @@ -131,8 +131,8 @@ bool MemDepPrinter::runOnFunction(Function &F) { } else if (StoreInst *SI = dyn_cast<StoreInst>(Inst)) { if (!SI->isUnordered()) { // FIXME: Handle atomic/volatile stores. - Deps[Inst].insert(std::make_pair(getInstTypePair(0, Unknown), - static_cast<BasicBlock *>(0))); + Deps[Inst].insert(std::make_pair(getInstTypePair(nullptr, Unknown), + static_cast<BasicBlock *>(nullptr))); continue; } AliasAnalysis::Location Loc = AA.getLocation(SI); |