Minor change: Methods that return ValueSet's that are guaranteed to be valid
return references instead of pointers.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1719 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/InstrSched/SchedPriorities.cpp b/lib/CodeGen/InstrSched/SchedPriorities.cpp
index 74f6599..fed3f94 100644
--- a/lib/CodeGen/InstrSched/SchedPriorities.cpp
+++ b/lib/CodeGen/InstrSched/SchedPriorities.cpp
@@ -276,16 +276,14 @@
   // else check if instruction is a last use and save it in the hash_map
   bool hasLastUse = false;
   const BasicBlock* bb = graphNode->getBB();
-  const ValueSet *liveVars =
-    methodLiveVarInfo.getLiveVarSetBeforeMInst(minstr, bb);
+  const ValueSet &LVs = methodLiveVarInfo.getLiveVarSetBeforeMInst(minstr, bb);
   
-  for (MachineInstr::val_const_op_iterator vo(minstr); ! vo.done(); ++vo)
-    if (liveVars->find(*vo) == liveVars->end()) {
+  for (MachineInstr::val_const_op_iterator vo(minstr); !vo.done(); ++vo)
+    if (!LVs.count(*vo)) {
       hasLastUse = true;
       break;
     }
-  
-  lastUseMap[minstr] = hasLastUse;
-  return hasLastUse;
+
+  return lastUseMap[minstr] = hasLastUse;
 }