[libc-commits] [libc] [libc] newhdrgen: updated sorting of guarded functions in fuction generation (PR #98241)

Amy Huang via libc-commits libc-commits at lists.llvm.org
Tue Jul 9 16:44:11 PDT 2024


================
@@ -23,9 +23,12 @@ def __init__(
         self.attributes = attributes or ""
 
     def __str__(self):
-        attributes_str = self.attributes
+        attributes_str = " ".join(self.attributes)
         arguments_str = ", ".join(self.arguments)
-        result = f"{self.return_type} {self.name}({arguments_str}){attributes_str};"
+        if attributes_str == "":
----------------
amykhuang wrote:

Do we need the if/else here or can we just put {attributes_str} in the front either way? 

https://github.com/llvm/llvm-project/pull/98241


More information about the libc-commits mailing list