[Offload] Add tagged type to enumerator docs (#147998)

When `EnumRec::isTyped()` is true, include the
`EnumValueRec::getTaggedType()` to the documentation.
This commit is contained in:
Kenneth Benzie (Benie)
2025-07-14 13:35:36 +01:00
committed by GitHub
parent d214f07f09
commit b520d21c02

View File

@@ -86,7 +86,11 @@ void processEnum(const EnumRec &E, raw_ostream &OS) {
for (const EnumValueRec Etor : E.getValues()) {
OS << formatv(" .. c:enumerator:: {0}_{1}\n\n", E.getEnumValNamePrefix(),
Etor.getName());
OS << " " << Etor.getDesc() << "\n\n";
OS << " ";
if (E.isTyped()) {
OS << ":c:expr:`" << Etor.getTaggedType() << "` — ";
}
OS << Etor.getDesc() << "\n\n";
}
}