diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2010-06-15 21:34:25 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2010-06-15 21:34:25 +0000 |
commit | 386e918438b72620e7c00ee1197bf6940bfe6cf8 (patch) | |
tree | 763b52882a5f8400354150eb40ae0335273384ba /include/llvm/Transforms/Utils/BuildLibCalls.h | |
parent | 2bbaf4d06eb08f488e6614059006e3d2615fded3 (diff) | |
download | external_llvm-386e918438b72620e7c00ee1197bf6940bfe6cf8.zip external_llvm-386e918438b72620e7c00ee1197bf6940bfe6cf8.tar.gz external_llvm-386e918438b72620e7c00ee1197bf6940bfe6cf8.tar.bz2 |
simplify-libcalls: fold strstr(a, b) == a -> strncmp(a, b, strlen(b)) == 0
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106047 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Transforms/Utils/BuildLibCalls.h')
-rw-r--r-- | include/llvm/Transforms/Utils/BuildLibCalls.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/llvm/Transforms/Utils/BuildLibCalls.h b/include/llvm/Transforms/Utils/BuildLibCalls.h index 6df3469..c75c142 100644 --- a/include/llvm/Transforms/Utils/BuildLibCalls.h +++ b/include/llvm/Transforms/Utils/BuildLibCalls.h @@ -34,6 +34,10 @@ namespace llvm { /// and the return value has 'i8*' type. Value *EmitStrChr(Value *Ptr, char C, IRBuilder<> &B, const TargetData *TD); + /// EmitStrNCmp - Emit a call to the strncmp function to the builder. + Value *EmitStrNCmp(Value *Ptr1, Value *Ptr2, Value *Len, IRBuilder<> &B, + const TargetData *TD); + /// EmitStrCpy - Emit a call to the strcpy function to the builder, for the /// specified pointer arguments. Value *EmitStrCpy(Value *Dst, Value *Src, IRBuilder<> &B, |