aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp
diff options
context:
space:
mode:
authorAaron Ballman <aaron@aaronballman.com>2022-12-08 07:33:42 -0500
committerAaron Ballman <aaron@aaronballman.com>2022-12-08 07:36:07 -0500
commite321c53f7bb8d61f64b33e8b1f6a97eb32eaaa69 (patch)
tree6c848e94eb580f102ff0b1ff6e39e88512728db8 /llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp
parent9816fc7fd48d4be327baf4c5f6b9c478dccc2cd8 (diff)
downloadllvm-e321c53f7bb8d61f64b33e8b1f6a97eb32eaaa69.zip
llvm-e321c53f7bb8d61f64b33e8b1f6a97eb32eaaa69.tar.gz
llvm-e321c53f7bb8d61f64b33e8b1f6a97eb32eaaa69.tar.bz2
[C2x] Relaxing requirements for va_start
This implements WG14 N2975 relaxing requirements for va_start (https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2975.pdf), which does two things: 1) Allows the declaration of a variadic function without any named arguments. e.g., void f(...) is now valid, as in C++. 2) Modified the signature of the va_start macro to be a variadic macro that accepts one or more arguments; the second (and later) arguments are not expanded or evaluated. I followed the GCC implementation in terms of not modifying the behavior of `__builtin_va_start` (it still requires exactly two arguments), but this approach has led to several QoI issues that I've documented with FIXME comments in the test. Specifically, the requirement that we do not evaluate *or expand* the second and later arguments means it's no longer possible to issue diagnostics for compatibility with older C versions and C++. I am reaching out to folks in WG14 to see if we can get an NB comment to address these concerns (the US comment period has already closed, so I cannot file the comment myself), so the diagnostic behavior may change in the future. I took this opportunity to add some documentation for all the related builtins in this area, since there was no documentation for them yet. Differential Revision: https://reviews.llvm.org/D139436
Diffstat (limited to 'llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp')
0 files changed, 0 insertions, 0 deletions