aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/IR/DebugInfo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/IR/DebugInfo.cpp')
-rw-r--r--llvm/lib/IR/DebugInfo.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/llvm/lib/IR/DebugInfo.cpp b/llvm/lib/IR/DebugInfo.cpp
index eaa5cb3..a4fec60 100644
--- a/llvm/lib/IR/DebugInfo.cpp
+++ b/llvm/lib/IR/DebugInfo.cpp
@@ -240,8 +240,8 @@ void DebugInfoFinder::processInstruction(const Module &M,
if (auto DbgLoc = I.getDebugLoc())
processLocation(M, DbgLoc.get());
- for (const DPValue &DPV : I.getDbgValueRange())
- processDPValue(M, DPV);
+ for (const DbgRecord &DPR : I.getDbgValueRange())
+ processDbgRecord(M, DPR);
}
void DebugInfoFinder::processLocation(const Module &M, const DILocation *Loc) {
@@ -256,6 +256,10 @@ void DebugInfoFinder::processDPValue(const Module &M, const DPValue &DPV) {
processLocation(M, DPV.getDebugLoc().get());
}
+void DebugInfoFinder::processDbgRecord(const Module &M, const DbgRecord &DPR) {
+ processDPValue(M, cast<DPValue>(DPR));
+}
+
void DebugInfoFinder::processType(DIType *DT) {
if (!addType(DT))
return;
@@ -1822,7 +1826,7 @@ void at::deleteAll(Function *F) {
SmallVector<DPValue *, 12> DPToDelete;
for (BasicBlock &BB : *F) {
for (Instruction &I : BB) {
- for (auto &DPV : I.getDbgValueRange())
+ for (DPValue &DPV : DPValue::filter(I.getDbgValueRange()))
if (DPV.isDbgAssign())
DPToDelete.push_back(&DPV);
if (auto *DAI = dyn_cast<DbgAssignIntrinsic>(&I))
@@ -2246,7 +2250,7 @@ bool AssignmentTrackingPass::runOnFunction(Function &F) {
};
for (auto &BB : F) {
for (auto &I : BB) {
- for (auto &DPV : I.getDbgValueRange()) {
+ for (DPValue &DPV : DPValue::filter(I.getDbgValueRange())) {
if (DPV.isDbgDeclare())
ProcessDeclare(&DPV, DPVDeclares);
}