Files
carbon-lang/toolchain/lower/BUILD
T
Jon Ross-Perkins 79b9180eff Adds per-builtin instructions, removing BuiltinInst (#4556)
Adds per-builtin instructions, removing `BuiltinInst`. This collapses
`builtin_inst_kind.def` into `inst_kind.def` so that we have a single
place for all macro uses. I still want to remove `BuiltinInstKind`, but
it's something I think is better separated from the `BuiltinInst`
removal.

I'm collapsing the build targets `ids` and `inst_kind` into one because
they both have links to builtin kind information now. It's hard to
separate without a cycle. I'm using the `typed_insts` name because that
seems like the actual most significant thing there, and more interesting
relative to the `inst` target.
2024-11-21 00:48:24 +00:00

62 lines
1.5 KiB
Python

# 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
load("@rules_cc//cc:defs.bzl", "cc_library")
package(default_visibility = ["//visibility:public"])
filegroup(
name = "testdata",
data = glob(["testdata/**/*.carbon"]),
)
cc_library(
name = "lower",
srcs = ["lower.cpp"],
hdrs = ["lower.h"],
deps = [
":context",
"//toolchain/check:sem_ir_diagnostic_converter",
"//toolchain/sem_ir:file",
"//toolchain/sem_ir:inst_namer",
"@llvm-project//llvm:Core",
"@llvm-project//llvm:Support",
],
)
cc_library(
name = "context",
srcs = [
"constant.cpp",
"constant.h",
"file_context.cpp",
"function_context.cpp",
"mangler.cpp",
"mangler.h",
] +
# Glob handler files to avoid missing any.
glob([
"handle*.cpp",
]),
hdrs = [
"file_context.h",
"function_context.h",
],
deps = [
"//common:check",
"//common:map",
"//common:vlog",
"//toolchain/base:kind_switch",
"//toolchain/check:sem_ir_diagnostic_converter",
"//toolchain/sem_ir:entry_point",
"//toolchain/sem_ir:file",
"//toolchain/sem_ir:inst",
"//toolchain/sem_ir:inst_namer",
"//toolchain/sem_ir:typed_insts",
"@llvm-project//llvm:Core",
"@llvm-project//llvm:Support",
"@llvm-project//llvm:TransformUtils",
],
)