mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-03-25 00:35:30 +00:00
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
This commit is contained in:
parent
8bca3b7664
commit
b9f66cfadf
@ -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…
x
Reference in New Issue
Block a user