llvm-project/clang/lib/Headers/hlsl
Chris Bieneman b8dbc6ffea [HLSL] Add ExternalSemaSource & vector alias
HLSL vector types are ext_vector types, but they are also exposed via a
template syntax `vector<T, #>`. This is morally equavalent to the code:

```c++
template <typename T, int Size>
using vector = T __attribute__((ext_vector_type(Size)))
```

The problem is that templates aren't supported before HLSL 2021, and
type aliases still aren't supported in HLSL.

To resolve this (and other issues where HLSL can't represent its own
types), we rely on an external AST & Sema source being registered for
HLSL code.

This patch adds the HLSLExternalSemaSource and registers the vector
type alias.

Depends on D127802

Differential Revision: https://reviews.llvm.org/D128012
2022-07-05 11:30:29 -05:00
..
hlsl_basic_types.h [HLSL] Add ExternalSemaSource & vector alias 2022-07-05 11:30:29 -05:00
hlsl_intrinsics.h [HLSL] Change WaveActiveCountBits to wrapper of __builtin_hlsl_wave_active_count_bits 2022-06-30 06:16:51 -07:00