================
@@ -247,10 +245,16 @@ void DwarfUnit::addIntAsBlock(DIE &Die, dwarf::Attribute 
Attribute, const APInt
       c = Ptr64[i / 8] >> (8 * (i & 7));
     else
       c = Ptr64[(NumBytes - 1 - i) / 8] >> (8 * ((NumBytes - 1 - i) & 7));
-    addUInt(*Block, dwarf::DW_FORM_data1, c);
+    addUInt(Block, dwarf::DW_FORM_data1, c);
   }
+}
 
-  addBlock(Die, Attribute, Block);
+void DwarfUnit::addIntAsBlock(DIE &Die, dwarf::Attribute Attribute,
+                              const APInt &Val) {
+  DIEBlock *Block = new (DIEValueAllocator) DIEBlock;
+  addIntToBlock(*Block, Val);
+  Block->computeSize(Asm->getDwarfFormParams());
----------------
Michael137 wrote:

Doesn't `DwarfUnit::addBlock` already do this?

https://github.com/llvm/llvm-project/pull/184804
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to