[lld] r326294 - [WebAssembly] Add test for `--undefined` flag. NFC.

Sam Clegg via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 27 17:42:16 PST 2018


Author: sbc
Date: Tue Feb 27 17:42:16 2018
New Revision: 326294

URL: http://llvm.org/viewvc/llvm-project?rev=326294&view=rev
Log:
[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

Modified:
    lld/trunk/test/wasm/undefined.ll

Modified: lld/trunk/test/wasm/undefined.ll
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/wasm/undefined.ll?rev=326294&r1=326293&r2=326294&view=diff
==============================================================================
--- lld/trunk/test/wasm/undefined.ll (original)
+++ lld/trunk/test/wasm/undefined.ll Tue Feb 27 17:42:16 2018
@@ -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




More information about the llvm-commits mailing list