[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 15:38:34 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()) {
----------------
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?
================
Comment at: lib/Analysis/TargetLibraryInfo.cpp:410
+ // Android has memalign.
+ if (!T.isOSLinux())
+ TLI.setUnavailable(LibFunc_memalign);
----------------
If would probably be more clear to write this as "if (!T.isAndroid())". Or maybe move this out into its own if statement.
https://reviews.llvm.org/D42668
More information about the llvm-commits
mailing list