Skip to content

Commit d9334f6

Browse files
committed
Delete some dead functions from tools.codegen.api.meta
Signed-off-by: Edward Z. Yang <[email protected]> [ghstack-poisoned]
1 parent e507b0d commit d9334f6

File tree

1 file changed

+0
-26
lines changed

1 file changed

+0
-26
lines changed

tools/codegen/api/meta.py

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -21,32 +21,6 @@ def argument_type(a: Argument) -> str:
2121
assert not a.is_write
2222
return dispatcher.argumenttype_type(a.type, mutable=False)
2323

24-
def returntype_type(t: Type) -> str:
25-
r = cpp.valuetype_type(t)
26-
if r is not None:
27-
return r
28-
29-
if isinstance(t, BaseType):
30-
if t.name == BaseTy.Tensor:
31-
return 'TensorMeta'
32-
elif isinstance(t, ListType):
33-
raise NotImplementedError("list returns not supported yet")
34-
35-
raise AssertionError(f"unrecognized return type {t}")
36-
37-
def return_type(r: Return) -> str:
38-
assert not r.is_write
39-
return returntype_type(r.type)
40-
41-
def returns_type(rs: Sequence[Return]) -> str:
42-
if len(rs) == 0:
43-
return 'void'
44-
elif len(rs) == 1:
45-
return return_type(rs[0])
46-
else:
47-
args = ','.join(map(return_type, rs))
48-
return f'std::tuple<{args}>'
49-
5024
def argument(a: Argument) -> MetaArgument:
5125
return MetaArgument(
5226
type=argument_type(a),

0 commit comments

Comments
 (0)