[PATCH] D77353: [WebAssembly] Add DW_OP_WASM_location_int

Derek Schuff via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 7 15:16:57 PDT 2020


dschuff added a comment.

In D77353#1959964 <https://reviews.llvm.org/D77353#1959964>, @aardappel wrote:

> @yurydelendik that would just take care of the encoding, the bigger question would be how to plumb symbol support into DwarfExpression (including the buffering path).


Is this just because DwarfExpression doesn't have access to the AsmPrinter?



================
Comment at: llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp:424
     case TargetFrameLowering::DwarfFrameBase::WasmFrameBase: {
-      DIELoc *Loc = new (DIEValueAllocator) DIELoc;
-      DIEDwarfExpression DwarfExpr(*Asm, *this, *Loc);
-      DIExpressionCursor Cursor({});
-      DwarfExpr.addWasmLocation(FrameBase.Location.WasmLoc.Kind,
-                                FrameBase.Location.WasmLoc.Index);
-      DwarfExpr.addExpression(std::move(Cursor));
-      addBlock(*SPDie, dwarf::DW_AT_frame_base, DwarfExpr.finalize());
+      // FIXME: don't want to depend on target specific headers?
+      const unsigned TI_GLOBAL_RELOC = 3;
----------------
This should probably at least say which header this value comes from.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D77353/new/

https://reviews.llvm.org/D77353





More information about the llvm-commits mailing list