aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/MachineFunction.cpp
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2009-01-26 23:47:30 +0000
committerEvan Cheng <evan.cheng@apple.com>2009-01-26 23:47:30 +0000
commitb9f66cfadf6b1551192ee4a6e9b70f564c5ed8be (patch)
treec51e825ce7e4351b6a0c8e22610ced618db3359d /lib/CodeGen/MachineFunction.cpp
parent8bca3b76646ab19a69d8d50d3dcad9f2c82159bd (diff)
No need to keep size of DebugLocations vector separately.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63070 91177308-0d34-0410-b5e6-96231b3b80d8
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;
}
//===----------------------------------------------------------------------===//