summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.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/CodeViewDebug.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/CodeViewDebug.cpp')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
index b91f40de148..75a63df083a 100644
--- a/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
@@ -1154,13 +1154,13 @@ static bool needsReferenceType(const DbgVariableLocation &Loc) {
}
void CodeViewDebug::calculateRanges(
- LocalVariable &Var, const DbgValueHistoryMap::InstrRanges &Ranges) {
+ LocalVariable &Var, const DbgValueHistoryMap::Entries &Entries) {
const TargetRegisterInfo *TRI = Asm->MF->getSubtarget().getRegisterInfo();
// Calculate the definition ranges.
- for (auto I = Ranges.begin(), E = Ranges.end(); I != E; ++I) {
- const auto &Range = *I;
- const MachineInstr *DVInst = Range.getBegin();
+ for (auto I = Entries.begin(), E = Entries.end(); I != E; ++I) {
+ const auto &Entry = *I;
+ const MachineInstr *DVInst = Entry.getBegin();
assert(DVInst->isDebugValue() && "Invalid History entry");
// FIXME: Find a way to represent constant variables, since they are
// relatively common.
@@ -1187,7 +1187,7 @@ void CodeViewDebug::calculateRanges(
// Start over using that.
Var.UseReferenceType = true;
Var.DefRanges.clear();
- calculateRanges(Var, Ranges);
+ calculateRanges(Var, Entries);
return;
}
@@ -1215,8 +1215,8 @@ void CodeViewDebug::calculateRanges(
}
// Compute the label range.
- const MCSymbol *Begin = getLabelBeforeInsn(Range.getBegin());
- const MCSymbol *End = getLabelAfterInsn(Range.getEnd());
+ const MCSymbol *Begin = getLabelBeforeInsn(Entry.getBegin());
+ const MCSymbol *End = getLabelAfterInsn(Entry.getEnd());
if (!End) {
// This range is valid until the next overlapping bitpiece. In the
// common case, ranges will not be bitpieces, so they will overlap.
@@ -1257,7 +1257,7 @@ void CodeViewDebug::collectVariableInfo(const DISubprogram *SP) {
const DILocation *InlinedAt = IV.second;
// Instruction ranges, specifying where IV is accessible.
- const auto &Ranges = I.second;
+ const auto &Entries = I.second;
LexicalScope *Scope = nullptr;
if (InlinedAt)
@@ -1271,7 +1271,7 @@ void CodeViewDebug::collectVariableInfo(const DISubprogram *SP) {
LocalVariable Var;
Var.DIVar = DIVar;
- calculateRanges(Var, Ranges);
+ calculateRanges(Var, Entries);
recordLocalVariable(std::move(Var), Scope);
}
}
OpenPOWER on IntegriCloud