================
@@ -0,0 +1,7 @@
+// RUN: %clang_cc1 -triple wasm32-unknown-unknown-wasm -emit-llvm-only -verify
%s
+
+// Test import on non-wasm-variable (addrspace 0)
+extern const int defined_g_addrspace0
+ __attribute__((import_module("js"))); // expected-error {{import attribute
cannot be applied to a non-wasm-variable global}}
----------------
sbc100 wrote:
I think that works yes. It probably makes more sense with dynamic linking,
but I think it works for static linking too.
Still, this seems like restriction would could always relax later.
https://github.com/llvm/llvm-project/pull/201966
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits