]> granicus.if.org Git - llvm/commitdiff
Merging part of 292188:
authorTom Stellard <tstellar@redhat.com>
Fri, 26 May 2017 14:32:08 +0000 (14:32 +0000)
committerTom Stellard <tstellar@redhat.com>
Fri, 26 May 2017 14:32:08 +0000 (14:32 +0000)
------------------------------------------------------------------------
r292188 | ab | 2017-01-16 22:10:02 -0500 (Mon, 16 Jan 2017) | 11 lines

[TLI] Add prototype checking for all remaining LibFuncs.

This is another step towards unifying all LibFunc prototype checks.
This work started in r267758 (D19469);  add the remaining checks.

Also add a unittest that checks each libfunc declared with a known-valid
and known-invalid prototype.  New libfuncs added in the future are
required to have prototype checking in place; the known-valid test will
fail otherwise.

Differential Revision: https://reviews.llvm.org/D28030
------------------------------------------------------------------------

This ports just the fix for the log1p LibFunc to fix a crash on
FreeBSD.  See PR32494 and PR32495.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_40@303992 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/TargetLibraryInfo.cpp

index 112118ab77eba53baeedb0605f57adc09c0e761a..450901aca7da6ea97b2703b2bc1d0f22d2e02488 100644 (file)
@@ -937,6 +937,7 @@ bool TargetLibraryInfoImpl::isValidProtoForLibFunc(const FunctionType &FTy,
   case LibFunc::log10:
   case LibFunc::log10f:
   case LibFunc::log10l:
+  case LibFunc::log1p:
   case LibFunc::log2:
   case LibFunc::log2f:
   case LibFunc::log2l: