[llvm] r238456 - AsmPrinter: Rename begin_values() => values_begin(), NFC
Duncan P. N. Exon Smith
dexonsmith at apple.com
Thu May 28 11:55:38 PDT 2015
Author: dexonsmith
Date: Thu May 28 13:55:38 2015
New Revision: 238456
URL: http://llvm.org/viewvc/llvm-project?rev=238456&view=rev
Log:
AsmPrinter: Rename begin_values() => values_begin(), NFC
Modified:
llvm/trunk/include/llvm/CodeGen/DIE.h
llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
llvm/trunk/tools/dsymutil/DwarfLinker.cpp
Modified: llvm/trunk/include/llvm/CodeGen/DIE.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/DIE.h?rev=238456&r1=238455&r2=238456&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/DIE.h (original)
+++ llvm/trunk/include/llvm/CodeGen/DIE.h Thu May 28 13:55:38 2015
@@ -503,10 +503,10 @@ public:
typedef SmallVectorImpl<DIEValue>::const_iterator value_iterator;
typedef iterator_range<value_iterator> value_range;
- value_iterator begin_values() const { return Values.begin(); }
- value_iterator end_values() const { return Values.end(); }
+ value_iterator values_begin() const { return Values.begin(); }
+ value_iterator values_end() const { return Values.end(); }
value_range values() const {
- return llvm::make_range(begin_values(), end_values());
+ return llvm::make_range(values_begin(), values_end());
}
void setValue(unsigned I, DIEValue New) {
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp?rev=238456&r1=238455&r2=238456&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp Thu May 28 13:55:38 2015
@@ -242,7 +242,7 @@ void DwarfCompileUnit::initStmtList() {
MCSymbol *LineTableStartSym =
Asm->OutStreamer->getDwarfLineTableSymbol(getUniqueID());
- stmtListIndex = std::distance(UnitDie.begin_values(), UnitDie.end_values());
+ stmtListIndex = std::distance(UnitDie.values_begin(), UnitDie.values_end());
// DW_AT_stmt_list is a offset of line number information for this
// compile unit in debug_line section. For split dwarf this is
@@ -255,7 +255,7 @@ void DwarfCompileUnit::initStmtList() {
}
void DwarfCompileUnit::applyStmtList(DIE &D) {
- D.addValue(UnitDie.begin_values()[stmtListIndex]);
+ D.addValue(UnitDie.values_begin()[stmtListIndex]);
}
void DwarfCompileUnit::attachLowHighPC(DIE &D, const MCSymbol *Begin,
Modified: llvm/trunk/tools/dsymutil/DwarfLinker.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/dsymutil/DwarfLinker.cpp?rev=238456&r1=238455&r2=238456&view=diff
==============================================================================
--- llvm/trunk/tools/dsymutil/DwarfLinker.cpp (original)
+++ llvm/trunk/tools/dsymutil/DwarfLinker.cpp Thu May 28 13:55:38 2015
@@ -69,13 +69,13 @@ struct PatchLocation {
PatchLocation() : Die(nullptr), Index(0) {}
PatchLocation(DIE &Die, unsigned Index) : Die(&Die), Index(Index) {}
PatchLocation(DIE &Die)
- : Die(&Die), Index(std::distance(Die.begin_values(), Die.end_values())) {}
+ : Die(&Die), Index(std::distance(Die.values_begin(), Die.values_end())) {}
void set(uint64_t New) const {
assert(Die);
assert((signed)Index <
- std::distance(Die->begin_values(), Die->end_values()));
- const auto &Old = Die->begin_values()[Index];
+ std::distance(Die->values_begin(), Die->values_end()));
+ const auto &Old = Die->values_begin()[Index];
assert(Old.getType() == DIEValue::isInteger);
Die->setValue(Index,
DIEValue(Old.getAttribute(), Old.getForm(), DIEInteger(New)));
@@ -84,9 +84,9 @@ struct PatchLocation {
uint64_t get() const {
assert(Die);
assert((signed)Index <
- std::distance(Die->begin_values(), Die->end_values()));
- assert(Die->begin_values()[Index].getType() == DIEValue::isInteger);
- return Die->begin_values()[Index].getDIEInteger().getValue();
+ std::distance(Die->values_begin(), Die->values_end()));
+ assert(Die->values_begin()[Index].getType() == DIEValue::isInteger);
+ return Die->values_begin()[Index].getDIEInteger().getValue();
}
};
@@ -2331,13 +2331,13 @@ void DwarfLinker::patchLineTableForUnit(
// Update the cloned DW_AT_stmt_list with the correct debug_line offset.
if (auto *OutputDIE = Unit.getOutputUnitDIE()) {
- auto Stmt = std::find_if(OutputDIE->begin_values(), OutputDIE->end_values(),
+ auto Stmt = std::find_if(OutputDIE->values_begin(), OutputDIE->values_end(),
[](const DIEValue &Value) {
return Value.getAttribute() == dwarf::DW_AT_stmt_list;
});
- assert(Stmt != OutputDIE->end_values() &&
+ assert(Stmt != OutputDIE->values_end() &&
"Didn't find DW_AT_stmt_list in cloned DIE!");
- OutputDIE->setValue(Stmt - OutputDIE->begin_values(),
+ OutputDIE->setValue(Stmt - OutputDIE->values_begin(),
DIEValue(Stmt->getAttribute(), Stmt->getForm(),
DIEInteger(Streamer->getLineSectionSize())));
}
More information about the llvm-commits
mailing list