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

Stephen Tozer via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 22 06:49:19 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));
----------------
SLTozer wrote:

At the risk of being a pain, should we make this an `else if (<Label Cast>)` followed by an `llvm_unreachable`? As a guard against future types being added and missed here.

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


More information about the llvm-commits mailing list