[PATCH] D42668: [Analysis] Disable calls to *_finite and other glibc-only functions on Android.

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 30 18:45:30 PST 2018


efriedma added inline comments.


================
Comment at: lib/Analysis/TargetLibraryInfo.cpp:401
+  // The following functions are available on Linux,
+  // but Android uses bionic instead of glibc.
+  if (!T.isOSLinux() || T.isAndroid()) {
----------------
chh wrote:
> efriedma wrote:
> > Maybe instead of `!T.isOSLinux() || T.isAndroid()`, this should be `!T.isOSLinux() || !T.isGNUEnvironment()`, so it's clear this is the set of functions specifically available on glibc?
> I tried to use !T.isGNUEnvironment() instead of T.isAndroid().
> The Transforms/InferFunctionAttrs/annotate.ll test failed because it expects x86_64-unknown-linux to be treated as isOSLinux() here.
> I am not sure which clang targets use unknown-linux plus glibc.
> Shall we only limit Android target for now?
> 
> 
Oh, didn't think of that.

Sure, let's limit to Android for now.


https://reviews.llvm.org/D42668





More information about the llvm-commits mailing list