/// 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;
// DebugLocations vector.
DebugIdMapType DebugIdMap;
- DebugLocTracker() : NumDebugLocations(0) {}
+ DebugLocTracker() {}
~DebugLocTracker() {
DebugLocations.clear();
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;
}
//===----------------------------------------------------------------------===//