dschuff added inline comments.

================
Comment at: include/clang/Basic/BuiltinsWebAssembly.def:38
+// Atomic wait and wake.
+BUILTIN(__builtin_wasm_atomic_wait_i32, "Uii*iLLi", "n")
+BUILTIN(__builtin_wasm_atomic_wait_i64, "UiLLi*LLiLLi", "n")
----------------
So this means that the signature is basically `unsigned int 
__builtin_wasm_atomic_wait_i32(int *, int, long long)`? We should maybe make it 
`int __builtin_wasm_atomic_wait_i32(const unsigned char *, int, unsigned long 
long)`. Returning int so that you could define a C enum with the possible 
return values and compare without type coercion; unsigned char * so that it 
aliases with everything (i.e. a byte ptr), and unsigned long long since a 
negative relative timeout isn't meaningful(?). Not sure whether we should use 
int or unsigned int as the expected value, can't think of any particular reason 
right now to use one or the other.

Likewise with the other signatures.


Repository:
  rC Clang

https://reviews.llvm.org/D49396



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to