mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 13:11:05 +01:00
Lowering of Branch / BranchIf / BranchWithArg / BlockArg. (#2904)
This gives us complete lowering of `if` expressions plus `and` and `or`. Co-authored-by: Jon Ross-Perkins <jperkins@google.com>
This commit is contained in:
co-authored by
Jon Ross-Perkins
parent
c27f41c94b
commit
0d4d392d12
@@ -285,7 +285,8 @@ class SemanticsNode {
|
||||
SemanticsStringId /*name_id*/,
|
||||
SemanticsNodeId /*node_id*/>;
|
||||
|
||||
using BlockArg = Factory<SemanticsNodeKind::BlockArg>;
|
||||
using BlockArg =
|
||||
Factory<SemanticsNodeKind::BlockArg, SemanticsNodeBlockId /*block_id*/>;
|
||||
|
||||
using BoolLiteral =
|
||||
Factory<SemanticsNodeKind::BoolLiteral, SemanticsBoolValue /*value*/>;
|
||||
@@ -450,6 +451,9 @@ struct SemanticsIdMapInfo {
|
||||
|
||||
// Support use of Id types as DenseMap/DenseSet keys.
|
||||
template <>
|
||||
struct llvm::DenseMapInfo<Carbon::SemanticsNodeBlockId>
|
||||
: public Carbon::SemanticsIdMapInfo<Carbon::SemanticsNodeBlockId> {};
|
||||
template <>
|
||||
struct llvm::DenseMapInfo<Carbon::SemanticsNodeId>
|
||||
: public Carbon::SemanticsIdMapInfo<Carbon::SemanticsNodeId> {};
|
||||
template <>
|
||||
|
||||
Reference in New Issue
Block a user