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

Chih-Hung Hsieh via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 30 18:42:03 PST 2018


chh 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()) {
----------------
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?




https://reviews.llvm.org/D42668





More information about the llvm-commits mailing list