[Mlir-commits] [lldb] [llvm] [mlir] [DebugInfo] Add symbolic branches to DIExpression (PR #210850)

Scott Linder llvmlistbot at llvm.org
Thu Aug 20 10:07:42 PDT 2026


================
@@ -69,11 +89,41 @@ void DIEDwarfExpression::enableTemporaryBuffer() {
 void DIEDwarfExpression::disableTemporaryBuffer() { IsBuffering = false; }
 
 unsigned DIEDwarfExpression::getTemporaryBufferSize() {
-  return TmpDIE.computeSize(AP.getDwarfFormParams());
+  unsigned Size = 0;
+  for (const DIEValue &V : TmpDIE.values())
+    Size += V.sizeOf(AP.getDwarfFormParams());
+  return Size;
 }
 
 void DIEDwarfExpression::commitTemporaryBuffer() { OutDIE.takeValues(TmpDIE); }
 
+void DIEDwarfExpression::replaceTemporaryBufferData(unsigned PlaceholderOffset,
+                                                    uint64_t Replacement,
+                                                    unsigned PlaceholderSize) {
+  // Walk the encoded values until the cursor reaches the placeholder.
+  unsigned ByteCursor = 0;
+  for (DIEValue &V : TmpDIE.values()) {
----------------
slinder1 wrote:

This may not actually matter in a practical sense, since `N` is usually pretty small. This doesn't have to block the review, but I noticed it

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


More information about the Mlir-commits mailing list