forked from OSchip/llvm-project
[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
This commit is contained in:
parent
2c81508728
commit
62efd1eca2
|
@ -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());
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue