mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-24 04:25:22 +00:00
No need to keep size of DebugLocations vector separately.
llvm-svn: 63070
This commit is contained in:
parent
af1396e17b
commit
876e75cb70
@ -69,9 +69,6 @@ namespace llvm {
|
||||
/// DebugLocTracker - This class tracks debug location information.
|
||||
///
|
||||
struct DebugLocTracker {
|
||||
// NumDebugLocations - Size of the DebugLocations vector.
|
||||
unsigned NumDebugLocations;
|
||||
|
||||
// DebugLocations - A vector of unique DebugLocTuple's.
|
||||
//
|
||||
std::vector<DebugLocTuple> DebugLocations;
|
||||
@ -80,7 +77,7 @@ namespace llvm {
|
||||
// DebugLocations vector.
|
||||
DebugIdMapType DebugIdMap;
|
||||
|
||||
DebugLocTracker() : NumDebugLocations(0) {}
|
||||
DebugLocTracker() {}
|
||||
|
||||
~DebugLocTracker() {
|
||||
DebugLocations.clear();
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
Loading…
Reference in New Issue
Block a user