summaryrefslogtreecommitdiffstats
path: root/llvm/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
commitb8c79bdc3124d8cf382c63545942d6c50d14e2d9 (patch)
tree328813384fe602eca57ba73cdcaae6e648cc14b9 /llvm/lib/CodeGen/MachineFunction.cpp
parent7a88d1fcc4f3aeb9d705ac30611280252b1d9124 (diff)
downloadbcm5719-llvm-b8c79bdc3124d8cf382c63545942d6c50d14e2d9.tar.gz
bcm5719-llvm-b8c79bdc3124d8cf382c63545942d6c50d14e2d9.zip
No need to keep size of DebugLocations vector separately.
llvm-svn: 63070
Diffstat (limited to 'llvm/lib/CodeGen/MachineFunction.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineFunction.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/MachineFunction.cpp b/llvm/lib/CodeGen/MachineFunction.cpp
index c1ab9afe9f6..abd84ecbd5c 100644
--- a/llvm/lib/CodeGen/MachineFunction.cpp
+++ b/llvm/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;
}
//===----------------------------------------------------------------------===//
OpenPOWER on IntegriCloud