Skip to content

Commit

Permalink
[LiveDebugValues] Replace several lines of code with operator[].
Browse files Browse the repository at this point in the history
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257114 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
vonosmas committed Jan 7, 2016
1 parent 3d7142a commit a1505f1
Showing 1 changed file with 2 additions and 16 deletions.
18 changes: 2 additions & 16 deletions lib/CodeGen/LiveDebugValues.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -235,14 +235,7 @@ void LiveDebugValues::transferTerminatorInst(MachineInstr &MI,
if (OpenRanges.empty())
return;

if (OutLocs.find(CurMBB) == OutLocs.end()) {
// Create space for new Outgoing locs entries.
VarLocList VLL;
OutLocs.insert(std::make_pair(CurMBB, std::move(VLL)));
}
auto OL = OutLocs.find(CurMBB);
assert(OL != OutLocs.end());
VarLocList &VLL = OL->second;
VarLocList &VLL = OutLocs[CurMBB];

for (auto OR : OpenRanges) {
// Copy OpenRanges to OutLocs, if not already present.
Expand Down Expand Up @@ -305,14 +298,7 @@ void LiveDebugValues::join(MachineBasicBlock &MBB, VarLocInMBB &OutLocs,
if (InLocsT.empty())
return;

if (InLocs.find(&MBB) == InLocs.end()) {
// Create space for new Incoming locs entries.
VarLocList VLL;
InLocs.insert(std::make_pair(&MBB, std::move(VLL)));
}
auto IL = InLocs.find(&MBB);
assert(IL != InLocs.end());
VarLocList &ILL = IL->second;
VarLocList &ILL = InLocs[&MBB];

// Insert DBG_VALUE instructions, if not already inserted.
for (auto ILT : InLocsT) {
Expand Down

0 comments on commit a1505f1

Please sign in to comment.