diff options
author | Andrey Bokhanko <andreybokhanko@gmail.com> | 2016-05-11 18:38:21 +0000 |
---|---|---|
committer | Andrey Bokhanko <andreybokhanko@gmail.com> | 2016-05-11 18:38:21 +0000 |
commit | 45d413260e82b57db8a3fc55bb2d90ce48ad0d45 (patch) | |
tree | 8d4f3f712258cdfa4468168e00eb111f6e6f8a31 /clang/test/CodeGenCXX/mangle-ms-cxx11.cpp | |
parent | 5da4dab0fc6f387c02fcb062fb5feea3a6407e8e (diff) | |
download | bcm5719-llvm-45d413260e82b57db8a3fc55bb2d90ce48ad0d45.tar.gz bcm5719-llvm-45d413260e82b57db8a3fc55bb2d90ce48ad0d45.zip |
[MSVC] Implementation of __unaligned as a proper type qualifier
This patch implements __unaligned (MS extension) as a proper type qualifier
(before that, it was implemented as an ignored attribute).
It also fixes PR27367 and PR27666.
Differential Revision: http://reviews.llvm.org/D20103
llvm-svn: 269220
Diffstat (limited to 'clang/test/CodeGenCXX/mangle-ms-cxx11.cpp')
-rw-r--r-- | clang/test/CodeGenCXX/mangle-ms-cxx11.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/clang/test/CodeGenCXX/mangle-ms-cxx11.cpp b/clang/test/CodeGenCXX/mangle-ms-cxx11.cpp index 99384440a18..12bb8c7ee54 100644 --- a/clang/test/CodeGenCXX/mangle-ms-cxx11.cpp +++ b/clang/test/CodeGenCXX/mangle-ms-cxx11.cpp @@ -293,3 +293,19 @@ int PR26105() { } // CHECK-DAG: @"\01??R<lambda_0>@?0??PR26105@@YAHXZ@QBE@H@Z" // CHECK-DAG: @"\01??R<lambda_1>@?0???R<lambda_0>@?0??PR26105@@YAHXZ@QBE@H@Z@QBE@H@Z" + +int __unaligned * unaligned_foo1() { return 0; } +int __unaligned * __unaligned * unaligned_foo2() { return 0; } +__unaligned int unaligned_foo3() { return 0; } +void unaligned_foo4(int __unaligned *p1) {} +void unaligned_foo5(int __unaligned * __restrict p1) {} +template <typename T> T unaligned_foo6(T t) { return t; } +void unaligned_foo7() { unaligned_foo6<int *>(0); unaligned_foo6<int __unaligned *>(0); } + +// CHECK-DAG: @"\01?unaligned_foo1@@YAPFAHXZ" +// CHECK-DAG: @"\01?unaligned_foo2@@YAPFAPFAHXZ" +// CHECK-DAG: @"\01?unaligned_foo3@@YAHXZ" +// CHECK-DAG: @"\01?unaligned_foo4@@YAXPFAH@Z" +// CHECK-DAG: @"\01?unaligned_foo5@@YAXPIFAH@Z" +// CHECK-DAG: @"\01??$unaligned_foo6@PAH@@YAPAHPAH@Z" +// CHECK-DAG: @"\01??$unaligned_foo6@PFAH@@YAPFAHPFAH@Z" |