[llvm] b56f6f1 - [MemoryBuiltins] Remove unused isStrdupLikeFn() function (NFC)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 11 03:26:32 PST 2022
Author: Nikita Popov
Date: 2022-01-11T12:26:20+01:00
New Revision: b56f6f1913a8061bfd8e704cd2794150660a859d
URL: https://github.com/llvm/llvm-project/commit/b56f6f1913a8061bfd8e704cd2794150660a859d
DIFF: https://github.com/llvm/llvm-project/commit/b56f6f1913a8061bfd8e704cd2794150660a859d.diff
LOG: [MemoryBuiltins] Remove unused isStrdupLikeFn() function (NFC)
This function is no longer used after
dcbc91f40c2e6ff578667020f7c6a05c25149865.
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 ee1de77fc206d..b2a07145610e9 100644
--- a/llvm/include/llvm/Analysis/MemoryBuiltins.h
+++ b/llvm/include/llvm/Analysis/MemoryBuiltins.h
@@ -92,10 +92,6 @@ bool isReallocLikeFn(const Function *F, const TargetLibraryInfo *TLI);
/// allocates memory and throws if an allocation failed (e.g., new).
bool isOpNewLikeFn(const Value *V, const TargetLibraryInfo *TLI);
-/// Tests if a value is a call or invoke to a library function that
-/// allocates memory (strdup, strndup).
-bool isStrdupLikeFn(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 48c01fbae11b4..7955b34fe1fa8 100644
--- a/llvm/lib/Analysis/MemoryBuiltins.cpp
+++ b/llvm/lib/Analysis/MemoryBuiltins.cpp
@@ -292,12 +292,6 @@ bool llvm::isOpNewLikeFn(const Value *V, const TargetLibraryInfo *TLI) {
return getAllocationData(V, OpNewLike, TLI).hasValue();
}
-/// Tests if a value is a call or invoke to a library function that
-/// allocates memory (strdup, strndup).
-bool llvm::isStrdupLikeFn(const Value *V, const TargetLibraryInfo *TLI) {
- return getAllocationData(V, StrDupLike, TLI).hasValue();
-}
-
bool llvm::isAllocRemovable(const CallBase *CB, const TargetLibraryInfo *TLI) {
assert(isAllocationFn(CB, TLI));
More information about the llvm-commits
mailing list