Rename Carbon::StringLiteralId -> Carbon::StringLiteralValueId. (#3522)

We have `StringLiteral`s in multiple other `Carbon` sub-namespaces.
Rename to a more specific name to avoid collisions.

We should likely also rename `Carbon::IntId` -> `Carbon::IntValueId` and
`Carbon::RealId` -> `Carbon::RealValueId`, but this collision is
prioritized because it was blocking work on typed parse nodes which
introduces a `Carbon::Parse::StringLiteralId`.
This commit is contained in:
Richard Smith
2023-12-18 23:27:33 +00:00
committed by GitHub
parent 9390e666ce
commit d87fe8b532
14 changed files with 43 additions and 39 deletions
+4 -4
View File
@@ -108,8 +108,8 @@ auto TokenizedBuffer::GetRealLiteral(TokenIndex token) const -> RealId {
return token_info.real_id;
}
auto TokenizedBuffer::GetStringLiteral(TokenIndex token) const
-> StringLiteralId {
auto TokenizedBuffer::GetStringLiteralValue(TokenIndex token) const
-> StringLiteralValueId {
const auto& token_info = GetTokenInfo(token);
CARBON_CHECK(token_info.kind == TokenKind::StringLiteral) << token_info.kind;
return token_info.string_literal_id;
@@ -270,8 +270,8 @@ auto TokenizedBuffer::PrintToken(llvm::raw_ostream& output_stream,
break;
case TokenKind::StringLiteral:
output_stream << ", value: `"
<< value_stores_->string_literals().Get(
GetStringLiteral(token))
<< value_stores_->string_literal_values().Get(
GetStringLiteralValue(token))
<< "`";
break;
default: