[llvm] 167af7b - [MemoryBuiltins] Demote isMallocLikeFn to implementation routine since last use has been removed
Philip Reames via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 18 15:12:13 PST 2022
Author: Philip Reames
Date: 2022-01-18T15:12:07-08:00
New Revision: 167af7bbfe2d6e969c409b0cbe1af560b2b39e8f
URL: https://github.com/llvm/llvm-project/commit/167af7bbfe2d6e969c409b0cbe1af560b2b39e8f
DIFF: https://github.com/llvm/llvm-project/commit/167af7bbfe2d6e969c409b0cbe1af560b2b39e8f.diff
LOG: [MemoryBuiltins] Demote isMallocLikeFn to implementation routine since last use has been removed
Added:
Modified:
llvm/include/llvm/Analysis/MemoryBuiltins.h
llvm/lib/Analysis/MemoryBuiltins.cpp
Removed:
################################################################################
diff --git a/llvm/include/llvm/Analysis/MemoryBuiltins.h b/llvm/include/llvm/Analysis/MemoryBuiltins.h
index 858a3eddca387..d5b60ee540e06 100644
--- a/llvm/include/llvm/Analysis/MemoryBuiltins.h
+++ b/llvm/include/llvm/Analysis/MemoryBuiltins.h
@@ -56,12 +56,6 @@ bool isAllocationFn(const Value *V, const TargetLibraryInfo *TLI);
bool isAllocationFn(const Value *V,
function_ref<const TargetLibraryInfo &(Function &)> GetTLI);
-/// Tests if a value is a call or invoke to a library function that
-/// allocates uninitialized memory (such as malloc).
-bool isMallocLikeFn(const Value *V, const TargetLibraryInfo *TLI);
-bool isMallocLikeFn(const Value *V,
- function_ref<const TargetLibraryInfo &(Function &)> GetTLI);
-
/// Tests if a value is a call or invoke to a library function that
/// allocates memory similar to malloc or calloc.
bool isMallocOrCallocLikeFn(const Value *V, const TargetLibraryInfo *TLI);
diff --git a/llvm/lib/Analysis/MemoryBuiltins.cpp b/llvm/lib/Analysis/MemoryBuiltins.cpp
index af8cb78b9a567..208f93aa1ac63 100644
--- a/llvm/lib/Analysis/MemoryBuiltins.cpp
+++ b/llvm/lib/Analysis/MemoryBuiltins.cpp
@@ -236,14 +236,9 @@ bool llvm::isAllocationFn(
/// Tests if a value is a call or invoke to a library function that
/// allocates uninitialized memory (such as malloc).
-bool llvm::isMallocLikeFn(const Value *V, const TargetLibraryInfo *TLI) {
+static bool isMallocLikeFn(const Value *V, const TargetLibraryInfo *TLI) {
return getAllocationData(V, MallocOrOpNewLike, TLI).hasValue();
}
-bool llvm::isMallocLikeFn(
- const Value *V, function_ref<const TargetLibraryInfo &(Function &)> GetTLI) {
- return getAllocationData(V, MallocOrOpNewLike, GetTLI)
- .hasValue();
-}
/// Tests if a value is a call or invoke to a library function that
/// allocates uninitialized memory with alignment (such as aligned_alloc).
More information about the llvm-commits
mailing list