aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
diff options
context:
space:
mode:
authorChris B <chris.bieneman@me.com>2023-11-28 15:03:10 -0600
committerGitHub <noreply@github.com>2023-11-28 15:03:10 -0600
commitd4626216943f8c4712bd17a709e439a0ffd0006b (patch)
treeae30c4f8d0fea79807fa00b9fa731dc660be320d /llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
parented27a4edb03809f0fe38f780765acfb97346c127 (diff)
downloadllvm-d4626216943f8c4712bd17a709e439a0ffd0006b.zip
llvm-d4626216943f8c4712bd17a709e439a0ffd0006b.tar.gz
llvm-d4626216943f8c4712bd17a709e439a0ffd0006b.tar.bz2
[HLSL] Parameter modifier parsing and AST (#72139)
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
Diffstat (limited to 'llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp')
0 files changed, 0 insertions, 0 deletions