| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260 |
- # 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", "cc_test")
- package(default_visibility = ["//visibility:public"])
- cc_library(
- name = "block_value_store",
- hdrs = ["block_value_store.h"],
- deps = [
- "//common:hashing",
- "//common:set",
- "//toolchain/base:value_store",
- "//toolchain/base:yaml",
- "@llvm-project//llvm:Support",
- ],
- )
- cc_library(
- name = "typed_insts",
- srcs = [
- "ids.cpp",
- "inst_kind.cpp",
- ],
- hdrs = [
- "id_kind.h",
- "ids.h",
- "inst_kind.h",
- "singleton_insts.h",
- "typed_insts.h",
- ],
- textual_hdrs = ["inst_kind.def"],
- deps = [
- "//common:check",
- "//common:enum_base",
- "//common:ostream",
- "//toolchain/base:index_base",
- "//toolchain/base:int",
- "//toolchain/base:value_ids",
- "//toolchain/diagnostics:diagnostic_emitter",
- "//toolchain/parse:node_kind",
- "@llvm-project//llvm:Support",
- ],
- )
- cc_library(
- name = "inst",
- srcs = ["inst.cpp"],
- hdrs = ["inst.h"],
- deps = [
- ":block_value_store",
- ":typed_insts",
- "//common:check",
- "//common:hashing",
- "//common:ostream",
- "//common:raw_string_ostream",
- "//common:struct_reflection",
- "//toolchain/base:index_base",
- "//toolchain/base:int",
- "//toolchain/base:value_store",
- "@llvm-project//llvm:Support",
- ],
- )
- cc_library(
- name = "file",
- srcs = [
- "builtin_function_kind.cpp",
- "class.cpp",
- "constant.cpp",
- "facet_type_info.cpp",
- "file.cpp",
- "function.cpp",
- "generic.cpp",
- "impl.cpp",
- "name.cpp",
- "name_scope.cpp",
- "type.cpp",
- "type_info.cpp",
- ],
- hdrs = [
- "associated_constant.h",
- "builtin_function_kind.h",
- "class.h",
- "constant.h",
- "copy_on_write_block.h",
- "entity_name.h",
- "entity_with_params_base.h",
- "facet_type_info.h",
- "file.h",
- "function.h",
- "generic.h",
- "impl.h",
- "import_ir.h",
- "interface.h",
- "name.h",
- "name_scope.h",
- "struct_type_field.h",
- "type.h",
- "type_info.h",
- ],
- textual_hdrs = [
- "builtin_function_kind.def",
- ],
- deps = [
- ":block_value_store",
- ":inst",
- ":typed_insts",
- "//common:check",
- "//common:enum_base",
- "//common:error",
- "//common:hashing",
- "//common:map",
- "//common:ostream",
- "//common:raw_string_ostream",
- "//common:set",
- "//toolchain/base:int",
- "//toolchain/base:kind_switch",
- "//toolchain/base:shared_value_stores",
- "//toolchain/base:value_ids",
- "//toolchain/base:value_store",
- "//toolchain/base:yaml",
- "//toolchain/lex:token_kind",
- "//toolchain/parse:node_kind",
- "//toolchain/parse:tree",
- "@llvm-project//llvm:Support",
- ],
- )
- cc_library(
- name = "stringify_type",
- srcs = ["stringify_type.cpp"],
- hdrs = ["stringify_type.h"],
- deps = [
- ":file",
- ":typed_insts",
- "//common:check",
- "//common:raw_string_ostream",
- "//toolchain/base:kind_switch",
- "@llvm-project//llvm:Support",
- ],
- )
- cc_library(
- name = "inst_namer",
- srcs = [
- "inst_fingerprinter.cpp",
- "inst_namer.cpp",
- ],
- hdrs = [
- "inst_fingerprinter.h",
- "inst_namer.h",
- ],
- deps = [
- ":file",
- ":typed_insts",
- "//common:ostream",
- "//common:raw_string_ostream",
- "//toolchain/base:kind_switch",
- "//toolchain/base:shared_value_stores",
- "//toolchain/base:value_ids",
- "//toolchain/lex:tokenized_buffer",
- "//toolchain/parse:tree",
- "@llvm-project//llvm:Support",
- ],
- )
- cc_library(
- name = "formatter",
- srcs = ["formatter.cpp"],
- hdrs = ["formatter.h"],
- deps = [
- ":file",
- ":inst_namer",
- ":typed_insts",
- "//common:ostream",
- "//toolchain/base:kind_switch",
- "//toolchain/base:shared_value_stores",
- "//toolchain/lex:tokenized_buffer",
- "//toolchain/parse:tree",
- "@llvm-project//llvm:Support",
- ],
- )
- cc_library(
- name = "entry_point",
- srcs = ["entry_point.cpp"],
- hdrs = ["entry_point.h"],
- deps = [
- ":file",
- "@llvm-project//llvm:Support",
- ],
- )
- cc_library(
- name = "absolute_node_id",
- srcs = ["absolute_node_id.cpp"],
- hdrs = ["absolute_node_id.h"],
- deps = [
- ":file",
- ":typed_insts",
- "//toolchain/parse:tree",
- "@llvm-project//llvm:Support",
- ],
- )
- cc_library(
- name = "dump",
- srcs = ["dump.cpp"],
- hdrs = ["dump.h"],
- deps = [
- ":file",
- ":stringify_type",
- "//common:ostream",
- ],
- # Always link dump methods so they are callable from a debugger
- # even though they are never called.
- alwayslink = 1,
- )
- cc_test(
- name = "name_scope_test",
- size = "small",
- srcs = ["name_scope_test.cpp"],
- deps = [
- ":file",
- "//testing/base:gtest_main",
- "@googletest//:gtest",
- ],
- )
- cc_test(
- name = "typed_insts_test",
- size = "small",
- srcs = ["typed_insts_test.cpp"],
- deps = [
- ":inst",
- ":typed_insts",
- "//testing/base:gtest_main",
- "@googletest//:gtest",
- ],
- )
- cc_test(
- name = "yaml_test",
- size = "small",
- srcs = ["yaml_test.cpp"],
- deps = [
- "//common:ostream",
- "//common:raw_string_ostream",
- "//testing/base:global_exe_path",
- "//testing/base:gtest_main",
- "//toolchain/driver",
- "//toolchain/testing:yaml_test_helpers",
- "@googletest//:gtest",
- "@llvm-project//llvm:Support",
- ],
- )
|