mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-11-23 13:50:11 +00:00
d462621694
This change implements parsing for HLSL's parameter modifier keywords `in`, `out` and `inout`. Because HLSL doesn't support references or pointers, these keywords are used to allow parameters to be passed in and out of functions. This change only implements the parsing and AST support. In the HLSL ASTs we represent `out` and `inout` parameters as references, and we implement the semantics of by-value passing during IR generation. In HLSL parameters marked `out` and `inout` are ambiguous in function declarations, and `in`, `out` and `inout` may be ambiguous at call sites. This means a function may be defined as `fn(in T)` and `fn(inout T)` or `fn(out T)`, but not `fn(inout T)` and `fn(out T)`. If a funciton `fn` is declared with `in` and `inout` or `out` arguments, the call will be ambiguous the same as a C++ call would be ambiguous given declarations `fn(T)` and `fn(T&)`. Fixes #59849 |
||
---|---|---|
.. | ||
access_specifiers.hlsl | ||
cb_error.hlsl | ||
group_shared_202x.hlsl | ||
group_shared.hlsl | ||
hlsl_groupshared.cpp | ||
hlsl_parameter_modifiers.cpp | ||
invalid_inside_cb.hlsl | ||
lit.local.cfg | ||
semantic_parsing.hlsl |