mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-06 07:54:41 +01:00
Pass imports to SemIR. (#3415)
This adds instructions so that we get printing. I may adjust the instruction format a little further to add a type, but I think the basic setup will remain. Note this builds on #3414
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
#include "toolchain/base/value_store.h"
|
||||
#include "toolchain/base/yaml.h"
|
||||
#include "toolchain/sem_ir/builtin_kind.h"
|
||||
#include "toolchain/sem_ir/ids.h"
|
||||
#include "toolchain/sem_ir/inst.h"
|
||||
#include "toolchain/sem_ir/inst_kind.h"
|
||||
|
||||
@@ -203,6 +204,7 @@ static auto GetTypePrecedence(InstKind kind) -> int {
|
||||
case Deref::Kind:
|
||||
case Field::Kind:
|
||||
case FunctionDecl::Kind:
|
||||
case Import::Kind:
|
||||
case InitializeFrom::Kind:
|
||||
case IntegerLiteral::Kind:
|
||||
case Namespace::Kind:
|
||||
@@ -406,6 +408,7 @@ auto File::StringifyTypeExpr(InstId outer_inst_id, bool in_type_context) const
|
||||
case Deref::Kind:
|
||||
case Field::Kind:
|
||||
case FunctionDecl::Kind:
|
||||
case Import::Kind:
|
||||
case InitializeFrom::Kind:
|
||||
case IntegerLiteral::Kind:
|
||||
case Namespace::Kind:
|
||||
@@ -473,6 +476,7 @@ auto GetExprCategory(const File& file, InstId inst_id) -> ExprCategory {
|
||||
case ClassDecl::Kind:
|
||||
case Field::Kind:
|
||||
case FunctionDecl::Kind:
|
||||
case Import::Kind:
|
||||
case Namespace::Kind:
|
||||
case NoOp::Kind:
|
||||
case Return::Kind:
|
||||
|
||||
Reference in New Issue
Block a user