mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 17:11:04 +01:00
Add SemIR::MakeSymbolicConstantId(int) (#4862)
Symbolic constants are negative values (starting at -3 at the moment) but instead of having to figure the correct integer value for MakeConstantId, provide a function to make a symbolic constant directly.
This commit is contained in:
@@ -246,6 +246,9 @@ LLVM_DUMP_METHOD static auto MakeClassId(int id) -> ClassId {
|
||||
LLVM_DUMP_METHOD static auto MakeConstantId(int id) -> ConstantId {
|
||||
return ConstantId(id);
|
||||
}
|
||||
LLVM_DUMP_METHOD static auto MakeSymbolicConstantId(int id) -> ConstantId {
|
||||
return ConstantId::ForSymbolicConstantIndex(id);
|
||||
}
|
||||
LLVM_DUMP_METHOD static auto MakeEntityNameId(int id) -> EntityNameId {
|
||||
return EntityNameId(id);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user