aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp
diff options
context:
space:
mode:
authorHeejin Ahn <aheejin@gmail.com>2018-04-14 00:12:12 +0000
committerHeejin Ahn <aheejin@gmail.com>2018-04-14 00:12:12 +0000
commit92401cc1cf42362c1a9b9405b9a7c5f97127a5e2 (patch)
tree6e9e617523081cd0a565b06681a69c0942b2181b /llvm/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp
parent95f421cfbf6b56a9d2d0208f972a911458fb9bc1 (diff)
downloadllvm-92401cc1cf42362c1a9b9405b9a7c5f97127a5e2.zip
llvm-92401cc1cf42362c1a9b9405b9a7c5f97127a5e2.tar.gz
llvm-92401cc1cf42362c1a9b9405b9a7c5f97127a5e2.tar.bz2
[WebAssembly] Fix a bug in MachineBasicBlock::findDebugLoc() call
Summary: InsertPos is within the bacic block `Header`, so `findDebugLoc()` should be called on not `MBB` but `Header` instead. Reviewers: yurydelendik Subscribers: jfb, dschuff, aprantl, sbc100, jgravelle-google, sunfish, JDevlieghere, llvm-commits Differential Revision: https://reviews.llvm.org/D45648 llvm-svn: 330079
Diffstat (limited to 'llvm/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp')
-rw-r--r--llvm/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp
index 3d9651c..12664e6 100644
--- a/llvm/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp
+++ b/llvm/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp
@@ -147,9 +147,10 @@ static void PlaceBlockMarker(
}
// Add the BLOCK.
- MachineInstr *Begin = BuildMI(*Header, InsertPos, MBB.findDebugLoc(InsertPos),
- TII.get(WebAssembly::BLOCK))
- .addImm(int64_t(WebAssembly::ExprType::Void));
+ MachineInstr *Begin =
+ BuildMI(*Header, InsertPos, Header->findDebugLoc(InsertPos),
+ TII.get(WebAssembly::BLOCK))
+ .addImm(int64_t(WebAssembly::ExprType::Void));
// Mark the end of the block.
InsertPos = MBB.begin();