From: Sam Clegg Date: Wed, 28 Feb 2018 01:42:16 +0000 (+0000) Subject: [WebAssembly] Add test for `--undefined` flag. NFC. X-Git-Tag: llvmorg-7.0.0-rc1~11795 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=42cf40b4c586411e88b3a59866643f7ece9831c7;p=platform%2Fupstream%2Fllvm.git [WebAssembly] Add test for `--undefined` flag. NFC. Specifically the case where the undefined symbol is not found during the link. Differential Revision: https://reviews.llvm.org/D43846 llvm-svn: 326294 --- diff --git a/lld/test/wasm/undefined.ll b/lld/test/wasm/undefined.ll index ac86c6c..69b7a82 100644 --- a/lld/test/wasm/undefined.ll +++ b/lld/test/wasm/undefined.ll @@ -1,9 +1,10 @@ ; RUN: llc -filetype=obj %s -o %t.o ; RUN: wasm-ld --check-signatures --allow-undefined -o %t.wasm %t.o -; Fails due to undefined 'foo' -; RUN: not wasm-ld --check-signatures -o %t.wasm %t.o 2>&1 | FileCheck %s +; Fails due to undefined 'foo' and also 'baz' +; RUN: not wasm-ld --check-signatures --undefined=baz -o %t.wasm %t.o 2>&1 | FileCheck %s ; CHECK: error: {{.*}}.o: undefined symbol: foo +; CHECK: error: undefined symbol: baz ; But succeeds if we pass a file containing 'foo' as --allow-undefined-file. ; RUN: echo 'foo' > %t.txt