[WebAssembly] Move .debug_line section address of dead function outside section range
authorYury Delendik <ydelendik@mozilla.com>
Mon, 24 Sep 2018 23:50:55 +0000 (23:50 +0000)
committerYury Delendik <ydelendik@mozilla.com>
Mon, 24 Sep 2018 23:50:55 +0000 (23:50 +0000)
commitd66aabc6d755706693db40bc6680e965c4cad947
tree8b8d3a6202eaa32f3db2b9e61ecb532ed250792f
parent51313bc6d97d32b39c20c2b5c913e9b023967835
[WebAssembly] Move .debug_line section address of dead function outside section range

Summary:
Currently we are pointing all debug information that refer removed function code
to the beginning of the code section (offset = 0). A debugger may want to
resolve code offset to the debug information, which will collide with offsets
of the live functions.

Moving offsets of dead functions outside code section range.

Reviewers: sbc100

Reviewed By: sbc100

Subscribers: dblaikie, ruiu, alexcrichton, dschuff, aprantl, jgravelle-google, aheejin, sunfish, JDevlieghere, llvm-commits

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

llvm-svn: 342930
lld/test/wasm/debug-removed-fn.ll [new file with mode: 0644]
lld/wasm/InputFiles.cpp