diff options
author | Christopher Lamb <christopher.lamb@gmail.com> | 2007-07-29 23:29:16 +0000 |
---|---|---|
committer | Christopher Lamb <christopher.lamb@gmail.com> | 2007-07-29 23:29:16 +0000 |
commit | d35c7e3888720216d9f3f8d1a5e067841c35c906 (patch) | |
tree | 44f17b197052073b9ba8083b81372b815400f5cf /test/C++Frontend | |
parent | 5e8e3e4dfa4b5693b6075722982d949809d7d91e (diff) | |
download | external_llvm-d35c7e3888720216d9f3f8d1a5e067841c35c906.zip external_llvm-d35c7e3888720216d9f3f8d1a5e067841c35c906.tar.gz external_llvm-d35c7e3888720216d9f3f8d1a5e067841c35c906.tar.bz2 |
Add tests for generating noalias parameter attribute from __restrict qualified function parameters. C++ tests are currently XFAILing see PR1582.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40583 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/C++Frontend')
-rw-r--r-- | test/C++Frontend/2007-07-29-RestrictPtrArg.cpp | 8 | ||||
-rw-r--r-- | test/C++Frontend/2007-07-29-RestrictRefArg.cpp | 8 |
2 files changed, 16 insertions, 0 deletions
diff --git a/test/C++Frontend/2007-07-29-RestrictPtrArg.cpp b/test/C++Frontend/2007-07-29-RestrictPtrArg.cpp new file mode 100644 index 0000000..e45eda0 --- /dev/null +++ b/test/C++Frontend/2007-07-29-RestrictPtrArg.cpp @@ -0,0 +1,8 @@ +// RUN: %llvmgxx -c -emit-llvm %s -o - | llvm-dis | grep noalias +// XFAIL: i[1-9]86|alpha|ia64|arm|x86_64|amd64 +// NOTE: This should be un-XFAILed when the C++ type qualifiers are fixed + +void foo(int * __restrict myptr1, int * myptr2) { + myptr1[0] = 0; + myptr2[0] = 0; +} diff --git a/test/C++Frontend/2007-07-29-RestrictRefArg.cpp b/test/C++Frontend/2007-07-29-RestrictRefArg.cpp new file mode 100644 index 0000000..e1b5cd6 --- /dev/null +++ b/test/C++Frontend/2007-07-29-RestrictRefArg.cpp @@ -0,0 +1,8 @@ +// RUN: %llvmgxx -c -emit-llvm %s -o - | llvm-dis | grep noalias +// XFAIL: i[1-9]86|alpha|ia64|arm|x86_64|amd64 +// NOTE: This should be un-XFAILed when the C++ type qualifiers are fixed + +void foo(int & __restrict myptr1, int & myptr2) { + myptr1 = 0; + myptr2 = 0; +} |