summaryrefslogtreecommitdiff
path: root/include/llvm/Transforms/Utils
diff options
context:
space:
mode:
authorEric Christopher <echristo@apple.com>2010-03-11 01:25:07 +0000
committerEric Christopher <echristo@apple.com>2010-03-11 01:25:07 +0000
commitbd973762003329c217eec2439071e9f93af3eea5 (patch)
treec256a370956b93e2e69cd77a354cf6519c669d0c /include/llvm/Transforms/Utils
parent52a50e5d0e6ac08d86706dbdd8f4a5dbb44da4cb (diff)
downloadllvm-bd973762003329c217eec2439071e9f93af3eea5.tar.gz
llvm-bd973762003329c217eec2439071e9f93af3eea5.tar.bz2
llvm-bd973762003329c217eec2439071e9f93af3eea5.tar.xz
Add strncpy libcall creator. Use it when it should be used.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98219 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Transforms/Utils')
-rw-r--r--include/llvm/Transforms/Utils/BuildLibCalls.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/llvm/Transforms/Utils/BuildLibCalls.h b/include/llvm/Transforms/Utils/BuildLibCalls.h
index 03716a8eed..22d42ff431 100644
--- a/include/llvm/Transforms/Utils/BuildLibCalls.h
+++ b/include/llvm/Transforms/Utils/BuildLibCalls.h
@@ -39,6 +39,11 @@ namespace llvm {
Value *EmitStrCpy(Value *Dst, Value *Src, IRBuilder<> &B,
const TargetData *TD);
+ /// EmitStrNCpy - Emit a call to the strncpy function to the builder, for the
+ /// specified pointer arguments and length.
+ Value *EmitStrNCpy(Value *Dst, Value *Src, Value *Len, IRBuilder<> &B,
+ const TargetData *TD);
+
/// EmitMemCpy - Emit a call to the memcpy function to the builder. This
/// always expects that the size has type 'intptr_t' and Dst/Src are pointers.
Value *EmitMemCpy(Value *Dst, Value *Src, Value *Len,