[Lldb-commits] [lldb] [lldb] Include api-level.h header for Android (PR #124383)
Brad Smith via lldb-commits
lldb-commits at lists.llvm.org
Mon Jan 27 10:07:33 PST 2025
================
@@ -29,6 +29,10 @@
#include <sys/utsname.h>
#include <unistd.h>
+#ifdef __ANDROID__
+#include <android/api-level.h>
----------------
brad0 wrote:
> what's the build failure you're seeing? this _should_ be included "for free" by all of the #includes above (via <sys/cdefs.h>, which they should all drag in).
>
> of course, if you're aiming for a style guide "explicitly include what you use" kind of thing, that's fine, but -- other than for style reasons -- you shouldn't ever _need_ this...
Only to keep with the style as was the case elsewhere. But looking at the big comment at the top of that header makes me unsure if it is really necessary. If ```api-level.h``` does not need to be explicitly included and ```__ANDROID_API__``` is assumed to always be defined I would go in the opposite direction and garbage collect the inclusion of this header.
https://github.com/llvm/llvm-project/pull/124383
More information about the lldb-commits
mailing list