diff options
author | Andrey Bokhanko <andreybokhanko@gmail.com> | 2016-04-15 08:03:51 +0000 |
---|---|---|
committer | Andrey Bokhanko <andreybokhanko@gmail.com> | 2016-04-15 08:03:51 +0000 |
commit | f7fa634887cf327ebca2a71327631ee00f0057a8 (patch) | |
tree | 6115bdd74d32215b36ca02a348f2eb780a95b716 /clang/test/CodeGenCXX/mangle-ms-cxx11.cpp | |
parent | 18e69f4f635434eefadb35caffef71d2b429933c (diff) | |
download | bcm5719-llvm-f7fa634887cf327ebca2a71327631ee00f0057a8.tar.gz bcm5719-llvm-f7fa634887cf327ebca2a71327631ee00f0057a8.zip |
[MSVC Compat] Implementation of __unaligned (MS extension) as a type qualifier
This patch implements __unaligned as a type qualifier; before that, it was
modeled as an attribute. Proper mangling of __unaligned is implemented as well.
Some OpenCL code/tests are tangenially affected, as they relied on existing
number and sizes of type qualifiers.
Differential Revision: http://reviews.llvm.org/D18596
llvm-svn: 266415
Diffstat (limited to 'clang/test/CodeGenCXX/mangle-ms-cxx11.cpp')
-rw-r--r-- | clang/test/CodeGenCXX/mangle-ms-cxx11.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/clang/test/CodeGenCXX/mangle-ms-cxx11.cpp b/clang/test/CodeGenCXX/mangle-ms-cxx11.cpp index 99384440a18..5e160bfb62c 100644 --- a/clang/test/CodeGenCXX/mangle-ms-cxx11.cpp +++ b/clang/test/CodeGenCXX/mangle-ms-cxx11.cpp @@ -293,3 +293,14 @@ 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) {} + +// 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" + |