[PATCH] D80019: [WebAssembly] Fixed debugloc in DebugFixup pass

Wouter van Oortmerssen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 15 10:18:31 PDT 2020


aardappel created this revision.
aardappel added a reviewer: dschuff.
Herald added subscribers: llvm-commits, sunfish, aheejin, hiraditya, jgravelle-google, sbc100.
Herald added a project: LLVM.
dschuff accepted this revision.
This revision is now accepted and ready to land.
dschuff added a comment.

I guess the existing tests didnt catch this because the pop is still within the same subprogram. Did you see this just at the end of a function, or where?


BuildMI requires this debug loc to be from the same sub program as the variable metadata passed in.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D80019

Files:
  llvm/lib/Target/WebAssembly/WebAssemblyDebugFixup.cpp


Index: llvm/lib/Target/WebAssembly/WebAssemblyDebugFixup.cpp
===================================================================
--- llvm/lib/Target/WebAssembly/WebAssemblyDebugFixup.cpp
+++ llvm/lib/Target/WebAssembly/WebAssemblyDebugFixup.cpp
@@ -118,7 +118,7 @@
               // a $noreg DBG_VALUE for the variable to end it, right after
               // the current instruction.
               BuildMI(*Prev.DebugValue->getParent(), std::next(MII),
-                      MI.getDebugLoc(), TII->get(WebAssembly::DBG_VALUE), false,
+                      Prev.DebugValue->getDebugLoc(), TII->get(WebAssembly::DBG_VALUE), false,
                       Register(), Prev.DebugValue->getOperand(2).getMetadata(),
                       Prev.DebugValue->getOperand(3).getMetadata());
             }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D80019.264271.patch
Type: text/x-patch
Size: 799 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200515/d5c35062/attachment.bin>


More information about the llvm-commits mailing list