hanchenye-llvm-project/clang/test/CodeGenObjCXX
Chris Lattner 7369c14b6a fix rdar://9780211 - Clang crashes with an assertion failure building WKView.mm from WebKit
This is something of a hack, the problem is as follows:

1. we instantiate both copied of RetainPtr with the two different argument types
   (an id and protocol-qualified id).
2. We refer to the ctor of one of the instantiations when introducing global "x",
   this causes us to emit an llvm::Function for a prototype whose "this" has type
   "RetainPtr<id<bork> >*".
3. We refer to the ctor of the other instantiation when introducing global "y",
   however, because it *mangles to the same name as the other ctor* we just use
   a bitcasted version of the llvm::Function we previously emitted.
4. We emit deferred declarations, causing us to emit the body of the ctor, however
   the body we emit is for RetainPtr<id>, which expects its 'this' to have an IR
   type of "RetainPtr<id>*".

Because of the mangling collision, we don't have this case, and explode.

This is really some sort of weird AST invariant violation or something, but hey
a bitcast makes the pain go away.

llvm-svn: 135572
2011-07-20 06:29:00 +00:00
..
arc-globals.mm Automatic Reference Counting. 2011-06-15 23:02:42 +00:00
arc-mangle.mm Change the driver's logic about Objective-C runtimes: abstract out a 2011-07-06 00:26:06 +00:00
arc-move.mm Do not apply the ARC move optimization to 'const'-qualified xvalues. 2011-06-25 02:26:44 +00:00
arc-new-delete.mm Okay, that rule about zero-length arrays applies to destroying 2011-07-13 08:09:46 +00:00
arc-pseudo-destructors.mm Change the driver's logic about Objective-C runtimes: abstract out a 2011-07-06 00:26:06 +00:00
arc-references.mm Change the driver's logic about Objective-C runtimes: abstract out a 2011-07-06 00:26:06 +00:00
arc-special-member-functions.mm Switch field destruction over to use the new destroyer-based API 2011-07-12 16:41:08 +00:00
arc.mm In ARC, reclaim all return values of retainable type, not just those 2011-07-07 06:58:02 +00:00
block-in-template-inst.mm When inferring the result type of a block based on a return statement 2011-06-05 05:04:23 +00:00
block-var-layout.mm
blocks.mm Implement support for C++11 in-class initialization of non-static data members. 2011-06-11 17:19:42 +00:00
catch-id-type.mm Support for catching objc pointer objects in c++ catch-statement 2011-06-23 19:00:08 +00:00
copy.mm fix rdar://9780211 - Clang crashes with an assertion failure building WKView.mm from WebKit 2011-07-20 06:29:00 +00:00
copyable-property-object.mm
encode.mm Fix regression with @encode string. rdar://9624314. 2011-06-17 23:19:38 +00:00
exceptions.mm
foreach-statement.mm
gc.mm Restore correct use of GC barriers. 2011-06-16 04:16:24 +00:00
implicit-copy-assign-operator.mm
implicit-copy-constructor.mm
ivar-objects.mm
mangle-blocks.mm
mangle.mm Don't add objc method name mangling to locally declared function. 2011-06-09 19:25:01 +00:00
message-reference.mm
method-local-extern-mangle.mm
property-derived-to-base-conv.mm
property-dot-copy.mm
property-dot-reference.mm
property-object-conditional-exp.mm clang side to match the LLVM IR type system rewrite patch. 2011-07-09 17:41:47 +00:00
property-objects.mm clang side to match the LLVM IR type system rewrite patch. 2011-07-09 17:41:47 +00:00
property-reference.mm Fix IRGen issues related to using property-dot syntax 2011-03-30 16:11:20 +00:00
refence-assign-write-barrier.mm
references.mm Warn for any kind of initialization if initializer does not 2011-04-08 18:25:29 +00:00
rtti.mm
selector-expr-lvalue.mm
write-barrier-global-assign.mm