diff options
author | Craig Topper <craig.topper@gmail.com> | 2014-05-20 04:30:07 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@gmail.com> | 2014-05-20 04:30:07 +0000 |
commit | 255429432153a5e1d9f3db7af5b0f6ba9ae0f485 (patch) | |
tree | 205ae1fbcc923e652d14e648078bdec7730ae020 /clang/lib/Analysis/LiveVariables.cpp | |
parent | 5fe0a42ae91f720fefe487541bb6af67027be5d1 (diff) | |
download | bcm5719-llvm-255429432153a5e1d9f3db7af5b0f6ba9ae0f485.tar.gz bcm5719-llvm-255429432153a5e1d9f3db7af5b0f6ba9ae0f485.zip |
[C++11] Use 'nullptr'. Analysis edition.
llvm-svn: 209191
Diffstat (limited to 'clang/lib/Analysis/LiveVariables.cpp')
-rw-r--r-- | clang/lib/Analysis/LiveVariables.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/clang/lib/Analysis/LiveVariables.cpp b/clang/lib/Analysis/LiveVariables.cpp index b26d4fb3703..3d6fc039fd7 100644 --- a/clang/lib/Analysis/LiveVariables.cpp +++ b/clang/lib/Analysis/LiveVariables.cpp @@ -72,7 +72,7 @@ void DataflowWorklist::sortWorklist() { const CFGBlock *DataflowWorklist::dequeue() { if (worklist.empty()) - return 0; + return nullptr; const CFGBlock *b = worklist.pop_back_val(); enqueuedBlocks[b->getBlockID()] = false; return b; @@ -94,10 +94,10 @@ public: LiveVariables::LivenessValues merge(LiveVariables::LivenessValues valsA, LiveVariables::LivenessValues valsB); - - LiveVariables::LivenessValues runOnBlock(const CFGBlock *block, - LiveVariables::LivenessValues val, - LiveVariables::Observer *obs = 0); + + LiveVariables::LivenessValues + runOnBlock(const CFGBlock *block, LiveVariables::LivenessValues val, + LiveVariables::Observer *obs = nullptr); void dumpBlockLiveness(const SourceManager& M); @@ -224,8 +224,8 @@ static const VariableArrayType *FindVA(QualType Ty) { ty = VT->getElementType().getTypePtr(); } - - return 0; + + return nullptr; } static const Stmt *LookThroughStmt(const Stmt *S) { @@ -291,7 +291,7 @@ void TransferFunctions::Visit(Stmt *S) { const DeclStmt *DS = cast<DeclStmt>(S); if (const VarDecl *VD = dyn_cast<VarDecl>(DS->getSingleDecl())) { for (const VariableArrayType* VA = FindVA(VD->getType()); - VA != 0; VA = FindVA(VA->getElementType())) { + VA != nullptr; VA = FindVA(VA->getElementType())) { AddLiveStmt(val.liveStmts, LV.SSetFact, VA->getSizeExpr()); } } @@ -384,8 +384,8 @@ void TransferFunctions::VisitDeclStmt(DeclStmt *DS) { void TransferFunctions::VisitObjCForCollectionStmt(ObjCForCollectionStmt *OS) { // Kill the iteration variable. - DeclRefExpr *DR = 0; - const VarDecl *VD = 0; + DeclRefExpr *DR = nullptr; + const VarDecl *VD = nullptr; Stmt *element = OS->getElement(); if (DeclStmt *DS = dyn_cast<DeclStmt>(element)) { @@ -493,12 +493,12 @@ LiveVariables::computeLiveness(AnalysisDeclContext &AC, // No CFG? Bail out. CFG *cfg = AC.getCFG(); if (!cfg) - return 0; + return nullptr; // The analysis currently has scalability issues for very large CFGs. // Bail out if it looks too large. if (cfg->getNumBlockIDs() > 300000) - return 0; + return nullptr; LiveVariablesImpl *LV = new LiveVariablesImpl(AC, killAtAssign); |