|
|
@ -218,17 +218,9 @@ void SingularStringView::GenerateStaticMembers(io::Printer* p) const { |
|
|
|
void SingularStringView::GenerateAccessorDeclarations(io::Printer* p) const { |
|
|
|
void SingularStringView::GenerateAccessorDeclarations(io::Printer* p) const { |
|
|
|
ABSL_CHECK(!field_->options().has_ctype()); |
|
|
|
ABSL_CHECK(!field_->options().has_ctype()); |
|
|
|
|
|
|
|
|
|
|
|
auto vars = AnnotatedAccessors(field_, {"", "set_allocated_"}); |
|
|
|
auto v1 = p->WithVars(AnnotatedAccessors(field_, {""})); |
|
|
|
vars.push_back(Sub{ |
|
|
|
|
|
|
|
"release_name", |
|
|
|
|
|
|
|
SafeFunctionName(field_->containing_type(), field_, "release_"), |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
.AnnotatedAs(field_)); |
|
|
|
|
|
|
|
auto v1 = p->WithVars(vars); |
|
|
|
|
|
|
|
auto v2 = p->WithVars( |
|
|
|
auto v2 = p->WithVars( |
|
|
|
AnnotatedAccessors(field_, {"set_"}, AnnotationCollector::kSet)); |
|
|
|
AnnotatedAccessors(field_, {"set_"}, AnnotationCollector::kSet)); |
|
|
|
auto v3 = p->WithVars( |
|
|
|
|
|
|
|
AnnotatedAccessors(field_, {"mutable_"}, AnnotationCollector::kAlias)); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
p->Emit( |
|
|
|
p->Emit( |
|
|
|
{{"donated", |
|
|
|
{{"donated", |
|
|
@ -305,8 +297,6 @@ void SingularStringView::GenerateInlineAccessorDefinitions( |
|
|
|
} |
|
|
|
} |
|
|
|
)cc"); |
|
|
|
)cc"); |
|
|
|
}}, |
|
|
|
}}, |
|
|
|
{"release_name", |
|
|
|
|
|
|
|
SafeFunctionName(field_->containing_type(), field_, "release_")}, |
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
R"cc( |
|
|
|
R"cc( |
|
|
|
inline absl::string_view $Msg$::$name$() const |
|
|
|
inline absl::string_view $Msg$::$name$() const |
|
|
|