Skip to content

Commit 9f186e5

Browse files
committed
fix comment & update functions after upstream rename
1 parent 5714bf0 commit 9f186e5

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

llvm/include/llvm/Bitcode/LLVMBitCodes.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -634,7 +634,7 @@ enum FunctionCodes {
634634
// DIAssignID, DIExpression (addr), ValueAsMetadata (addr)]
635635
FUNC_CODE_DEBUG_RECORD_VALUE_SIMPLE =
636636
64, // [DILocation, DILocalVariable, DIExpression, Value]
637-
FUNC_CODE_DEBUG_RECORD_LABEL = 65, // DPVALUE: [DILocation, DILabel]
637+
FUNC_CODE_DEBUG_RECORD_LABEL = 65, // [DILocation, DILabel]
638638
};
639639

640640
enum UseListCodes {

llvm/lib/Bitcode/Reader/BitcodeReader.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6406,8 +6406,8 @@ Error BitcodeReader::parseFunctionBody(Function *F) {
64066406
return error("Invalid dbg record: missing instruction");
64076407
DILocation *DIL = cast<DILocation>(getFnMetadataByID(Record[0]));
64086408
DILabel *Label = cast<DILabel>(getFnMetadataByID(Record[1]));
6409-
Inst->getParent()->insertDPValueBefore(new DPLabel(Label, DIL),
6410-
Inst->getIterator());
6409+
Inst->getParent()->insertDbgRecordBefore(
6410+
new DPLabel(Label, DebugLoc(DIL)), Inst->getIterator());
64116411
continue; // This isn't an instruction.
64126412
}
64136413
case bitc::FUNC_CODE_DEBUG_RECORD_VALUE_SIMPLE:
@@ -6479,7 +6479,7 @@ Error BitcodeReader::parseFunctionBody(Function *F) {
64796479
default:
64806480
llvm_unreachable("Unknown DPValue bitcode");
64816481
}
6482-
Inst->getParent()->insertDPValueBefore(DPV, Inst->getIterator());
6482+
Inst->getParent()->insertDbgRecordBefore(DPV, Inst->getIterator());
64836483
continue; // This isn't an instruction.
64846484
}
64856485
case bitc::FUNC_CODE_INST_CALL: {

llvm/lib/Bitcode/Writer/BitcodeWriter.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3532,11 +3532,11 @@ void ModuleBitcodeWriter::writeFunction(
35323532
}
35333533
}
35343534

3535-
// If the instruction has DPValues attached to it, emit them. Note that
3535+
// If the instruction has DbgRecords attached to it, emit them. Note that
35363536
// they come after the instruction so that it's easy to attach them again
35373537
// when reading the bitcode, even though conceptually the debug locations
35383538
// start "before" the instruction.
3539-
if (I.hasDbgValues() && WriteNewDbgInfoFormatToBitcode) {
3539+
if (I.hasDbgRecords() && WriteNewDbgInfoFormatToBitcode) {
35403540
/// Try to push the value only (unwrapped), otherwise push the
35413541
/// metadata wrapped value. Returns true if the value was pushed
35423542
/// without the ValueAsMetadata wrapper.
@@ -3562,7 +3562,7 @@ void ModuleBitcodeWriter::writeFunction(
35623562
// Write out non-instruction debug information attached to this
35633563
// instruction. Write it after the instruction so that it's easy to
35643564
// re-attach to the instruction reading the records in.
3565-
for (DbgRecord &DR : I.DbgMarker->getDbgValueRange()) {
3565+
for (DbgRecord &DR : I.DbgMarker->getDbgRecordRange()) {
35663566
if (DPLabel *DPL = dyn_cast<DPLabel>(&DR)) {
35673567
Vals.push_back(VE.getMetadataID(&*DPL->getDebugLoc()));
35683568
Vals.push_back(VE.getMetadataID(DPL->getLabel()));

llvm/lib/Bitcode/Writer/ValueEnumerator.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ static OrderMap orderModule(const Module &M) {
144144
}
145145
};
146146

147-
for (DPValue &DPV : DPValue::filter(I.getDbgValueRange())) {
147+
for (DPValue &DPV : filterDbgVars(I.getDbgRecordRange())) {
148148
OrderConstantFromMetadata(DPV.getRawLocation());
149149
if (DPV.isDbgAssign())
150150
OrderConstantFromMetadata(DPV.getRawAddress());
@@ -285,7 +285,7 @@ static UseListOrderStack predictUseListOrder(const Module &M) {
285285
predictValueUseListOrder(&A, &F, OM, Stack);
286286
for (const BasicBlock &BB : F) {
287287
for (const Instruction &I : BB) {
288-
for (DPValue &DPV : DPValue::filter(I.getDbgValueRange())) {
288+
for (DPValue &DPV : filterDbgVars(I.getDbgRecordRange())) {
289289
PredictValueOrderFromMetadata(DPV.getRawLocation());
290290
if (DPV.isDbgAssign())
291291
PredictValueOrderFromMetadata(DPV.getRawAddress());
@@ -440,7 +440,7 @@ ValueEnumerator::ValueEnumerator(const Module &M,
440440
EnumerateMetadata(&F, MD);
441441
};
442442

443-
for (DbgRecord &DR : I.getDbgValueRange()) {
443+
for (DbgRecord &DR : I.getDbgRecordRange()) {
444444
if (DPLabel *DPL = dyn_cast<DPLabel>(&DR)) {
445445
EnumerateMetadata(&F, DPL->getLabel());
446446
EnumerateMetadata(&F, &*DPL->getDebugLoc());
@@ -1128,7 +1128,7 @@ void ValueEnumerator::incorporateFunction(const Function &F) {
11281128
AddFnLocalMetadata(MD->getMetadata());
11291129
}
11301130
/// RemoveDIs: Add non-instruction function-local metadata uses.
1131-
for (DPValue &DPV : DPValue::filter(I.getDbgValueRange())) {
1131+
for (DPValue &DPV : filterDbgVars(I.getDbgRecordRange())) {
11321132
assert(DPV.getRawLocation() && "DPValue location unexpectedly null");
11331133
AddFnLocalMetadata(DPV.getRawLocation());
11341134
if (DPV.isDbgAssign()) {

0 commit comments

Comments
 (0)