mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
Rename template constant -> concrete constant. (#4939)
This implements a direction decided in a [recent discussion](https://docs.google.com/document/d/1Iut5f2TQBrtBNIduF4vJYOKfw7MbS8xH_J01_Q4e6Rk/edit?resourcekey=0-mc_vh5UzrzXfU4kO-3tOjA&tab=t.0#heading=h.mas1g68xx9ct) to switch away from "template constant" when naming a constant that doesn't depend on any generic parameters, because that creates confusion with template-dependent constant values that depend on a template parameter.
This commit is contained in:
@@ -32,7 +32,7 @@ class ConstantContext {
|
||||
// lowered. Returns nullptr if it hasn't been, in which case it should not be
|
||||
// needed.
|
||||
auto GetConstant(SemIR::ConstantId const_id) const -> llvm::Constant* {
|
||||
CARBON_CHECK(const_id.is_template(), "Unexpected constant ID {0}",
|
||||
CARBON_CHECK(const_id.is_concrete(), "Unexpected constant ID {0}",
|
||||
const_id);
|
||||
auto inst_id =
|
||||
file_context_->sem_ir().constant_values().GetInstId(const_id);
|
||||
@@ -248,8 +248,8 @@ auto LowerConstants(FileContext& file_context,
|
||||
// dependencies of a constant before we lower the constant itself.
|
||||
for (auto [inst_id_val, const_id] :
|
||||
llvm::enumerate(file_context.sem_ir().constant_values().array_ref())) {
|
||||
if (!const_id.has_value() || !const_id.is_template()) {
|
||||
// We are only interested in lowering template constants.
|
||||
if (!const_id.has_value() || !const_id.is_concrete()) {
|
||||
// We are only interested in lowering concrete constants.
|
||||
continue;
|
||||
}
|
||||
auto inst_id = file_context.sem_ir().constant_values().GetInstId(const_id);
|
||||
|
||||
Reference in New Issue
Block a user