[llvm] [RemoveDIs][NFC] Introduce DbgRecord base class [1/3] (PR #78252)

Orlando Cazalet-Hyams via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 20 03:33:03 PST 2024


================
@@ -108,9 +108,13 @@ void BasicBlock::convertFromNewDbgValues() {
       continue;
 
     DPMarker &Marker = *Inst.DbgMarker;
-    for (DPValue &DPV : Marker.getDbgValueRange())
-      InstList.insert(Inst.getIterator(),
-                      DPV.createDebugIntrinsic(getModule(), nullptr));
+    for (DbgRecord &DPR : Marker.getDbgValueRange()) {
+      if (auto *DPV = dyn_cast<DPValue>(&DPR))
+        InstList.insert(Inst.getIterator(),
+                        DPV->createDebugIntrinsic(getModule(), nullptr));
+      else
+        llvm_unreachable("unsupported entity kind");
----------------
OCHyams wrote:

Done

https://github.com/llvm/llvm-project/pull/78252


More information about the llvm-commits mailing list