Skip to content

Commit bdc77d1

Browse files
authored
[RemoveDIs][NFC] Rename DPLabel->DbgLabelRecord (#85918)
This patch renames DPLabel to DbgLabelRecord, in accordance with the ongoing DbgRecord rename. This rename was fairly trivial, since DPLabel isn't as widely used as DPValue and has no real conflicts in either its full or abbreviated name. As usual, the entire replacement was done automatically, with `s/DPLabel/DbgLabelRecord/` and `s/DPL/DLR/`.
1 parent 6c1d445 commit bdc77d1

20 files changed

+97
-89
lines changed

llvm/docs/RemoveDIsDebugInfo.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,9 @@ We're using a dedicated C++ class called `DbgRecord` to store debug info, with a
6565

6666
https://llvm.org/docs/doxygen/classllvm_1_1DbgRecord.html
6767
https://llvm.org/docs/doxygen/classllvm_1_1DbgVariableRecord.html
68-
https://llvm.org/docs/doxygen/classllvm_1_1DPLabel.html
68+
https://llvm.org/docs/doxygen/classllvm_1_1DbgLabelRecord.html
6969

70-
This allows you to treat a `DbgVariableRecord` as if it's a `dbg.value`/`dbg.declare`/`dbg.assign` intrinsic most of the time, for example in generic (auto-param) lambdas, and the same for `DPLabel` and `dbg.label`s.
70+
This allows you to treat a `DbgVariableRecord` as if it's a `dbg.value`/`dbg.declare`/`dbg.assign` intrinsic most of the time, for example in generic (auto-param) lambdas, and the same for `DbgLabelRecord` and `dbg.label`s.
7171

7272
## How do these `DbgRecords` fit into the instruction stream?
7373

@@ -97,7 +97,7 @@ Each instruction has a pointer to a `DPMarker` (which will become optional), tha
9797

9898
Not shown are the links from DbgRecord to other parts of the `Value`/`Metadata` hierachy: `DbgRecord` subclasses have tracking pointers to the DIMetadata that they use, and `DbgVariableRecord` has references to `Value`s that are stored in a `DebugValueUser` base class. This refers to a `ValueAsMetadata` object referring to `Value`s, via the `TrackingMetadata` facility.
9999

100-
The various kinds of debug intrinsic (value, declare, assign, label) are all stored in `DbgRecord` subclasses, with a "RecordKind" field distinguishing `DPLabel`s from `DbgVariableRecord`s, and a `LocationType` field in the `DbgVariableRecord` class further disambiguating the various debug variable intrinsics it can represent.
100+
The various kinds of debug intrinsic (value, declare, assign, label) are all stored in `DbgRecord` subclasses, with a "RecordKind" field distinguishing `DbgLabelRecord`s from `DbgVariableRecord`s, and a `LocationType` field in the `DbgVariableRecord` class further disambiguating the various debug variable intrinsics it can represent.
101101

102102
## Finding debug info records
103103

llvm/include/llvm/IR/DebugProgramInstruction.h

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -222,23 +222,25 @@ inline raw_ostream &operator<<(raw_ostream &OS, const DbgRecord &R) {
222222
/// llvm.dbg.label intrinsic.
223223
/// FIXME: Rename DbgLabelRecord when DbgVariableRecord is renamed to
224224
/// DbgVariableRecord.
225-
class DPLabel : public DbgRecord {
225+
class DbgLabelRecord : public DbgRecord {
226226
DbgRecordParamRef<DILabel> Label;
227227

228228
/// This constructor intentionally left private, so that it is only called via
229-
/// "createUnresolvedDPLabel", which clearly expresses that it is for parsing
230-
/// only.
231-
DPLabel(MDNode *Label, MDNode *DL);
229+
/// "createUnresolvedDbgLabelRecord", which clearly expresses that it is for
230+
/// parsing only.
231+
DbgLabelRecord(MDNode *Label, MDNode *DL);
232232

233233
public:
234-
DPLabel(DILabel *Label, DebugLoc DL);
234+
DbgLabelRecord(DILabel *Label, DebugLoc DL);
235235

236-
/// For use during parsing; creates a DPLabel from as-of-yet unresolved
237-
/// MDNodes. Trying to access the resulting DPLabel's fields before they are
238-
/// resolved, or if they resolve to the wrong type, will result in a crash.
239-
static DPLabel *createUnresolvedDPLabel(MDNode *Label, MDNode *DL);
236+
/// For use during parsing; creates a DbgLabelRecord from as-of-yet unresolved
237+
/// MDNodes. Trying to access the resulting DbgLabelRecord's fields before
238+
/// they are resolved, or if they resolve to the wrong type, will result in a
239+
/// crash.
240+
static DbgLabelRecord *createUnresolvedDbgLabelRecord(MDNode *Label,
241+
MDNode *DL);
240242

241-
DPLabel *clone() const;
243+
DbgLabelRecord *clone() const;
242244
void print(raw_ostream &O, bool IsForDebug = false) const;
243245
void print(raw_ostream &ROS, ModuleSlotTracker &MST, bool IsForDebug) const;
244246
DbgLabelInst *createDebugIntrinsic(Module *M,

llvm/lib/AsmParser/LLParser.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6607,7 +6607,7 @@ bool LLParser::parseDebugRecord(DbgRecord *&DR, PerFunctionState &PFS) {
66076607
return true;
66086608
if (parseToken(lltok::rparen, "Expected ')' here"))
66096609
return true;
6610-
DR = DPLabel::createUnresolvedDPLabel(Label, DbgLoc);
6610+
DR = DbgLabelRecord::createUnresolvedDbgLabelRecord(Label, DbgLoc);
66116611
return false;
66126612
}
66136613

llvm/lib/Bitcode/Reader/BitcodeReader.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6426,14 +6426,15 @@ Error BitcodeReader::parseFunctionBody(Function *F) {
64266426
break;
64276427
}
64286428
case bitc::FUNC_CODE_DEBUG_RECORD_LABEL: {
6429-
// DPLabels are placed after the Instructions that they are attached to.
6429+
// DbgLabelRecords are placed after the Instructions that they are
6430+
// attached to.
64306431
Instruction *Inst = getLastInstruction();
64316432
if (!Inst)
64326433
return error("Invalid dbg record: missing instruction");
64336434
DILocation *DIL = cast<DILocation>(getFnMetadataByID(Record[0]));
64346435
DILabel *Label = cast<DILabel>(getFnMetadataByID(Record[1]));
64356436
Inst->getParent()->insertDbgRecordBefore(
6436-
new DPLabel(Label, DebugLoc(DIL)), Inst->getIterator());
6437+
new DbgLabelRecord(Label, DebugLoc(DIL)), Inst->getIterator());
64376438
continue; // This isn't an instruction.
64386439
}
64396440
case bitc::FUNC_CODE_DEBUG_RECORD_VALUE_SIMPLE:

llvm/lib/Bitcode/Writer/BitcodeWriter.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3570,9 +3570,9 @@ void ModuleBitcodeWriter::writeFunction(
35703570
// instruction. Write it after the instruction so that it's easy to
35713571
// re-attach to the instruction reading the records in.
35723572
for (DbgRecord &DR : I.DbgMarker->getDbgRecordRange()) {
3573-
if (DPLabel *DPL = dyn_cast<DPLabel>(&DR)) {
3574-
Vals.push_back(VE.getMetadataID(&*DPL->getDebugLoc()));
3575-
Vals.push_back(VE.getMetadataID(DPL->getLabel()));
3573+
if (DbgLabelRecord *DLR = dyn_cast<DbgLabelRecord>(&DR)) {
3574+
Vals.push_back(VE.getMetadataID(&*DLR->getDebugLoc()));
3575+
Vals.push_back(VE.getMetadataID(DLR->getLabel()));
35763576
Stream.EmitRecord(bitc::FUNC_CODE_DEBUG_RECORD_LABEL, Vals);
35773577
Vals.clear();
35783578
continue;

llvm/lib/Bitcode/Writer/ValueEnumerator.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -441,9 +441,9 @@ ValueEnumerator::ValueEnumerator(const Module &M,
441441
};
442442

443443
for (DbgRecord &DR : I.getDbgRecordRange()) {
444-
if (DPLabel *DPL = dyn_cast<DPLabel>(&DR)) {
445-
EnumerateMetadata(&F, DPL->getLabel());
446-
EnumerateMetadata(&F, &*DPL->getDebugLoc());
444+
if (DbgLabelRecord *DLR = dyn_cast<DbgLabelRecord>(&DR)) {
445+
EnumerateMetadata(&F, DLR->getLabel());
446+
EnumerateMetadata(&F, &*DLR->getDebugLoc());
447447
continue;
448448
}
449449
// Enumerate non-local location metadata.

llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3376,13 +3376,13 @@ void IRTranslator::translateDbgDeclareRecord(Value *Address, bool HasArgList,
33763376
void IRTranslator::translateDbgInfo(const Instruction &Inst,
33773377
MachineIRBuilder &MIRBuilder) {
33783378
for (DbgRecord &DR : Inst.getDbgRecordRange()) {
3379-
if (DPLabel *DPL = dyn_cast<DPLabel>(&DR)) {
3380-
MIRBuilder.setDebugLoc(DPL->getDebugLoc());
3381-
assert(DPL->getLabel() && "Missing label");
3382-
assert(DPL->getLabel()->isValidLocationForIntrinsic(
3379+
if (DbgLabelRecord *DLR = dyn_cast<DbgLabelRecord>(&DR)) {
3380+
MIRBuilder.setDebugLoc(DLR->getDebugLoc());
3381+
assert(DLR->getLabel() && "Missing label");
3382+
assert(DLR->getLabel()->isValidLocationForIntrinsic(
33833383
MIRBuilder.getDebugLoc()) &&
33843384
"Expected inlined-at fields to agree");
3385-
MIRBuilder.buildDbgLabel(DPL->getLabel());
3385+
MIRBuilder.buildDbgLabel(DLR->getLabel());
33863386
continue;
33873387
}
33883388
DbgVariableRecord &DVR = cast<DbgVariableRecord>(DR);

llvm/lib/CodeGen/SelectionDAG/FastISel.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1192,16 +1192,16 @@ void FastISel::handleDbgInfo(const Instruction *II) {
11921192
flushLocalValueMap();
11931193
recomputeInsertPt();
11941194

1195-
if (DPLabel *DPL = dyn_cast<DPLabel>(&DR)) {
1196-
assert(DPL->getLabel() && "Missing label");
1195+
if (DbgLabelRecord *DLR = dyn_cast<DbgLabelRecord>(&DR)) {
1196+
assert(DLR->getLabel() && "Missing label");
11971197
if (!FuncInfo.MF->getMMI().hasDebugInfo()) {
1198-
LLVM_DEBUG(dbgs() << "Dropping debug info for " << *DPL << "\n");
1198+
LLVM_DEBUG(dbgs() << "Dropping debug info for " << *DLR << "\n");
11991199
continue;
12001200
}
12011201

1202-
BuildMI(*FuncInfo.MBB, FuncInfo.InsertPt, DPL->getDebugLoc(),
1202+
BuildMI(*FuncInfo.MBB, FuncInfo.InsertPt, DLR->getDebugLoc(),
12031203
TII.get(TargetOpcode::DBG_LABEL))
1204-
.addMetadata(DPL->getLabel());
1204+
.addMetadata(DLR->getLabel());
12051205
continue;
12061206
}
12071207

llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1248,18 +1248,19 @@ void SelectionDAGBuilder::visitDbgInfo(const Instruction &I) {
12481248
// We must skip DbgVariableRecords if they've already been processed above as
12491249
// we have just emitted the debug values resulting from assignment tracking
12501250
// analysis, making any existing DbgVariableRecords redundant (and probably
1251-
// less correct). We still need to process DPLabels. This does sink DPLabels
1252-
// to the bottom of the group of debug records. That sholdn't be important
1253-
// as it does so deterministcally and ordering between DPLabels and
1254-
// DbgVariableRecords is immaterial (other than for MIR/IR printing).
1251+
// less correct). We still need to process DbgLabelRecords. This does sink
1252+
// DbgLabelRecords to the bottom of the group of debug records. That sholdn't
1253+
// be important as it does so deterministcally and ordering between
1254+
// DbgLabelRecords and DbgVariableRecords is immaterial (other than for MIR/IR
1255+
// printing).
12551256
bool SkipDbgVariableRecords = DAG.getFunctionVarLocs();
12561257
// Is there is any debug-info attached to this instruction, in the form of
12571258
// DbgRecord non-instruction debug-info records.
12581259
for (DbgRecord &DR : I.getDbgRecordRange()) {
1259-
if (DPLabel *DPL = dyn_cast<DPLabel>(&DR)) {
1260-
assert(DPL->getLabel() && "Missing label");
1260+
if (DbgLabelRecord *DLR = dyn_cast<DbgLabelRecord>(&DR)) {
1261+
assert(DLR->getLabel() && "Missing label");
12611262
SDDbgLabel *SDV =
1262-
DAG.getDbgLabel(DPL->getLabel(), DPL->getDebugLoc(), SDNodeOrder);
1263+
DAG.getDbgLabel(DLR->getLabel(), DLR->getDebugLoc(), SDNodeOrder);
12631264
DAG.AddDbgLabel(SDV);
12641265
continue;
12651266
}

llvm/lib/IR/AsmWriter.cpp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1152,8 +1152,8 @@ void SlotTracker::processDbgRecordMetadata(const DbgRecord &DR) {
11521152
if (auto *Empty = dyn_cast<MDNode>(DVR->getRawAddress()))
11531153
CreateMetadataSlot(Empty);
11541154
}
1155-
} else if (const DPLabel *DPL = dyn_cast<const DPLabel>(&DR)) {
1156-
CreateMetadataSlot(DPL->getRawLabel());
1155+
} else if (const DbgLabelRecord *DLR = dyn_cast<const DbgLabelRecord>(&DR)) {
1156+
CreateMetadataSlot(DLR->getRawLabel());
11571157
} else {
11581158
llvm_unreachable("unsupported DbgRecord kind");
11591159
}
@@ -2719,7 +2719,7 @@ class AssemblyWriter {
27192719
void printInstruction(const Instruction &I);
27202720
void printDPMarker(const DPMarker &DPI);
27212721
void printDbgVariableRecord(const DbgVariableRecord &DVR);
2722-
void printDPLabel(const DPLabel &DPL);
2722+
void printDbgLabelRecord(const DbgLabelRecord &DLR);
27232723
void printDbgRecord(const DbgRecord &DR);
27242724
void printDbgRecordLine(const DbgRecord &DR);
27252725

@@ -4621,8 +4621,8 @@ void AssemblyWriter::printDPMarker(const DPMarker &Marker) {
46214621
void AssemblyWriter::printDbgRecord(const DbgRecord &DR) {
46224622
if (auto *DVR = dyn_cast<DbgVariableRecord>(&DR))
46234623
printDbgVariableRecord(*DVR);
4624-
else if (auto *DPL = dyn_cast<DPLabel>(&DR))
4625-
printDPLabel(*DPL);
4624+
else if (auto *DLR = dyn_cast<DbgLabelRecord>(&DR))
4625+
printDbgLabelRecord(*DLR);
46264626
else
46274627
llvm_unreachable("Unexpected DbgRecord kind");
46284628
}
@@ -4672,7 +4672,7 @@ void AssemblyWriter::printDbgRecordLine(const DbgRecord &DR) {
46724672
Out << '\n';
46734673
}
46744674

4675-
void AssemblyWriter::printDPLabel(const DPLabel &Label) {
4675+
void AssemblyWriter::printDbgLabelRecord(const DbgLabelRecord &Label) {
46764676
auto WriterCtx = getContext();
46774677
Out << "#dbg_label(";
46784678
WriteAsOperandInternal(Out, Label.getRawLabel(), WriterCtx, true);
@@ -4934,7 +4934,7 @@ void DPMarker::print(raw_ostream &ROS, ModuleSlotTracker &MST,
49344934
W.printDPMarker(*this);
49354935
}
49364936

4937-
void DPLabel::print(raw_ostream &ROS, bool IsForDebug) const {
4937+
void DbgLabelRecord::print(raw_ostream &ROS, bool IsForDebug) const {
49384938

49394939
ModuleSlotTracker MST(getModuleFromDPI(this), true);
49404940
print(ROS, MST, IsForDebug);
@@ -4957,8 +4957,8 @@ void DbgVariableRecord::print(raw_ostream &ROS, ModuleSlotTracker &MST,
49574957
W.printDbgVariableRecord(*this);
49584958
}
49594959

4960-
void DPLabel::print(raw_ostream &ROS, ModuleSlotTracker &MST,
4961-
bool IsForDebug) const {
4960+
void DbgLabelRecord::print(raw_ostream &ROS, ModuleSlotTracker &MST,
4961+
bool IsForDebug) const {
49624962
formatted_raw_ostream OS(ROS);
49634963
SlotTracker EmptySlotTable(static_cast<const Module *>(nullptr));
49644964
SlotTracker &SlotTable =
@@ -4970,7 +4970,7 @@ void DPLabel::print(raw_ostream &ROS, ModuleSlotTracker &MST,
49704970
incorporateFunction(Marker->getParent() ? Marker->getParent()->getParent()
49714971
: nullptr);
49724972
AssemblyWriter W(OS, SlotTable, getModuleFromDPI(this), nullptr, IsForDebug);
4973-
W.printDPLabel(*this);
4973+
W.printDbgLabelRecord(*this);
49744974
}
49754975

49764976
void Value::print(raw_ostream &ROS, bool IsForDebug) const {

llvm/lib/IR/AutoUpgrade.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2358,7 +2358,7 @@ static MDType *unwrapMAVOp(CallBase *CI, unsigned Op) {
23582358
static void upgradeDbgIntrinsicToDbgRecord(StringRef Name, CallBase *CI) {
23592359
DbgRecord *DR = nullptr;
23602360
if (Name == "label") {
2361-
DR = new DPLabel(unwrapMAVOp<DILabel>(CI, 0), CI->getDebugLoc());
2361+
DR = new DbgLabelRecord(unwrapMAVOp<DILabel>(CI, 0), CI->getDebugLoc());
23622362
} else if (Name == "assign") {
23632363
DR = new DbgVariableRecord(
23642364
unwrapMAVOp<Metadata>(CI, 0), unwrapMAVOp<DILocalVariable>(CI, 1),

llvm/lib/IR/BasicBlock.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,8 @@ void BasicBlock::convertToNewDbgValues() {
8383
}
8484

8585
if (DbgLabelInst *DLI = dyn_cast<DbgLabelInst>(&I)) {
86-
DbgVarRecs.push_back(new DPLabel(DLI->getLabel(), DLI->getDebugLoc()));
86+
DbgVarRecs.push_back(
87+
new DbgLabelRecord(DLI->getLabel(), DLI->getDebugLoc()));
8788
DLI->eraseFromParent();
8889
continue;
8990
}

llvm/lib/IR/DIBuilder.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1155,12 +1155,12 @@ DbgInstPtr DIBuilder::insertLabel(DILabel *LabelInfo, const DILocation *DL,
11551155

11561156
trackIfUnresolved(LabelInfo);
11571157
if (M.IsNewDbgInfoFormat) {
1158-
DPLabel *DPL = new DPLabel(LabelInfo, DL);
1158+
DbgLabelRecord *DLR = new DbgLabelRecord(LabelInfo, DL);
11591159
if (InsertBB && InsertBefore)
1160-
InsertBB->insertDbgRecordBefore(DPL, InsertBefore->getIterator());
1160+
InsertBB->insertDbgRecordBefore(DLR, InsertBefore->getIterator());
11611161
else if (InsertBB)
1162-
InsertBB->insertDbgRecordBefore(DPL, InsertBB->end());
1163-
return DPL;
1162+
InsertBB->insertDbgRecordBefore(DLR, InsertBB->end());
1163+
return DLR;
11641164
}
11651165

11661166
if (!LabelFn)

llvm/lib/IR/DebugProgramInstruction.cpp

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ void DbgRecord::deleteRecord() {
8282
delete cast<DbgVariableRecord>(this);
8383
return;
8484
case LabelKind:
85-
delete cast<DPLabel>(this);
85+
delete cast<DbgLabelRecord>(this);
8686
return;
8787
}
8888
llvm_unreachable("unsupported DbgRecord kind");
@@ -94,7 +94,7 @@ void DbgRecord::print(raw_ostream &O, bool IsForDebug) const {
9494
cast<DbgVariableRecord>(this)->print(O, IsForDebug);
9595
return;
9696
case LabelKind:
97-
cast<DPLabel>(this)->print(O, IsForDebug);
97+
cast<DbgLabelRecord>(this)->print(O, IsForDebug);
9898
return;
9999
};
100100
llvm_unreachable("unsupported DbgRecord kind");
@@ -107,7 +107,7 @@ void DbgRecord::print(raw_ostream &O, ModuleSlotTracker &MST,
107107
cast<DbgVariableRecord>(this)->print(O, MST, IsForDebug);
108108
return;
109109
case LabelKind:
110-
cast<DPLabel>(this)->print(O, MST, IsForDebug);
110+
cast<DbgLabelRecord>(this)->print(O, MST, IsForDebug);
111111
return;
112112
};
113113
llvm_unreachable("unsupported DbgRecord kind");
@@ -121,7 +121,8 @@ bool DbgRecord::isIdenticalToWhenDefined(const DbgRecord &R) const {
121121
return cast<DbgVariableRecord>(this)->isIdenticalToWhenDefined(
122122
*cast<DbgVariableRecord>(&R));
123123
case LabelKind:
124-
return cast<DPLabel>(this)->getLabel() == cast<DPLabel>(R).getLabel();
124+
return cast<DbgLabelRecord>(this)->getLabel() ==
125+
cast<DbgLabelRecord>(R).getLabel();
125126
};
126127
llvm_unreachable("unsupported DbgRecord kind");
127128
}
@@ -136,24 +137,25 @@ DbgRecord::createDebugIntrinsic(Module *M, Instruction *InsertBefore) const {
136137
case ValueKind:
137138
return cast<DbgVariableRecord>(this)->createDebugIntrinsic(M, InsertBefore);
138139
case LabelKind:
139-
return cast<DPLabel>(this)->createDebugIntrinsic(M, InsertBefore);
140+
return cast<DbgLabelRecord>(this)->createDebugIntrinsic(M, InsertBefore);
140141
};
141142
llvm_unreachable("unsupported DbgRecord kind");
142143
}
143144

144-
DPLabel::DPLabel(MDNode *Label, MDNode *DL)
145+
DbgLabelRecord::DbgLabelRecord(MDNode *Label, MDNode *DL)
145146
: DbgRecord(LabelKind, DebugLoc(DL)), Label(Label) {
146147
assert(Label && "Unexpected nullptr");
147148
assert((isa<DILabel>(Label) || Label->isTemporary()) &&
148149
"Label type must be or resolve to a DILabel");
149150
}
150-
DPLabel::DPLabel(DILabel *Label, DebugLoc DL)
151+
DbgLabelRecord::DbgLabelRecord(DILabel *Label, DebugLoc DL)
151152
: DbgRecord(LabelKind, DL), Label(Label) {
152153
assert(Label && "Unexpected nullptr");
153154
}
154155

155-
DPLabel *DPLabel::createUnresolvedDPLabel(MDNode *Label, MDNode *DL) {
156-
return new DPLabel(Label, DL);
156+
DbgLabelRecord *DbgLabelRecord::createUnresolvedDbgLabelRecord(MDNode *Label,
157+
MDNode *DL) {
158+
return new DbgLabelRecord(Label, DL);
157159
}
158160

159161
DbgVariableRecord::DbgVariableRecord(DbgVariableRecord::LocationType Type,
@@ -380,7 +382,7 @@ DbgRecord *DbgRecord::clone() const {
380382
case ValueKind:
381383
return cast<DbgVariableRecord>(this)->clone();
382384
case LabelKind:
383-
return cast<DPLabel>(this)->clone();
385+
return cast<DbgLabelRecord>(this)->clone();
384386
};
385387
llvm_unreachable("unsupported DbgRecord kind");
386388
}
@@ -389,8 +391,8 @@ DbgVariableRecord *DbgVariableRecord::clone() const {
389391
return new DbgVariableRecord(*this);
390392
}
391393

392-
DPLabel *DPLabel::clone() const {
393-
return new DPLabel(getLabel(), getDebugLoc());
394+
DbgLabelRecord *DbgLabelRecord::clone() const {
395+
return new DbgLabelRecord(getLabel(), getDebugLoc());
394396
}
395397

396398
DbgVariableIntrinsic *
@@ -450,8 +452,9 @@ DbgVariableRecord::createDebugIntrinsic(Module *M,
450452
return DVI;
451453
}
452454

453-
DbgLabelInst *DPLabel::createDebugIntrinsic(Module *M,
454-
Instruction *InsertBefore) const {
455+
DbgLabelInst *
456+
DbgLabelRecord::createDebugIntrinsic(Module *M,
457+
Instruction *InsertBefore) const {
455458
auto *LabelFn = Intrinsic::getDeclaration(M, Intrinsic::dbg_label);
456459
Value *Args[] = {
457460
MetadataAsValue::get(getDebugLoc()->getContext(), getLabel())};

0 commit comments

Comments
 (0)