]> granicus.if.org Git - llvm/commitdiff
TLI: darwin does not support _bcmp
authorAlex Lorenz <arphaman@gmail.com>
Wed, 7 Aug 2019 00:03:37 +0000 (00:03 +0000)
committerAlex Lorenz <arphaman@gmail.com>
Wed, 7 Aug 2019 00:03:37 +0000 (00:03 +0000)
Not all Darwin targets support _bcmp in all circumstances.

Differential Revision: https://reviews.llvm.org/D65834

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368113 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/TargetLibraryInfo.cpp
test/Transforms/InferFunctionAttrs/annotate.ll

index a7bae465bcfb186613a8fbc60dc31ca411bfcf23..1d8a5edb4ecc0fb8a5edd05ba81c619d96f6762c 100644 (file)
@@ -58,7 +58,7 @@ static bool hasBcmp(const Triple &TT) {
     return TT.isGNUEnvironment() || TT.isMusl();
   // Both NetBSD and OpenBSD are planning to remove the function. Windows does
   // not have it.
-  return TT.isOSFreeBSD() || TT.isOSSolaris() || TT.isOSDarwin();
+  return TT.isOSFreeBSD() || TT.isOSSolaris();
 }
 
 /// Initialize the set of available library functions based on the specified
index cb44647640036100a9532f2ca77b464dd119c538..3fcba714bf7a91d7b31c9e7f188778212a58e8e4 100644 (file)
@@ -241,8 +241,8 @@ declare i64 @atol(i8*)
 ; CHECK: declare i64 @atoll(i8* nocapture) [[G2]]
 declare i64 @atoll(i8*)
 
-; CHECK-DARWIN: declare i32 @bcmp(i8* nocapture, i8* nocapture, i64) [[G2]]
 ; CHECK-LINUX: declare i32 @bcmp(i8* nocapture, i8* nocapture, i64) [[G2]]
+; CHECK-DARWIN-NOT: declare i32 @bcmp(i8* nocapture, i8* nocapture, i64) [[G2]]
 ; CHECK-UNKNOWN-NOT: declare i32 @bcmp(i8* nocapture, i8* nocapture, i64) [[G2]]
 ; CHECK-NVPTX-NOT: declare i32 @bcmp(i8* nocapture, i8* nocapture, i64) [[G2]]
 declare i32 @bcmp(i8*, i8*, i64)