MemoryBuiltins: Remove posix_memalign from the list and replace it with a TODO.
authorBenjamin Kramer <benny.kra@googlemail.com>
Tue, 24 Sep 2013 17:49:08 +0000 (17:49 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Tue, 24 Sep 2013 17:49:08 +0000 (17:49 +0000)
This code isn't ready to deal with allocation functions where the return is not
the allocated pointer. The checks below will reject posix_memalign anyways.

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

lib/Analysis/MemoryBuiltins.cpp

index 0db603b8743c8d7b37210bea8991fb6a8a21d9af..e710a998bf18801c1dc45a4fd5250d4a9f64a66c 100644 (file)
@@ -61,12 +61,12 @@ static const AllocFnsTy AllocationFnData[] = {
   {LibFunc::ZnajRKSt9nothrow_t,  MallocLike,  2, 0,  -1}, // new[](unsigned int, nothrow)
   {LibFunc::Znam,                OpNewLike,   1, 0,  -1}, // new[](unsigned long)
   {LibFunc::ZnamRKSt9nothrow_t,  MallocLike,  2, 0,  -1}, // new[](unsigned long, nothrow)
-  {LibFunc::posix_memalign,      MallocLike,  3, 2,  -1},
   {LibFunc::calloc,              CallocLike,  2, 0,   1},
   {LibFunc::realloc,             ReallocLike, 2, 1,  -1},
   {LibFunc::reallocf,            ReallocLike, 2, 1,  -1},
   {LibFunc::strdup,              StrDupLike,  1, -1, -1},
   {LibFunc::strndup,             StrDupLike,  2, 1,  -1}
+  // TODO: Handle "int posix_memalign(void **, size_t, size_t)"
 };