import-attribute-mismatch.ll 524 B

123456789101112131415161718
  1. ; RUN: llc -filetype=obj %s -o %t1.o
  2. ; RUN: llc -filetype=obj %S/Inputs/import-attributes.ll -o %t2.o
  3. ; RUN: not wasm-ld --export call_foo --allow-undefined -o %t.wasm %t1.o %t2.o 2>&1 | FileCheck %s
  4. target triple = "wasm32-unknown-unknown-wasm"
  5. define void @_start() {
  6. call void @foo();
  7. ret void
  8. }
  9. declare void @foo() #0
  10. attributes #0 = { "wasm-import-module"="bar" }
  11. ; CHECK: wasm-ld: error: import module mismatch for symbol: foo
  12. ; CHECK: >>> defined as bar in {{.*}}1.o
  13. ; CHECK: >>> defined as baz in {{.*}}2.o