[libc-commits] [PATCH] D130872: [libc] Add GNU extension functions pthread_setname_np and pthread_getname_np.
Siva Chandra via Phabricator via libc-commits
libc-commits at lists.llvm.org
Mon Aug 1 16:05:34 PDT 2022
sivachandra added inline comments.
Comment at: libc/spec/spec.td:110
+def PThreadTType : NamedType<"pthread_t">;
> would it be reasonable to make the gnu extensions depend on the posix extensions instead of moving this to the global types?
I suppose you mean that we should include `posix.td` in `gnu.td`? I think that is a fair concern in this particular case as this particular GNU extension is actually an extension of the POSIX standard. But, that is not the case in general. Also, the `.td` files are like the header files. So, say `posix.td` includes `stdc.td` and `gnu_ext.td` also includes `stdc.td`, then a config including `posix,td`, `gnu_ext.td` and `stdc.td` will get duplicate/triplicate definitions. Even if we have something like a header-guard to avoid such duplicates, what will happen is that a config wanting, say only the GNU extensions, will also see the POSIX extensions.
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
More information about the libc-commits