diff options
| -rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/StatepointLowering.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/StatepointLowering.h b/llvm/lib/CodeGen/SelectionDAG/StatepointLowering.h index 78cdc39db1f..422b634d917 100644 --- a/llvm/lib/CodeGen/SelectionDAG/StatepointLowering.h +++ b/llvm/lib/CodeGen/SelectionDAG/StatepointLowering.h @@ -47,9 +47,10 @@ public: /// spilled. Otherwise, the value has already been spilled and no /// further action is required by the caller. SDValue getLocation(SDValue Val) { - if (!Locations.count(Val)) + auto I = Locations.find(Val); + if (I == Locations.end()) return SDValue(); - return Locations[Val]; + return I->second; } void setLocation(SDValue Val, SDValue Location) { |

