def METHOD_NAME(desc, kind):
    """Add `desc` to the lookup table so that other descriptions that use
    it can find it."""
    if kind == "struct":
        if (desc.variety, desc.tag) not in struct_names:
            struct_names[(desc.variety, desc.tag)] = desc
    if kind == "enum":
        if desc.tag not in enum_names:
            enum_names[desc.tag] = desc
    if kind == "typedef":
        if desc.name not in typedef_names:
            typedef_names[desc.name] = desc
    if kind in ("function", "constant", "variable", "macro"):
        if desc.name not in ident_names:
            ident_names[desc.name] = desc