[llvm] 3946095 - [MemoryBuiltins] Remove unused isOpNewLikeFn() (NFC)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 11 03:27:52 PST 2022


Author: Nikita Popov
Date: 2022-01-11T12:27:23+01:00
New Revision: 3946095b881366c2f01ebafd18b689337a43aa02

URL: https://github.com/llvm/llvm-project/commit/3946095b881366c2f01ebafd18b689337a43aa02
DIFF: https://github.com/llvm/llvm-project/commit/3946095b881366c2f01ebafd18b689337a43aa02.diff

LOG: [MemoryBuiltins] Remove unused isOpNewLikeFn() (NFC)

This function is no longer used since
2cafbcb560d9e6e2300941d088e754b01d56595b.

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 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));
 


        


More information about the llvm-commits mailing list