Skip to content
This repository was archived by the owner on Feb 5, 2019. It is now read-only.

Commit 329571e

Browse files
nagisaTimNN
authored andcommitted
Remove reallocate_inplace from memory analysis
It does not return a "new" pointer and therefore it is unclear if it is not entirely clear whether it is ReallocLike enough. Removing for now just to be safe.
1 parent cdb751d commit 329571e

File tree

2 files changed

+1
-6
lines changed

2 files changed

+1
-6
lines changed

include/llvm/Analysis/TargetLibraryInfo.def

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -333,10 +333,6 @@ TLI_DEFINE_STRING_INTERNAL("__rust_deallocate")
333333
TLI_DEFINE_ENUM_INTERNAL(rust_reallocate)
334334
TLI_DEFINE_STRING_INTERNAL("__rust_reallocate")
335335

336-
/// uint8_t *__rust_reallocate_inplace(uint8_t *ptr, size_t oldsz, size_t newsz, size_t align)
337-
TLI_DEFINE_ENUM_INTERNAL(rust_reallocate_inplace)
338-
TLI_DEFINE_STRING_INTERNAL("__rust_reallocate_inplace")
339-
340336
/// double __sincospi_stret(double x);
341337
TLI_DEFINE_ENUM_INTERNAL(sincospi_stret)
342338
TLI_DEFINE_STRING_INTERNAL("__sincospi_stret")

lib/Analysis/MemoryBuiltins.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,7 @@ static const std::pair<LibFunc, AllocFnsTy> AllocationFnData[] = {
7878

7979
{LibFunc_rust_allocate, {MallocLike, 2, 0, -1}},
8080
{LibFunc_rust_allocate_zeroed, {MallocLike, 2, 0, -1}},
81-
{LibFunc_rust_reallocate, {ReallocLike, 4, 2, -1}},
82-
{LibFunc_rust_reallocate_inplace, {ReallocLike, 4, 2, -1}}
81+
{LibFunc_rust_reallocate, {ReallocLike, 4, 2, -1}}
8382
// TODO: Handle "int posix_memalign(void **, size_t, size_t)"
8483
};
8584

0 commit comments

Comments
 (0)