aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/MachineFunction.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/CodeGen/MachineFunction.cpp')
-rw-r--r--lib/CodeGen/MachineFunction.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/CodeGen/MachineFunction.cpp b/lib/CodeGen/MachineFunction.cpp
index c1ab9afe9f..abd84ecbd5 100644
--- a/lib/CodeGen/MachineFunction.cpp
+++ b/lib/CodeGen/MachineFunction.cpp
@@ -388,9 +388,10 @@ unsigned MachineFunction::lookUpDebugLocId(unsigned Src, unsigned Line,
if (II != DebugLocInfo.DebugIdMap.end())
return II->second;
// Add a new tuple.
+ unsigned Id = DebugLocInfo.DebugLocations.size();
DebugLocInfo.DebugLocations.push_back(Tuple);
- DebugLocInfo.DebugIdMap[Tuple] = DebugLocInfo.NumDebugLocations;
- return DebugLocInfo.NumDebugLocations++;
+ DebugLocInfo.DebugIdMap[Tuple] = Id;
+ return Id;
}
//===----------------------------------------------------------------------===//