aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/Transforms
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2015-01-31 19:27:28 +0000
committerDimitry Andric <dim@FreeBSD.org>2015-01-31 19:27:28 +0000
commitec304151b74f9254d7029ee4d197ce1f7cbe501a (patch)
tree63e4ed55e4fbb581fd4731d44a327a7b3278e0a1 /include/llvm/Transforms
parent67c32a98315f785a9ec9d531c1f571a0196c7463 (diff)
Diffstat (limited to 'include/llvm/Transforms')
-rw-r--r--include/llvm/Transforms/Utils/SimplifyLibCalls.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/include/llvm/Transforms/Utils/SimplifyLibCalls.h b/include/llvm/Transforms/Utils/SimplifyLibCalls.h
index d2f096fd1efd..70ef0eb765dd 100644
--- a/include/llvm/Transforms/Utils/SimplifyLibCalls.h
+++ b/include/llvm/Transforms/Utils/SimplifyLibCalls.h
@@ -17,6 +17,7 @@
#include "llvm/ADT/StringRef.h"
#include "llvm/IR/IRBuilder.h"
+#include "llvm/Target/TargetLibraryInfo.h"
namespace llvm {
class Value;
@@ -53,8 +54,10 @@ private:
Value *optimizeMemCpyChk(CallInst *CI, IRBuilder<> &B);
Value *optimizeMemMoveChk(CallInst *CI, IRBuilder<> &B);
Value *optimizeMemSetChk(CallInst *CI, IRBuilder<> &B);
- Value *optimizeStrCpyChk(CallInst *CI, IRBuilder<> &B);
- Value *optimizeStrNCpyChk(CallInst *CI, IRBuilder<> &B);
+
+ // Str/Stp cpy are similar enough to be handled in the same functions.
+ Value *optimizeStrpCpyChk(CallInst *CI, IRBuilder<> &B, LibFunc::Func Func);
+ Value *optimizeStrpNCpyChk(CallInst *CI, IRBuilder<> &B, LibFunc::Func Func);
/// \brief Checks whether the call \p CI to a fortified libcall is foldable
/// to the non-fortified version.