summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/DebugHandlerBase.cpp
diff options
context:
space:
mode:
authorDavid Stenberg <david.stenberg@ericsson.com>2019-04-10 09:07:43 +0000
committerDavid Stenberg <david.stenberg@ericsson.com>2019-04-10 09:07:43 +0000
commit6feef56d1bdb471d0415afedebfbe49c91ca1dce (patch)
treeda12c8ccca6014c4463a7d8e6699cfedc0e39766 /llvm/lib/CodeGen/AsmPrinter/DebugHandlerBase.cpp
parent3739979c2031ebcf0ed40d30d549cf82bb1a122c (diff)
downloadbcm5719-llvm-6feef56d1bdb471d0415afedebfbe49c91ca1dce.tar.gz
bcm5719-llvm-6feef56d1bdb471d0415afedebfbe49c91ca1dce.zip
[DebugInfo] Rename DbgValueHistoryMap::{InstrRange -> Entry}, NFC
Summary: In an upcoming commit the history map will be changed so that it contains explicit entries for instructions that clobber preceding debug values, rather than Begin- End range pairs, so generalize the name to "Entry". Also, prefix the iterator variable names in buildLocationList() with "E". In an upcoming commit the entry will have query functions such as "isD(e)b(u)gValue", which could at a glance make one confuse it for iterations over MachineInstrs, so make the iterator names a bit more distinct to avoid that. Reviewers: aprantl Reviewed By: aprantl Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D59939 llvm-svn: 358060
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DebugHandlerBase.cpp')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DebugHandlerBase.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DebugHandlerBase.cpp b/llvm/lib/CodeGen/AsmPrinter/DebugHandlerBase.cpp
index 7a435422652..00e4cea3135 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DebugHandlerBase.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DebugHandlerBase.cpp
@@ -211,8 +211,8 @@ void DebugHandlerBase::beginFunction(const MachineFunction *MF) {
// Request labels for the full history.
for (const auto &I : DbgValues) {
- const auto &Ranges = I.second;
- if (Ranges.empty())
+ const auto &Entries = I.second;
+ if (Entries.empty())
continue;
auto IsDescribedByReg = [](const MachineInstr *MI) {
@@ -229,17 +229,17 @@ void DebugHandlerBase::beginFunction(const MachineFunction *MF) {
// However, we currently do not emit debug values for constant arguments
// directly at the start of the function, so this code is still useful.
const DILocalVariable *DIVar =
- Ranges.front().getBegin()->getDebugVariable();
+ Entries.front().getBegin()->getDebugVariable();
if (DIVar->isParameter() &&
getDISubprogram(DIVar->getScope())->describes(&MF->getFunction())) {
- if (!IsDescribedByReg(Ranges.front().getBegin()))
- LabelsBeforeInsn[Ranges.front().getBegin()] = Asm->getFunctionBegin();
- if (Ranges.front().getBegin()->getDebugExpression()->isFragment()) {
+ if (!IsDescribedByReg(Entries.front().getBegin()))
+ LabelsBeforeInsn[Entries.front().getBegin()] = Asm->getFunctionBegin();
+ if (Entries.front().getBegin()->getDebugExpression()->isFragment()) {
// Mark all non-overlapping initial fragments.
- for (auto I = Ranges.begin(); I != Ranges.end(); ++I) {
+ for (auto I = Entries.begin(); I != Entries.end(); ++I) {
const DIExpression *Fragment = I->getBegin()->getDebugExpression();
- if (std::any_of(Ranges.begin(), I,
- [&](DbgValueHistoryMap::InstrRange Pred) {
+ if (std::any_of(Entries.begin(), I,
+ [&](DbgValueHistoryMap::Entry Pred) {
return Fragment->fragmentsOverlap(
Pred.getBegin()->getDebugExpression());
}))
@@ -250,10 +250,10 @@ void DebugHandlerBase::beginFunction(const MachineFunction *MF) {
}
}
- for (const auto &Range : Ranges) {
- requestLabelBeforeInsn(Range.getBegin());
- if (Range.getEnd())
- requestLabelAfterInsn(Range.getEnd());
+ for (const auto &Entry : Entries) {
+ requestLabelBeforeInsn(Entry.getBegin());
+ if (Entry.getEnd())
+ requestLabelAfterInsn(Entry.getEnd());
}
}
OpenPOWER on IntegriCloud