summaryrefslogtreecommitdiffstats
path: root/source/slang/slang-ir-any-value-marshalling.h
blob: 941dae5e8c2b0cbbabece6b7bfb264aae3e4c240 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// slang-ir-any-value-marshalling.h
#pragma once

#include "../core/slang-common.h"

namespace Slang
{
struct IRType;
struct SharedGenericsLoweringContext;

/// Generates functions that pack and unpack `AnyValue`s, and replaces
/// all `IRPackAnyValue` and `IRUnpackAnyValue` instructions with calls
/// to these packing/unpacking functions.
/// This is a sub-pass of lower-generics.
void generateAnyValueMarshallingFunctions(SharedGenericsLoweringContext* sharedContext);


/// Get the AnyValue size required to hold a value of `type`.
SlangInt getAnyValueSize(IRType* type);
} // namespace Slang