diff options
author | Dan Gohman <gohman@apple.com> | 2009-08-19 23:18:49 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2009-08-19 23:18:49 +0000 |
commit | 600d52c6afe6e879678bfeb0f2f811c113754a70 (patch) | |
tree | 487609a702bca3d950c46401dc2478d726a9d62e /test/Transforms/SimplifyLibCalls/StrNCpy.ll | |
parent | 49b9186252a9e2cf57809ad04e75c801cbcb3622 (diff) | |
download | llvm-600d52c6afe6e879678bfeb0f2f811c113754a70.tar.gz llvm-600d52c6afe6e879678bfeb0f2f811c113754a70.tar.bz2 llvm-600d52c6afe6e879678bfeb0f2f811c113754a70.tar.xz |
Add targetdata strings to these tests, since SimplifyLibCalls uses
TargetData to find the pointer size.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79490 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/SimplifyLibCalls/StrNCpy.ll')
-rw-r--r-- | test/Transforms/SimplifyLibCalls/StrNCpy.ll | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/Transforms/SimplifyLibCalls/StrNCpy.ll b/test/Transforms/SimplifyLibCalls/StrNCpy.ll index 011e9be94c..b3b66b0ed8 100644 --- a/test/Transforms/SimplifyLibCalls/StrNCpy.ll +++ b/test/Transforms/SimplifyLibCalls/StrNCpy.ll @@ -2,6 +2,10 @@ ; RUN: llvm-as < %s | opt -simplify-libcalls | llvm-dis | \ ; RUN: not grep {call.*strncpy} +; This transformation requires the pointer size, as it assumes that size_t is +; the size of a pointer. +target datalayout = "-p:64:64:64" + @hello = constant [6 x i8] c"hello\00" ; <[6 x i8]*> [#uses=1] @null = constant [1 x i8] zeroinitializer ; <[1 x i8]*> [#uses=1] @null_hello = constant [7 x i8] c"\00hello\00" ; <[7 x i8]*> [#uses=1] |