[llvm] 62efd1e - [WebAssembly] Fixed debugloc in DebugFixup pass

Wouter van Oortmerssen via llvm-commits llvm-commits at lists.llvm.org
Fri May 15 10:50:26 PDT 2020


Author: Wouter van Oortmerssen
Date: 2020-05-15T10:50:14-07:00
New Revision: 62efd1eca2011258f6e784d529c076770a76f3a6

URL: https://github.com/llvm/llvm-project/commit/62efd1eca2011258f6e784d529c076770a76f3a6
DIFF: https://github.com/llvm/llvm-project/commit/62efd1eca2011258f6e784d529c076770a76f3a6.diff

LOG: [WebAssembly] Fixed debugloc in DebugFixup pass

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

Differential Revision:  https://reviews.llvm.org/D80019

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/WebAssembly/WebAssemblyDebugFixup.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyDebugFixup.cpp
index 3b0844351a78..8f1f77e23b8e 100644
--- a/llvm/lib/Target/WebAssembly/WebAssemblyDebugFixup.cpp
+++ b/llvm/lib/Target/WebAssembly/WebAssemblyDebugFixup.cpp
@@ -118,7 +118,7 @@ bool WebAssemblyDebugFixup::runOnMachineFunction(MachineFunction &MF) {
               // 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());
             }


        


More information about the llvm-commits mailing list