aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen
diff options
context:
space:
mode:
Diffstat (limited to 'lib/CodeGen')
-rw-r--r--lib/CodeGen/LiveIntervalAnalysis.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/CodeGen/LiveIntervalAnalysis.h b/lib/CodeGen/LiveIntervalAnalysis.h
index 4e2cbeba0b..bb324e3c79 100644
--- a/lib/CodeGen/LiveIntervalAnalysis.h
+++ b/lib/CodeGen/LiveIntervalAnalysis.h
@@ -95,8 +95,9 @@ namespace llvm {
virtual bool runOnMachineFunction(MachineFunction&);
LiveInterval& getInterval(unsigned reg) {
- assert(r2iMap_.count(reg)&& "Interval does not exist for register");
- return *r2iMap_.find(reg)->second;
+ Reg2IntervalMap::iterator I = r2iMap_.find(reg);
+ assert(I != r2iMap_.end()&& "Interval does not exist for register");
+ return *I->second;
}
/// getInstructionIndex - returns the base index of instr