mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 21:01:21 +01:00
adds a field to SemIR::Interface to indicate whether it is a core interface (#7091)
The existing `GetCoreInterface` has linear-time complexity and adds more than the search criteria to the `CoreInterfaceCache`. Adding a new field to `Interface` changes this operation when building packages other than `Core`, as this should only be set for the core library.
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
// Part of the Carbon Language project, under the Apache License v2.0 with LLVM
|
||||
// Exceptions. See /LICENSE for license information.
|
||||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
|
||||
#include "toolchain/sem_ir/core_interface.h" // IWYU pragma: keep
|
||||
|
||||
#include "toolchain/sem_ir/inst_kind.h"
|
||||
|
||||
namespace Carbon::SemIR {
|
||||
CARBON_DEFINE_ENUM_CLASS_NAMES(CoreInterface) {
|
||||
#define CARBON_SEM_IR_CORE_INTERFACE_KIND(Name) \
|
||||
CARBON_ENUM_CLASS_NAME_STRING(Name)
|
||||
#include "toolchain/sem_ir/core_interface_kind.def"
|
||||
};
|
||||
} // namespace Carbon::SemIR
|
||||
Reference in New Issue
Block a user