diff options
author | Stephen Tozer <stephen.tozer@sony.com> | 2024-03-12 14:53:13 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-12 14:53:13 +0000 |
commit | 15f3f446c504d1bb85282fb3bd98db6eab69829d (patch) | |
tree | 2f4e67587df9d3911c179bcddfd9d45655cf6fcc /llvm/lib/IR/DebugInfo.cpp | |
parent | 0aefd702f6c5346f216d29c704c4d0e4ec7397ac (diff) | |
download | llvm-15f3f446c504d1bb85282fb3bd98db6eab69829d.zip llvm-15f3f446c504d1bb85282fb3bd98db6eab69829d.tar.gz llvm-15f3f446c504d1bb85282fb3bd98db6eab69829d.tar.bz2 |
[RemoveDIs][NFC] Rename common interface functions for DPValues->DbgRecords (#84793)
As part of the effort to rename the DbgRecord classes, this patch
renames the widely-used functions that operate on DbgRecords but refer
to DbgValues or DPValues in their names to refer to DbgRecords instead;
all such functions are defined in one of `BasicBlock.h`,
`Instruction.h`, and `DebugProgramInstruction.h`.
This patch explicitly does not change the names of any comments or
variables, except for where they use the exact name of one of the
renamed functions. The reason for this is reviewability; this patch can
be trivially examined to determine that the only changes are direct
string substitutions and any results from clang-format responding to the
changed line lengths. Future patches will cover renaming variables and
comments, and then renaming the classes themselves.
Diffstat (limited to 'llvm/lib/IR/DebugInfo.cpp')
-rw-r--r-- | llvm/lib/IR/DebugInfo.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/llvm/lib/IR/DebugInfo.cpp b/llvm/lib/IR/DebugInfo.cpp index 68fd244..e63b1e6 100644 --- a/llvm/lib/IR/DebugInfo.cpp +++ b/llvm/lib/IR/DebugInfo.cpp @@ -241,7 +241,7 @@ void DebugInfoFinder::processInstruction(const Module &M, if (auto DbgLoc = I.getDebugLoc()) processLocation(M, DbgLoc.get()); - for (const DbgRecord &DPR : I.getDbgValueRange()) + for (const DbgRecord &DPR : I.getDbgRecordRange()) processDbgRecord(M, DPR); } @@ -579,7 +579,7 @@ bool llvm::stripDebugInfo(Function &F) { // DIAssignID are debug info metadata primitives. I.setMetadata(LLVMContext::MD_DIAssignID, nullptr); } - I.dropDbgValues(); + I.dropDbgRecords(); } } return Changed; @@ -896,7 +896,7 @@ bool llvm::stripNonLineTableDebugInfo(Module &M) { I.setMetadata("heapallocsite", nullptr); // Strip any DPValues attached. - I.dropDbgValues(); + I.dropDbgRecords(); } } } @@ -1828,7 +1828,7 @@ void at::deleteAll(Function *F) { SmallVector<DPValue *, 12> DPToDelete; for (BasicBlock &BB : *F) { for (Instruction &I : BB) { - for (DPValue &DPV : DPValue::filter(I.getDbgValueRange())) + for (DPValue &DPV : DPValue::filter(I.getDbgRecordRange())) if (DPV.isDbgAssign()) DPToDelete.push_back(&DPV); if (auto *DAI = dyn_cast<DbgAssignIntrinsic>(&I)) @@ -2257,7 +2257,7 @@ bool AssignmentTrackingPass::runOnFunction(Function &F) { }; for (auto &BB : F) { for (auto &I : BB) { - for (DPValue &DPV : DPValue::filter(I.getDbgValueRange())) { + for (DPValue &DPV : DPValue::filter(I.getDbgRecordRange())) { if (DPV.isDbgDeclare()) ProcessDeclare(&DPV, DPVDeclares); } |