Commit Graph

10 Commits

Author SHA1 Message Date
Argyrios Kyrtzidis 81c0b5c200 Fix assertion hit when @encoding C++ classes. rdar://10172840 & http://llvm.org/PR10990
llvm-svn: 140542
2011-09-26 18:14:24 +00:00
Argyrios Kyrtzidis c7e50c5cbd Fix a bug in objc @encoding of C++ classes.
llvm-svn: 138235
2011-08-22 16:03:14 +00:00
Argyrios Kyrtzidis 95a76f3715 Fix regression with @encode string. rdar://9624314.
llvm-svn: 133312
2011-06-17 23:19:38 +00:00
Argyrios Kyrtzidis 49b35de2a1 Reapply the commits that r131401 reverted and add a fix for PR9927.
llvm-svn: 131446
2011-05-17 00:46:38 +00:00
Rafael Espindola c0d4cb17c1 Revert 131377, 131369 and 131365.
131365 caused PR9927.

llvm-svn: 131401
2011-05-16 12:30:54 +00:00
Argyrios Kyrtzidis dd72aafffc Create proper Objective-C @encoding for C++ classes; fixes rdar://9357400.
Go through and expand the members of bases into the encoding string (and encode the VTable as well).
Unlike gcc which expands virtual bases as many times as they appear in the
hierarchy, clang will only expand them once at the end, to reflect the actual layout.

Note that there doesn't seem to be a way to indicate in the encoding that
packing/alignment of members is different that normal, in which case
the encoding will be out-of-sync with the real layout.
If the runtime switches to just consider the size of types without
taking into account alignment, we could easily make padding explicit in the
encoding (e.g. using arrays of chars). The encoding strings would be
longer then though.

Also encode a flexible array member as array of 0 size, like gcc, not as a pointer.

llvm-svn: 131365
2011-05-14 20:32:43 +00:00
Fariborz Jahanian e0587be735 Fix a crash encoding ivars of vector types and
to match gcc's encoding. Fixes //rdar: // 8519948.

llvm-svn: 115980
2010-10-07 21:25:25 +00:00
Douglas Gregor 527786ea3a Various small fixes for construction/destruction of Objective-C++
instance variables:
  - Use isRecordType() rather than isa<RecordType>(), so that we see
  through typedefs in ivar types.
  - Mark the destructor as referenced
  - Perform C++ access control on the destructor

llvm-svn: 104206
2010-05-20 02:24:22 +00:00
John McCall a9e6e8d654 Teach the ObjC mangler to ignore member pointers just like gcc does.
llvm-svn: 104001
2010-05-17 23:56:34 +00:00
Fariborz Jahanian c5158203dd Implement encoding of methods which have instantiated
template arguments.

llvm-svn: 103221
2010-05-07 00:28:49 +00:00