[llvm] [WebAssembly] Add path to PIC mode for wasm tables (PR #67545)

Paulo Matos via llvm-commits llvm-commits at lists.llvm.org
Sun Oct 1 23:34:10 PDT 2023


================
@@ -1,5 +1,5 @@
-# RUN: llvm-mc -triple=wasm32-unknown-unknown -filetype=obj < %s | obj2yaml | FileCheck %s
-# RUN: llvm-mc -triple=wasm32-unknown-unknown -mattr=+reference-types -filetype=obj < %s | obj2yaml | FileCheck --check-prefix=REF %s
+# RUN: sed -e '/^REF-/d' %s | llvm-mc -triple=wasm32-unknown-unknown -filetype=obj | obj2yaml | FileCheck %s
+# RUN: sed -e 's/^REF-//g' %s | llvm-mc -triple=wasm32-unknown-unknown -mattr=+reference-types -filetype=obj | obj2yaml | FileCheck --check-prefix=REF %s
----------------
pmatos wrote:

We have at least test in WebAssembly (tls-local-exec.ll) using sed. There are many in RISCV which uses sed to replace types depending on current running arch, etc. We need this here to ensure that without reference types we don't add a table and if we do have reference types, the result is correct. Alternatively we need another test file. I am happy to do that if you're not keen on sed but sed is very much used together with lit tests in general. 

https://github.com/llvm/llvm-project/pull/67545


More information about the llvm-commits mailing list