diff options
author | Akira Hatanaka <ahatanaka@apple.com> | 2019-05-29 21:23:30 +0000 |
---|---|---|
committer | Akira Hatanaka <ahatanaka@apple.com> | 2019-05-29 21:23:30 +0000 |
commit | d64e6eeea912442cc75aa09d187bbdb9340d7fb7 (patch) | |
tree | f15f3bc5afb20fe3494f500d1ae9f494c68c7b87 /test/CodeGenObjCXX | |
parent | 2713d755f233be02f536332ab532d3776cdc6293 (diff) | |
download | clang-d64e6eeea912442cc75aa09d187bbdb9340d7fb7.tar.gz |
[ObjC] Fix encoding of ObjC pointer types that are pointers to typedefs
clang was encoding pointers to typedefs as if they were pointers to
structs because that is apparently what gcc is doing.
For example:
```
@class Class1;
typedef NSArray<Class1 *> MyArray;
void foo1(void) {
const char *s0 = @encode(MyArray *); // "^{NSArray=#}"
const char *s1 = @encode(NSArray<Class1 *> *); // "@"
}
```
This commit removes the code that was there to make clang compatible
with gcc and make clang emit the correct encoding for ObjC pointers,
which is "@".
rdar://problem/50563529
Differential Revision: https://reviews.llvm.org/D61974
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@362034 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenObjCXX')
-rw-r--r-- | test/CodeGenObjCXX/encode.mm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/CodeGenObjCXX/encode.mm b/test/CodeGenObjCXX/encode.mm index e4c7618f50..7bc64dafb4 100644 --- a/test/CodeGenObjCXX/encode.mm +++ b/test/CodeGenObjCXX/encode.mm @@ -242,6 +242,6 @@ struct S { @end const char *expand_struct() { - // CHECK: @{{.*}} = private unnamed_addr constant [16 x i8] c"{N={S<N>=^{N}}}\00" + // CHECK: @{{.*}} = private unnamed_addr constant [13 x i8] c"{N={S<N>=@}}\00" return @encode(N); } |