diff options
Diffstat (limited to 'llvm/lib/MC/WasmObjectWriter.cpp')
| -rw-r--r-- | llvm/lib/MC/WasmObjectWriter.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/MC/WasmObjectWriter.cpp b/llvm/lib/MC/WasmObjectWriter.cpp index 87ef0d927ee..a05948e2946 100644 --- a/llvm/lib/MC/WasmObjectWriter.cpp +++ b/llvm/lib/MC/WasmObjectWriter.cpp @@ -1024,6 +1024,9 @@ void WasmObjectWriter::writeObject(MCAssembler &Asm, Imports.push_back(Import); WasmIndices[&WS] = NumFunctionImports++; } else if (WS.isGlobal()) { + if (WS.isWeak()) + report_fatal_error("undefined global symbol cannot be weak"); + wasm::WasmImport Import; Import.Module = WS.getModuleName(); Import.Field = WS.getName(); |

