[PATCH] D76959: [WebAssembly] Import wasm_simd128.h from Emscripten

Thomas Lively via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Mar 27 18:12:40 PDT 2020


tlively marked 2 inline comments as done.
tlively added inline comments.


================
Comment at: clang/lib/Headers/wasm_simd128.h:10
+
+#pragma once
+
----------------
sunfish wrote:
> Do you know why other clang headers, such as `lib/Headers/xmmintrin.h`, don't use `#pragma once`?
No, I don't know. According to https://github.com/emscripten-core/emscripten/pull/9299#discussion_r316893349 `#pragma once` is the convention in Emscripten's header files, but I don't know what the trade offs are. @sbc100 do you have a better answer for this?


================
Comment at: clang/lib/Headers/wasm_simd128.h:42
+
+// v128 wasm_v128_load(void* mem)
+static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_v128_load(const void *__mem) {
----------------
sunfish wrote:
> This comment (and similar throughout the file) don't seem to be adding any new information.
I agree. These have been around since the beginning of the file and we just kept adding them for consistency and never did anything else with them. I'll remove them now, but in the future (once the proposal is standardized?) we should put actual doc comments in their place, like xmmintrin.h has.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D76959/new/

https://reviews.llvm.org/D76959





More information about the cfe-commits mailing list