summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikita Popov <npopov@redhat.com>2022-01-11 12:27:23 +0100
committerNikita Popov <npopov@redhat.com>2022-01-11 12:27:23 +0100
commit3946095b881366c2f01ebafd18b689337a43aa02 (patch)
tree176da38f2cff9081ffecc43a535be43077b3113e
parentb56f6f1913a8061bfd8e704cd2794150660a859d (diff)
downloadllvm-3946095b881366c2f01ebafd18b689337a43aa02.tar.gz
[MemoryBuiltins] Remove unused isOpNewLikeFn() (NFC)
This function is no longer used since 2cafbcb560d9e6e2300941d088e754b01d56595b.
-rw-r--r--llvm/include/llvm/Analysis/MemoryBuiltins.h4
-rw-r--r--llvm/lib/Analysis/MemoryBuiltins.cpp6
2 files changed, 0 insertions, 10 deletions
diff --git a/llvm/include/llvm/Analysis/MemoryBuiltins.h b/llvm/include/llvm/Analysis/MemoryBuiltins.h
index b2a07145610e..7410d577114f 100644
--- a/llvm/include/llvm/Analysis/MemoryBuiltins.h
+++ b/llvm/include/llvm/Analysis/MemoryBuiltins.h
@@ -88,10 +88,6 @@ bool isReallocLikeFn(const Value *V, const TargetLibraryInfo *TLI);
/// reallocates memory (e.g., realloc).
bool isReallocLikeFn(const Function *F, const TargetLibraryInfo *TLI);
-/// Tests if a value is a call or invoke to a library function that
-/// allocates memory and throws if an allocation failed (e.g., new).
-bool isOpNewLikeFn(const Value *V, const TargetLibraryInfo *TLI);
-
//===----------------------------------------------------------------------===//
// free Call Utility Functions.
//
diff --git a/llvm/lib/Analysis/MemoryBuiltins.cpp b/llvm/lib/Analysis/MemoryBuiltins.cpp
index 7955b34fe1fa..e8389c7f50d3 100644
--- a/llvm/lib/Analysis/MemoryBuiltins.cpp
+++ b/llvm/lib/Analysis/MemoryBuiltins.cpp
@@ -286,12 +286,6 @@ bool llvm::isReallocLikeFn(const Function *F, const TargetLibraryInfo *TLI) {
return getAllocationDataForFunction(F, ReallocLike, TLI).hasValue();
}
-/// Tests if a value is a call or invoke to a library function that
-/// allocates memory and throws if an allocation failed (e.g., new).
-bool llvm::isOpNewLikeFn(const Value *V, const TargetLibraryInfo *TLI) {
- return getAllocationData(V, OpNewLike, TLI).hasValue();
-}
-
bool llvm::isAllocRemovable(const CallBase *CB, const TargetLibraryInfo *TLI) {
assert(isAllocationFn(CB, TLI));