[llvm] [RemoveDIs][NFC] Introduce DbgRecord base class [1/3] (PR #78252)
Jeremy Morse via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 16 06:05:00 PST 2024
================
@@ -306,41 +349,41 @@ void DPMarker::removeFromParent() {
void DPMarker::eraseFromParent() {
if (MarkedInstr)
removeFromParent();
- dropDPValues();
+ dropDbgValues();
delete this;
}
-iterator_range<DPValue::self_iterator> DPMarker::getDbgValueRange() {
+iterator_range<DbgRecord::self_iterator> DPMarker::getDbgValueRange() {
return make_range(StoredDPValues.begin(), StoredDPValues.end());
}
-void DPValue::removeFromParent() {
+void DbgRecord::removeFromParent() {
getMarker()->StoredDPValues.erase(getIterator());
}
-void DPValue::eraseFromParent() {
+void DbgRecord::eraseFromParent() {
removeFromParent();
- deleteInstr();
+ deleteRecord();
}
-void DPMarker::insertDPValue(DPValue *New, bool InsertAtHead) {
+void DPMarker::insertDPValue(DbgRecord *New, bool InsertAtHead) {
auto It = InsertAtHead ? StoredDPValues.begin() : StoredDPValues.end();
StoredDPValues.insert(It, *New);
New->setMarker(this);
}
void DPMarker::absorbDebugValues(DPMarker &Src, bool InsertAtHead) {
auto It = InsertAtHead ? StoredDPValues.begin() : StoredDPValues.end();
- for (DPValue &DPV : Src.StoredDPValues)
+ for (DbgRecord &DPV : Src.StoredDPValues)
DPV.setMarker(this);
StoredDPValues.splice(It, Src.StoredDPValues);
}
-void DPMarker::absorbDebugValues(iterator_range<DPValue::self_iterator> Range,
+void DPMarker::absorbDebugValues(iterator_range<DbgRecord::self_iterator> Range,
DPMarker &Src, bool InsertAtHead) {
- for (DPValue &DPV : Range)
- DPV.setMarker(this);
+ for (DbgRecord &DPE : Range)
+ DPE.setMarker(this);
----------------
jmorse wrote:
DPEs -> DbgRecs, or will DPEs become clearer in the future?
https://github.com/llvm/llvm-project/pull/78252
More information about the llvm-commits
mailing list