summaryrefslogtreecommitdiffstats
path: root/source/slang/slang-ir-lower-witness-lookup.h
blob: 434e97f3e86a96222cdd9f7a85a66a8d3ac1b287 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// slang-ir-lower-witness-lookup.h
#pragma once

namespace Slang
{
struct IRModule;
class DiagnosticSink;

/// Lower calls to a witness lookup into a call to a dispatch function.
/// For example, if we see call(witnessLookup(wt, key)), we will create a
/// dispatch function that calls into different implementations based on witness table
/// ID. The dispatch function will be called instead of witnessLookup.
bool lowerWitnessLookup(IRModule* module, DiagnosticSink* sink);

} // namespace Slang