[WebAssembly] Ensure BasicSymbolRef.getRawDataRefImpl().p is non-null
commit0bd89c0d565f899e2d61c277c80f6bd0a92c1174
authorSam Clegg <sbc@chromium.org>
Tue, 29 Jan 2019 22:22:32 +0000 (29 22:22 +0000)
committerSam Clegg <sbc@chromium.org>
Tue, 29 Jan 2019 22:22:32 +0000 (29 22:22 +0000)
treee55d61c923cbefaecf07042b4f12ce213f6b5358
parent728963ac49cd8e6451f4214d3da325bbac72dc72
[WebAssembly] Ensure BasicSymbolRef.getRawDataRefImpl().p is non-null

Store a non-zero value to ref.d.a and use ref.d.b to store the symbol
index.  This means that ref.p is never null, which was confusing
llvm-nm.

Fixes PR40497

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@352551 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Object/WasmObjectFile.cpp
test/tools/llvm-nm/lit.local.cfg
test/tools/llvm-nm/wasm/extern-only.ll [new file with mode: 0644]