[llvm] r259956 - [StatepointLower] Use None instead of Optional<int>()

Sanjoy Das via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 5 15:40:05 PST 2016


Author: sanjoy
Date: Fri Feb  5 17:40:04 2016
New Revision: 259956

URL: http://llvm.org/viewvc/llvm-project?rev=259956&view=rev
Log:
[StatepointLower] Use None instead of Optional<int>()

Modified:
    llvm/trunk/lib/CodeGen/SelectionDAG/StatepointLowering.cpp

Modified: llvm/trunk/lib/CodeGen/SelectionDAG/StatepointLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/StatepointLowering.cpp?rev=259956&r1=259955&r2=259956&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/StatepointLowering.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/StatepointLowering.cpp Fri Feb  5 17:40:04 2016
@@ -125,7 +125,7 @@ static Optional<int> findPreviousSpillSl
                                            int LookUpDepth) {
   // Can not look any further - give up now
   if (LookUpDepth <= 0)
-    return Optional<int>();
+    return None;
 
   // Spill location is known for gc relocates
   if (const auto *Relocate = dyn_cast<GCRelocateInst>(Val)) {
@@ -134,7 +134,7 @@ static Optional<int> findPreviousSpillSl
 
     auto It = SpillMap.find(Relocate->getDerivedPtr());
     if (It == SpillMap.end())
-      return Optional<int>();
+      return None;
 
     return It->second;
   }
@@ -154,10 +154,10 @@ static Optional<int> findPreviousSpillSl
       Optional<int> SpillSlot =
           findPreviousSpillSlot(IncomingValue, Builder, LookUpDepth - 1);
       if (!SpillSlot.hasValue())
-        return Optional<int>();
+        return None;
 
       if (MergedResult.hasValue() && *MergedResult != *SpillSlot)
-        return Optional<int>();
+        return None;
 
       MergedResult = SpillSlot;
     }
@@ -192,7 +192,7 @@ static Optional<int> findPreviousSpillSl
   // which we visit values is unspecified.
 
   // Don't know any information about this instruction
-  return Optional<int>();
+  return None;
 }
 
 /// Try to find existing copies of the incoming values in stack slots used for




More information about the llvm-commits mailing list