[llvm] [RemoveDIs][NFC] Add DPLabel class [2/3] (PR #82376)

Orlando Cazalet-Hyams via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 22 06:55:03 PST 2024


================
@@ -4581,7 +4581,7 @@ void AssemblyWriter::printDbgRecord(const DbgRecord &DR) {
   if (auto *DPV = dyn_cast<DPValue>(&DR))
     printDPValue(*DPV);
   else
-    llvm_unreachable("unsupported dbg record");
+    printDPLabel(cast<DPLabel>(DR));
----------------
OCHyams wrote:

The cast would catch that, but I can do so if you'd prefer. The unreachable has a nicer error message than cast failure (and is what I've done elsewhere). Wdyt?

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


More information about the llvm-commits mailing list