1 # ====-- Function class for libc function headers -------------*- python -*--==#
3 # Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 # See https://llvm.org/LICENSE.txt for license information.
5 # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 # ==-------------------------------------------------------------------------==#
12 self
, return_type
, name
, arguments
, standards
, guard
=None, attributes
=[]
14 self
.return_type
= return_type
17 arg
if isinstance(arg
, str) else arg
["type"] for arg
in arguments
19 self
.standards
= standards
21 self
.attributes
= attributes
or ""
24 attributes_str
= " ".join(self
.attributes
)
25 arguments_str
= ", ".join(self
.arguments
)
26 if attributes_str
== "":
27 result
= f
"{self.return_type} {self.name}({arguments_str})"
29 result
= f
"{attributes_str} {self.return_type} {self.name}({arguments_str})"