From: Sanjoy Das Date: Fri, 5 Feb 2016 23:40:04 +0000 (+0000) Subject: [StatepointLower] Use None instead of Optional() X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=86d7d83f2a3967980c23e0f2438b7cc0c6c4ad08;p=platform%2Fupstream%2Fllvm.git [StatepointLower] Use None instead of Optional() llvm-svn: 259956 --- diff --git a/llvm/lib/CodeGen/SelectionDAG/StatepointLowering.cpp b/llvm/lib/CodeGen/SelectionDAG/StatepointLowering.cpp index edd0ca4..5b9c614 100644 --- a/llvm/lib/CodeGen/SelectionDAG/StatepointLowering.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/StatepointLowering.cpp @@ -125,7 +125,7 @@ static Optional findPreviousSpillSlot(const Value *Val, int LookUpDepth) { // Can not look any further - give up now if (LookUpDepth <= 0) - return Optional(); + return None; // Spill location is known for gc relocates if (const auto *Relocate = dyn_cast(Val)) { @@ -134,7 +134,7 @@ static Optional findPreviousSpillSlot(const Value *Val, auto It = SpillMap.find(Relocate->getDerivedPtr()); if (It == SpillMap.end()) - return Optional(); + return None; return It->second; } @@ -154,10 +154,10 @@ static Optional findPreviousSpillSlot(const Value *Val, Optional SpillSlot = findPreviousSpillSlot(IncomingValue, Builder, LookUpDepth - 1); if (!SpillSlot.hasValue()) - return Optional(); + return None; if (MergedResult.hasValue() && *MergedResult != *SpillSlot) - return Optional(); + return None; MergedResult = SpillSlot; } @@ -192,7 +192,7 @@ static Optional findPreviousSpillSlot(const Value *Val, // which we visit values is unspecified. // Don't know any information about this instruction - return Optional(); + return None; } /// Try to find existing copies of the incoming values in stack slots used for