John McCall
							
						 
						
							 
							
							
							
							
								
							
							
								02269a66b3 
								
							 
						 
						
							
							
								
								Enable the implementation of __builtin_setjmp and __builtin_longjmp.  Not all  
							
							 
							
							... 
							
							
							
							LLVM backends support these yet.
llvm-svn: 104867 
							
						 
						
							2010-05-27 18:47:06 +00:00  
						
					 
				
					
						
							
							
								 
								John McCall
							
						 
						
							 
							
							
							
							
								
							
							
								943fae95f5 
								
							 
						 
						
							
							
								
								Implement __builtin_init_dwarf_reg_size_table and __builtin_dwarf_sp_column  
							
							 
							
							... 
							
							
							
							for 32-bit MIPS processors.  Hat-tip to rdivacky for providing gcc dumps
on this.
llvm-svn: 104816 
							
						 
						
							2010-05-27 06:19:26 +00:00  
						
					 
				
					
						
							
							
								 
								John McCall
							
						 
						
							 
							
							
							
							
								
							
							
								c2af939ab4 
								
							 
						 
						
							
							
								
								When deciding whether a deferred declaration has already been emitted,  
							
							 
							
							... 
							
							
							
							aliases count as definitions regardless of whether their target has been
emitted yet.  Fixes PR 7142.
llvm-svn: 104796 
							
						 
						
							2010-05-27 01:45:30 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								401304462a 
								
							 
						 
						
							
							
								
								AST: Rename PragmaPackAttr to MaxFieldAlignmentAttr, which is more accurate.  
							
							 
							
							... 
							
							
							
							llvm-svn: 104795 
							
						 
						
							2010-05-27 01:12:46 +00:00  
						
					 
				
					
						
							
							
								 
								John McCall
							
						 
						
							 
							
							
							
							
								
							
							
								23f6626262 
								
							 
						 
						
							
							
								
								Correctly pass aggregates by reference when emitting thunks.  
							
							 
							
							... 
							
							
							
							llvm-svn: 104778 
							
						 
						
							2010-05-26 22:34:26 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								5f81b9f3f6 
								
							 
						 
						
							
							
								
								Patch to fix a irgen crash accessing an initialized local static  
							
							 
							
							... 
							
							
							
							variable in a local function. Fixes pr7101.
llvm-svn: 104743 
							
						 
						
							2010-05-26 21:45:50 +00:00  
						
					 
				
					
						
							
							
								 
								Charles Davis
							
						 
						
							 
							
							
							
							
								
							
							
								c9e78145b0 
								
							 
						 
						
							
							
								
								Extract the ObjC and blocks manglers into their own class. No functionality  
							
							 
							
							... 
							
							
							
							change.
llvm-svn: 104715 
							
						 
						
							2010-05-26 18:25:27 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								0094eb26fc 
								
							 
						 
						
							
							
								
								Be sure to use the standard substitutions when mangling the names of  
							
							 
							
							... 
							
							
							
							vtables, VTTs, and construction vtables. Fixes PR7201.
llvm-svn: 104675 
							
						 
						
							2010-05-26 05:11:13 +00:00  
						
					 
				
					
						
							
							
								 
								Charles Davis
							
						 
						
							 
							
							
							
							
								
							
							
								4e786ddccb 
								
							 
						 
						
							
							
								
								IRgen: Add a stub class for generating ABI-specific C++ code.  
							
							 
							
							... 
							
							
							
							This class only supports name mangling (which is apparently used during C/ObjC
codegen). For now only the Itanium C++ ABI is supported. Patches to add a
second C++ ABI are forthcoming.
llvm-svn: 104630 
							
						 
						
							2010-05-25 19:52:27 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								02df9da2ac 
								
							 
						 
						
							
							
								
								Fix compilation failure  
							
							 
							
							... 
							
							
							
							llvm-svn: 104613 
							
						 
						
							2010-05-25 17:12:30 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								7e10f3699a 
								
							 
						 
						
							
							
								
								Improve name mangling for blocks and support mangling of static local  
							
							 
							
							... 
							
							
							
							variables within blocks. We loosely follow GCC's mangling, but since
these are always internal symbols the names don't really matter. I
intend to revisit block mangling later, because GCC's mangling is
rather verbose. <rdar://problem/8015719>.
llvm-svn: 104610 
							
						 
						
							2010-05-25 17:04:15 +00:00  
						
					 
				
					
						
							
							
								 
								John McCall
							
						 
						
							 
							
							
							
							
								
							
							
								7cb0220e53 
								
							 
						 
						
							
							
								
								If a function definition has any sort of weak linkage, its static local  
							
							 
							
							... 
							
							
							
							variables should have that linkage.  Otherwise, its static local
variables should have internal linkage.  To avoid computing this excessively,
set a function's linkage before we emit code for it.
Previously we were assigning weak linkage to the static variables of
static inline functions in C++, with predictably terrible results.  This
fixes that and also gives better linkage than 'weak' when merging is required.
llvm-svn: 104581 
							
						 
						
							2010-05-25 04:30:21 +00:00  
						
					 
				
					
						
							
							
								 
								Benjamin Kramer
							
						 
						
							 
							
							
							
							
								
							
							
								dc99965343 
								
							 
						 
						
							
							
								
								Add a comment for r104472.  
							
							 
							
							... 
							
							
							
							llvm-svn: 104473 
							
						 
						
							2010-05-23 20:57:46 +00:00  
						
					 
				
					
						
							
							
								 
								Benjamin Kramer
							
						 
						
							 
							
							
							
							
								
							
							
								11d4d9ec4e 
								
							 
						 
						
							
							
								
								PR5863: Don't erase unreachable BBs which have an associated cleanup size.  
							
							 
							
							... 
							
							
							
							This works around a crash where malloc reused the memory of an erased BB for a
new BB leaving old cleanup information pointing at the new block.
llvm-svn: 104472 
							
						 
						
							2010-05-23 20:00:44 +00:00  
						
					 
				
					
						
							
							
								 
								John McCall
							
						 
						
							 
							
							
							
							
								
							
							
								cc04e9f6b9 
								
							 
						 
						
							
							
								
								Re-teach IR gen to perform GC moves on rvalues resulting from various ObjC  
							
							 
							
							... 
							
							
							
							expressions.  Essentially, GC breaks a certain form of the return-value
optimization.
llvm-svn: 104454 
							
						 
						
							2010-05-22 22:13:32 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								5b94443b16 
								
							 
						 
						
							
							
								
								Really fix PR7139. There was one boost test that we still failed, and my first fix broke self-host.  
							
							 
							
							... 
							
							
							
							llvm-svn: 104447 
							
						 
						
							2010-05-22 17:45:10 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								c0964b60e5 
								
							 
						 
						
							
							
								
								Re-land the fix for PR7139.  
							
							 
							
							... 
							
							
							
							llvm-svn: 104446 
							
						 
						
							2010-05-22 17:35:42 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								aae38d6610 
								
							 
						 
						
							
							
								
								Improve our handling of reference binding for subobjects of  
							
							 
							
							... 
							
							
							
							temporaries. There are actually several interrelated fixes here:
  - When converting an object to a base class, it's only an lvalue
  cast when the original object was an lvalue and we aren't casting
  pointer-to-derived to pointer-to-base. Previously, we were
  misclassifying derived-to-base casts of class rvalues as lvalues,
  causing various oddities (including problems with reference binding
  not extending the lifetimes of some temporaries).
  - Teach the code for emitting a reference binding how to look
  through no-op casts and parentheses directly, since
  Expr::IgnoreParenNoOpCasts is just plain wrong for this. Also, make
  sure that we properly look through multiple levels of indirection
  from the temporary object, but destroy the actual temporary object;
  this fixes the reference-binding issue mentioned above.
  - Teach Objective-C message sends to bind the result as a temporary
    when needed. This is actually John's change, but it triggered the
    reference-binding problem above, so it's included here. Now John
    can actually test his return-slot improvements.
llvm-svn: 104434 
							
						 
						
							2010-05-22 05:17:18 +00:00  
						
					 
				
					
						
							
							
								 
								John McCall
							
						 
						
							 
							
							
							
							
								
							
							
								78a151138a 
								
							 
						 
						
							
							
								
								Push a return-value slot throughout ObjC message-send codegen.  Will be  
							
							 
							
							... 
							
							
							
							critical for ObjC++ correctness;  hard to test independently of various
required Sema changes, though.
llvm-svn: 104422 
							
						 
						
							2010-05-22 01:48:05 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								c866eb5ba9 
								
							 
						 
						
							
							
								
								Unbreak self-host.  
							
							 
							
							... 
							
							
							
							llvm-svn: 104390 
							
						 
						
							2010-05-21 22:17:48 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								da1641cd12 
								
							 
						 
						
							
							
								
								Rename CodeGenFunction::EmitMemSetToZero to EmitNullInitialization. Handle setting null data member pointers correctly. Fixes PR7139.  
							
							 
							
							... 
							
							
							
							llvm-svn: 104387 
							
						 
						
							2010-05-21 21:45:41 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								3fe900e410 
								
							 
						 
						
							
							
								
								Don't remove the break/continue scope of a for loop until after we've  
							
							 
							
							... 
							
							
							
							emitted the increment expression. Fixes PR7189.
If someone knows how to write a useful test for this, I'd be grateful. 
llvm-svn: 104335 
							
						 
						
							2010-05-21 18:36:48 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								c5871f07f0 
								
							 
						 
						
							
							
								
								When generating the call arguments in a thunk to call the thunkee, do  
							
							 
							
							... 
							
							
							
							not make copies non-POD arguments or arguments passed by reference:
just copy the pointers directly. This eliminates another source of the
dreaded memcpy-of-non-PODs. Fixes PR7188.
llvm-svn: 104327 
							
						 
						
							2010-05-21 17:55:12 +00:00  
						
					 
				
					
						
							
							
								 
								Chandler Carruth
							
						 
						
							 
							
							
							
							
								
							
							
								7ea01c3f8a 
								
							 
						 
						
							
							
								
								Add braces to avoid an ambiguous else, fixing a GCC warning.  
							
							 
							
							... 
							
							
							
							llvm-svn: 104314 
							
						 
						
							2010-05-21 10:29:28 +00:00  
						
					 
				
					
						
							
							
								 
								John McCall
							
						 
						
							 
							
							
							
							
								
							
							
								9d42f0f174 
								
							 
						 
						
							
							
								
								Allocate space in a block record for implicit references to the Objective C  
							
							 
							
							... 
							
							
							
							'self' variable arising from uses of the 'super' keyword.  Also reorganize
some code so that BlockInfo (now CGBlockInfo) can be opaque outside of
CGBlocks.cpp.
Fixes rdar://problem/8010633.
llvm-svn: 104312 
							
						 
						
							2010-05-21 04:11:14 +00:00  
						
					 
				
					
						
							
							
								 
								John McCall
							
						 
						
							 
							
							
							
							
								
							
							
								c4094935c0 
								
							 
						 
						
							
							
								
								When emitting an lvalue for an anonymous struct or union member during  
							
							 
							
							... 
							
							
							
							class initialization, drill down through an arbitrary number of anonymous
records.
llvm-svn: 104310 
							
						 
						
							2010-05-21 01:18:57 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								60d215b6fd 
								
							 
						 
						
							
							
								
								Adds support for generation of objc_memmove_collectable API  
							
							 
							
							... 
							
							
							
							in Objective-C++ mode.
llvm-svn: 104281 
							
						 
						
							2010-05-20 21:38:57 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								6855ba2c95 
								
							 
						 
						
							
							
								
								Copy construction of non-trivial properties must not  
							
							 
							
							... 
							
							
							
							be turned into a setter call (fixes radar 8008649).
llvm-svn: 104235 
							
						 
						
							2010-05-20 16:46:55 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								265b8b8de0 
								
							 
						 
						
							
							
								
								Picky, picky  
							
							 
							
							... 
							
							
							
							llvm-svn: 104230 
							
						 
						
							2010-05-20 15:48:29 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								c19108118d 
								
							 
						 
						
							
							
								
								Fix a thinko  
							
							 
							
							... 
							
							
							
							llvm-svn: 104229 
							
						 
						
							2010-05-20 15:47:46 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								f22101a059 
								
							 
						 
						
							
							
								
								Assert that we do not try to memcpy a non-POD class type in C++. This  
							
							 
							
							... 
							
							
							
							particular issue was the cause of the Boost.Interprocess failures, and
in general will lead to horrendous, hard-to-diagnose miscompiles. The
assertion itself has survives self-host and a full Boost build, so we
are close to eradicating this problem in C++.
Note that the assertion is *not* turned on for Objective-C++, where we
still have problems with introducing memcpy's of non-POD class
types. That part of the assertion will go away as soon as we fix the
known issues in Objective-C++.
llvm-svn: 104227 
							
						 
						
							2010-05-20 15:39:01 +00:00  
						
					 
				
					
						
							
							
								 
								David Chisnall
							
						 
						
							 
							
							
							
							
								
							
							
								29cefd1cc3 
								
							 
						 
						
							
							
								
								Fix my inability to spell 'continue' and a case where message sends returning non-pointer-sized things were generating invalid IR inside  @try  blocks.  
							
							 
							
							... 
							
							
							
							llvm-svn: 104222 
							
						 
						
							2010-05-20 13:45:48 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								7c38f153ac 
								
							 
						 
						
							
							
								
								Rework our handling of binding a reference to a temporary  
							
							 
							
							... 
							
							
							
							subobject. Previously, we could only properly bind to a base class
subobject while extending the lifetime of the complete object (of a
derived type); for non-static data member subobjects, we could memcpy
(!) the result and bind to that, which is rather broken.
Now, we pull apart the expression that we're binding to, to figure out
which subobject we're accessing, then construct the temporary object
(adding a destruction if needed) and, finally, dig out the subobject
we actually meant to access.
This fixes yet another instance where we were memcpy'ing rather than
doing the right thing. However, note the FIXME in references.cpp:
there's more work to be done for binding to subobjects, since the AST
is incorrectly modeling some member accesses in base classes as
lvalues when they are really rvalues.
llvm-svn: 104219 
							
						 
						
							2010-05-20 08:36:28 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								aa2ac80eaa 
								
							 
						 
						
							
							
								
								When creating a this-adjustment thunk where the return value is of C++  
							
							 
							
							... 
							
							
							
							class type (that uses a return slot), pass the return slot to the
callee directly rather than allocating new storage and trying to copy
the object. This appears to have been the cause of the remaining two
Boost.Interprocess failures.
llvm-svn: 104215 
							
						 
						
							2010-05-20 05:54:35 +00:00  
						
					 
				
					
						
							
							
								 
								John McCall
							
						 
						
							 
							
							
							
							
								
							
							
								87fe5d5618 
								
							 
						 
						
							
							
								
								Support implicitly closing on 'this' in a block.  Fixed PR7165.  
							
							 
							
							... 
							
							
							
							(the codegen works here, too, but that's annoying to test without execution)
llvm-svn: 104202 
							
						 
						
							2010-05-20 01:18:31 +00:00  
						
					 
				
					
						
							
							
								 
								Benjamin Kramer
							
						 
						
							 
							
							
							
							
								
							
							
								fdb61d78e9 
								
							 
						 
						
							
							
								
								Implement codegen for __builtin_isnormal.  
							
							 
							
							... 
							
							
							
							llvm-svn: 104118 
							
						 
						
							2010-05-19 11:24:26 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								a941dcae16 
								
							 
						 
						
							
							
								
								Add support for Microsoft's __thiscall, from Steven Watanabe!  
							
							 
							
							... 
							
							
							
							llvm-svn: 104026 
							
						 
						
							2010-05-18 16:57:00 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								be48c548c5 
								
							 
						 
						
							
							
								
								Correctly initialize bases with member pointers. This should fix PR6441 but that test case is a bit weird and I'd like to investigate further before closing that bug.  
							
							 
							
							... 
							
							
							
							llvm-svn: 104025 
							
						 
						
							2010-05-18 16:51:41 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								061ca524b7 
								
							 
						 
						
							
							
								
								Keep track of the LLVM field numbers for non-virtual bases.  
							
							 
							
							... 
							
							
							
							llvm-svn: 104013 
							
						 
						
							2010-05-18 05:22:06 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								af9e5afe54 
								
							 
						 
						
							
							
								
								Start laying out bases as individual fields. We still use ugly i8 arrays but this is a step in the right direction.  
							
							 
							
							... 
							
							
							
							llvm-svn: 104012 
							
						 
						
							2010-05-18 05:12:20 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								864d1b555e 
								
							 
						 
						
							
							
								
								Add CodeGenTypes::ContainsPointerToDataMember overload that takes a CXXRecordDecl.  
							
							 
							
							... 
							
							
							
							llvm-svn: 104011 
							
						 
						
							2010-05-18 03:47:15 +00:00  
						
					 
				
					
						
							
							
								 
								John McCall
							
						 
						
							 
							
							
							
							
								
							
							
								96fa4845f7 
								
							 
						 
						
							
							
								
								Clean up some more uses of getAs<ObjCInterfaceType>() that Fariborz pointed  
							
							 
							
							... 
							
							
							
							out.  The remaining ones are okay.
llvm-svn: 103973 
							
						 
						
							2010-05-17 21:00:27 +00:00  
						
					 
				
					
						
							
							
								 
								Chandler Carruth
							
						 
						
							 
							
							
							
							
								
							
							
								0450cc684c 
								
							 
						 
						
							
							
								
								Fix an ambiguous else warning from GCC by adding some much needed curlies.  
							
							 
							
							... 
							
							
							
							llvm-svn: 103972 
							
						 
						
							2010-05-17 20:58:49 +00:00  
						
					 
				
					
						
							
							
								 
								John McCall
							
						 
						
							 
							
							
							
							
								
							
							
								3e294929b8 
								
							 
						 
						
							
							
								
								Correctly generate IR for ObjC messages sends to protocol-qualified types.  
							
							 
							
							... 
							
							
							
							Fixes rdar://problem/7992749
llvm-svn: 103965 
							
						 
						
							2010-05-17 20:12:43 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								f7a8825484 
								
							 
						 
						
							
							
								
								IRgen: Remove dead function.  
							
							 
							
							... 
							
							
							
							llvm-svn: 103945 
							
						 
						
							2010-05-17 16:46:02 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								cd20ce1513 
								
							 
						 
						
							
							
								
								C++/Darwin/i386 ABI: Fix some problems with empty record handling.  
							
							 
							
							... 
							
							
							
							- Check bases as part of isEmptyRecord().
 - C++ record fields are never empty in the Itanium ABI.
llvm-svn: 103944 
							
						 
						
							2010-05-17 16:46:00 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								9154b5dffe 
								
							 
						 
						
							
							
								
								Ensure that destructors are called for NRVO'd objects when the  
							
							 
							
							... 
							
							
							
							function does not return. Thanks to Eli for pointing out this corner
case.
llvm-svn: 103941 
							
						 
						
							2010-05-17 15:52:46 +00:00  
						
					 
				
					
						
							
							
								 
								David Chisnall
							
						 
						
							 
							
							
							
							
								
							
							
								f9c4225af6 
								
							 
						 
						
							
							
								
								Pick the correct personality function based on the language.  This prevents link failures when C/ObjC code uses __attribute__((cleanup())) (previously this was inserting references to two libstc++ symbols; the personality function and the __terminate() function).  
							
							 
							
							... 
							
							
							
							This is still probably wrong for Objective-C++ and adds a couple of lines in CGException that should probably be in the CGObjCRuntime subclass.  The personality function is now only looked up in one place in CGException though, so this should be easier to fix in the future.
llvm-svn: 103938 
							
						 
						
							2010-05-17 13:49:20 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								51150ab1f1 
								
							 
						 
						
							
							
								
								When initializing thread-safe statics, put the call to  
							
							 
							
							... 
							
							
							
							__cxa_guard_abort along the exceptional edge into (in effect) a nested
"try" that rethrows after aborting. Fixes PR7144 and the remaining
Boost.ProgramOptions failures, along with the regressions that r103880
caused.
The crucial difference between this and r103880 is that we now follow
LLVM's little dance with the llvm.eh.exception and llvm.eh.selector
calls, then use _Unwind_Resume_or_Rethrow to rethrow.
llvm-svn: 103892 
							
						 
						
							2010-05-16 01:24:12 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								c278d1b3b9 
								
							 
						 
						
							
							
								
								Revert r103880 (thread-safe static initialization w/ exceptions),  
							
							 
							
							... 
							
							
							
							because it's causing strange linker errors. Unfixes PR7144.
llvm-svn: 103890 
							
						 
						
							2010-05-16 00:44:00 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								1b8b8bf25f 
								
							 
						 
						
							
							
								
								Minor twik to my last patch. (for radar 7986354).  
							
							 
							
							... 
							
							
							
							llvm-svn: 103889 
							
						 
						
							2010-05-16 00:10:46 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								e1b45a5e6b 
								
							 
						 
						
							
							
								
								Fix API gen for objc_msgSend property of aggregate types  
							
							 
							
							... 
							
							
							
							in Objective-c++ mode. Fixes radar 7986354.
llvm-svn: 103887 
							
						 
						
							2010-05-15 23:05:52 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								58142dd8a1 
								
							 
						 
						
							
							
								
								When initializing thread-safe statics, put the call to  
							
							 
							
							... 
							
							
							
							__cxa_guard_abort along the exceptional edge into (in effect) a nested
"try" that rethrows after aborting. Fixes PR7144 and the remaining
Boost.ProgramOptions failures.
llvm-svn: 103880 
							
						 
						
							2010-05-15 17:55:51 +00:00  
						
					 
				
					
						
							
							
								 
								John McCall
							
						 
						
							 
							
							
							
							
								
							
							
								b0efad148c 
								
							 
						 
						
							
							
								
								Modify this comment per Doug's suggestion:  we don't need to mangle protocols.  
							
							 
							
							... 
							
							
							
							llvm-svn: 103875 
							
						 
						
							2010-05-15 17:06:29 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								170125648c 
								
							 
						 
						
							
							
								
								When applying the named return value optimization, we still need to  
							
							 
							
							... 
							
							
							
							destroy the variable along the exceptional edge; it's only during
normal execution that we avoid destroying this variable.
llvm-svn: 103872 
							
						 
						
							2010-05-15 16:39:56 +00:00  
						
					 
				
					
						
							
							
								 
								John McCall
							
						 
						
							 
							
							
							
							
								
							
							
								8b07ec253d 
								
							 
						 
						
							
							
								
								Substantially alter the design of the Objective C type AST by introducing  
							
							 
							
							... 
							
							
							
							ObjCObjectType, which is basically just a pair of
  one of {primitive-id, primitive-Class, user-defined @class}
with
  a list of protocols.
An ObjCObjectPointerType is therefore just a pointer which always points to
one of these types (possibly sugared).  ObjCInterfaceType is now just a kind
of ObjCObjectType which happens to not carry any protocols.
Alter a rather large number of use sites to use ObjCObjectType instead of
ObjCInterfaceType.  Store an ObjCInterfaceType as a pointer on the decl rather
than hashing them in a FoldingSet.  Remove some number of methods that are no
longer used, at least after this patch.
By simplifying ObjCObjectPointerType, we are now able to easily remove and apply
pointers to Objective-C types, which is crucial for a certain kind of ObjC++
metaprogramming common in WebKit.
llvm-svn: 103870 
							
						 
						
							2010-05-15 11:32:37 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								290c93ec0d 
								
							 
						 
						
							
							
								
								Implement a simple form of the C++ named return value optimization for  
							
							 
							
							... 
							
							
							
							return statements. We perform NRVO only when all of the return
statements in the function return the same variable. Fixes some link
failures in Boost.Interprocess (which is relying on NRVO), and
probably improves performance for some C++ applications.
llvm-svn: 103867 
							
						 
						
							2010-05-15 06:46:45 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								6fd1b1802f 
								
							 
						 
						
							
							
								
								Implement semantic analysis and an AST representation for the named  
							
							 
							
							... 
							
							
							
							return value optimization. Sema marks return statements with their
NRVO candidates (which may or may not end up using the NRVO), then, at
the end of a function body, computes and marks those variables that
can be allocated into the return slot.
I've checked this locally with some debugging statements (not
committed), but there won't be any tests until CodeGen comes along.
llvm-svn: 103865 
							
						 
						
							2010-05-15 06:01:05 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								222cf0efbc 
								
							 
						 
						
							
							
								
								Recognize when the named return value optimization applies in a  
							
							 
							
							... 
							
							
							
							"return" statement and mark the corresponding CXXConstructExpr as
elidable. Teach CodeGen that eliding a temporary is different from
eliding an object construction.
This is just a baby step toward NRVO.
llvm-svn: 103849 
							
						 
						
							2010-05-15 00:13:29 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								36d4d1541c 
								
							 
						 
						
							
							
								
								C++/ABI/x86_64: Member pointers should be classified as INTEGER.  
							
							 
							
							... 
							
							
							
							llvm-svn: 103843 
							
						 
						
							2010-05-15 00:00:37 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								4bd95c65e7 
								
							 
						 
						
							
							
								
								C++/ABI/i386: Member function pointers should be passed by value.  
							
							 
							
							... 
							
							
							
							llvm-svn: 103842 
							
						 
						
							2010-05-15 00:00:30 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								1c073f47da 
								
							 
						 
						
							
							
								
								Emit an lvalue dynamic_cast even if the result is not used. Another  
							
							 
							
							... 
							
							
							
							part (or possibly all) of PR7132.
llvm-svn: 103810 
							
						 
						
							2010-05-14 21:31:02 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								fa8b4955bb 
								
							 
						 
						
							
							
								
								When a failed dynamic_cast<T&> (which is an lvalue) results in a  
							
							 
							
							... 
							
							
							
							throw, it should use invoke when needed. The fixes the
Boost.Statechrt failures that motivated PR7132, but there are a few
side issues to tackle as well.
llvm-svn: 103803 
							
						 
						
							2010-05-14 21:14:41 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								a1bc38d53e 
								
							 
						 
						
							
							
								
								Remove an unused function.  
							
							 
							
							... 
							
							
							
							llvm-svn: 103793 
							
						 
						
							2010-05-14 19:48:27 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								1cf9274a5a 
								
							 
						 
						
							
							
								
								Move ContainsPointerToDataMember to CodeGenTypes. No functionality change.  
							
							 
							
							... 
							
							
							
							llvm-svn: 103792 
							
						 
						
							2010-05-14 19:41:56 +00:00  
						
					 
				
					
						
							
							
								 
								Devang Patel
							
						 
						
							 
							
							
							
							
								
							
							
								ec2a9abd4a 
								
							 
						 
						
							
							
								
								Fix thinko in yesterday's fix.  
							
							 
							
							... 
							
							
							
							Providing linkage name for function static variable confuses gdb, so don't do that.
llvm-svn: 103779 
							
						 
						
							2010-05-14 16:55:25 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								65c6d541dd 
								
							 
						 
						
							
							
								
								Make sure that value-initialized pointers to data members are initialized correctly.  
							
							 
							
							... 
							
							
							
							llvm-svn: 103771 
							
						 
						
							2010-05-14 15:05:19 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								6b45b67b26 
								
							 
						 
						
							
							
								
								C++/Darwin/x86: Teach IRgen it can pass reference types in registers.  
							
							 
							
							... 
							
							
							
							llvm-svn: 103761 
							
						 
						
							2010-05-14 03:40:53 +00:00  
						
					 
				
					
						
							
							
								 
								Devang Patel
							
						 
						
							 
							
							
							
							
								
							
							
								98f217118f 
								
							 
						 
						
							
							
								
								Fix context in class static variable's debugging information entry.  
							
							 
							
							... 
							
							
							
							This fixes bunch of failures in gdb testsuite.
llvm-svn: 103745 
							
						 
						
							2010-05-13 23:52:37 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								500d9f8221 
								
							 
						 
						
							
							
								
								Disable the available_externally optimization for inline virtual  
							
							 
							
							... 
							
							
							
							methods for which the key function is guaranteed to be in another
translation unit. Unfortunately, this guarantee isn't the case when
dealing with shared libraries that fail to export these virtual method
definitions. 
I'm reopening PR6747 so we can consider this again at a later point in
time.
llvm-svn: 103741 
							
						 
						
							2010-05-13 21:36:56 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								88d292ccb8 
								
							 
						 
						
							
							
								
								Rework when and how vtables are emitted, by tracking where vtables are  
							
							 
							
							... 
							
							
							
							"used" (e.g., we will refer to the vtable in the generated code) and
when they are defined (i.e., because we've seen the key function
definition). Previously, we were effectively tracking "potential
definitions" rather than uses, so we were a bit too eager about emitting
vtables for classes without key functions. 
The new scheme:
  - For every use of a vtable, Sema calls MarkVTableUsed() to indicate
  the use. For example, this occurs when calling a virtual member
  function of the class, defining a constructor of that class type,
  dynamic_cast'ing from that type to a derived class, casting
  to/through a virtual base class, etc.
  - For every definition of a vtable, Sema calls MarkVTableUsed() to
  indicate the definition. This happens at the end of the translation
  unit for classes whose key function has been defined (so we can
  delay computation of the key function; see PR6564), and will also
  occur with explicit template instantiation definitions.
 - For every vtable defined/used, we mark all of the virtual member
 functions of that vtable as defined/used, unless we know that the key
 function is in another translation unit. This instantiates virtual
 member functions when needed.
  - At the end of the translation unit, Sema tells CodeGen (via the
  ASTConsumer) which vtables must be defined (CodeGen will define
  them) and which may be used (for which CodeGen will define the
  vtables lazily). 
From a language perspective, both the old and the new schemes are
permissible: we're allowed to instantiate virtual member functions
whenever we want per the standard. However, all other C++ compilers
were more lazy than we were, and our eagerness was both a performance
issue (we instantiated too much) and a portability problem (we broke
Boost test cases, which now pass).
Notes:
  (1) There's a ton of churn in the tests, because the order in which
  vtables get emitted to IR has changed. I've tried to isolate some of
  the larger tests from these issues.
  (2) Some diagnostics related to
  implicitly-instantiated/implicitly-defined virtual member functions
  have moved to the point of first use/definition. It's better this
  way.
  (3) I could use a review of the places where we MarkVTableUsed, to
  see if I missed any place where the language effectively requires a
  vtable.
Fixes PR7114 and PR6564.
llvm-svn: 103718 
							
						 
						
							2010-05-13 16:44:06 +00:00  
						
					 
				
					
						
							
							
								 
								Devang Patel
							
						 
						
							 
							
							
							
							
								
							
							
								c5ffabc94f 
								
							 
						 
						
							
							
								
								If given location is invalid then use current location.  
							
							 
							
							... 
							
							
							
							This fixes recent regressions reported by gdb testsuite. 
Tighter verification of debug info generated by FE found these regressions.
Refactor code to extract line number and column number from SourceLocation.
llvm-svn: 103678 
							
						 
						
							2010-05-12 23:46:38 +00:00  
						
					 
				
					
						
							
							
								 
								Devang Patel
							
						 
						
							 
							
							
							
							
								
							
							
								3c2d51a1b9 
								
							 
						 
						
							
							
								
								Use end location of DeclStmt to mark stop point.  
							
							 
							
							... 
							
							
							
							This is meaningful for blocks. This patch fixes bunch of test failures in gdb testsuite.
llvm-svn: 103533 
							
						 
						
							2010-05-12 00:39:34 +00:00  
						
					 
				
					
						
							
							
								 
								Abramo Bagnara
							
						 
						
							 
							
							
							
							
								
							
							
								6150c884df 
								
							 
						 
						
							
							
								
								Merged Elaborated and QualifiedName types.  
							
							 
							
							... 
							
							
							
							llvm-svn: 103517 
							
						 
						
							2010-05-11 21:36:43 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								12ebb47a07 
								
							 
						 
						
							
							
								
								IRgen/i386/C++: Fix isSingleElementStruct computation for C++ record decls.  
							
							 
							
							... 
							
							
							
							- Fixes PR7098.
llvm-svn: 103514 
							
						 
						
							2010-05-11 21:15:36 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								6a047c979f 
								
							 
						 
						
							
							
								
								It's bad form to create VarDecl's without DeclContexts  
							
							 
							
							... 
							
							
							
							llvm-svn: 103484 
							
						 
						
							2010-05-11 18:17:16 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								2d2623c710 
								
							 
						 
						
							
							
								
								Minor refactoring of my last patch.  
							
							 
							
							... 
							
							
							
							llvm-svn: 103475 
							
						 
						
							2010-05-11 16:31:10 +00:00  
						
					 
				
					
						
							
							
								 
								Devang Patel
							
						 
						
							 
							
							
							
							
								
							
							
								82bbfb58e3 
								
							 
						 
						
							
							
								
								Initialize Column.  
							
							 
							
							... 
							
							
							
							llvm-svn: 103448 
							
						 
						
							2010-05-10 23:48:38 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								43a40f9399 
								
							 
						 
						
							
							
								
								Objective-C++ Code gen. Handle code gen. for property  
							
							 
							
							... 
							
							
							
							reference dot-syntax notation in a varierty of cases.
Fixes radar 7964490.
llvm-svn: 103440 
							
						 
						
							2010-05-10 22:57:35 +00:00  
						
					 
				
					
						
							
							
								 
								Devang Patel
							
						 
						
							 
							
							
							
							
								
							
							
								b319adec49 
								
							 
						 
						
							
							
								
								If variable location is invalid then use current location.  
							
							 
							
							... 
							
							
							
							This fixes radar 7959934.
llvm-svn: 103408 
							
						 
						
							2010-05-10 17:24:58 +00:00  
						
					 
				
					
						
							
							
								 
								David Chisnall
							
						 
						
							 
							
							
							
							
								
							
							
								e0b5b3a1c5 
								
							 
						 
						
							
							
								
								Tweaked selector mangling again (GNU runtime).  
							
							 
							
							... 
							
							
							
							llvm-svn: 103368 
							
						 
						
							2010-05-09 01:01:43 +00:00  
						
					 
				
					
						
							
							
								 
								David Chisnall
							
						 
						
							 
							
							
							
							
								
							
							
								2ec6cff9d0 
								
							 
						 
						
							
							
								
								Fixed linkage problem from last commit (GNU runtime).  
							
							 
							
							... 
							
							
							
							llvm-svn: 103355 
							
						 
						
							2010-05-08 21:55:04 +00:00  
						
					 
				
					
						
							
							
								 
								David Chisnall
							
						 
						
							 
							
							
							
							
								
							
							
								0a24fd3744 
								
							 
						 
						
							
							
								
								Tweaked selector generation (GNU runtime).  Removed the use of GlobalAliases in the generated bitcode.  
							
							 
							
							... 
							
							
							
							llvm-svn: 103353 
							
						 
						
							2010-05-08 20:58:05 +00:00  
						
					 
				
					
						
							
							
								 
								Devang Patel
							
						 
						
							 
							
							
							
							
								
							
							
								67eba80672 
								
							 
						 
						
							
							
								
								If there is not any debug info for type then do not emit debug info for this variable.  
							
							 
							
							... 
							
							
							
							A recent change to tightly verify debug info prepared by FE caught this.
This fixes unittest build.
llvm-svn: 103320 
							
						 
						
							2010-05-07 23:05:55 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								7828ab1ed9 
								
							 
						 
						
							
							
								
								Minor mod. to my last patch.  
							
							 
							
							... 
							
							
							
							llvm-svn: 103280 
							
						 
						
							2010-05-07 18:59:54 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								fdf474b05e 
								
							 
						 
						
							
							
								
								Fixes a Code gen crash trying to use a dot-syntax for  
							
							 
							
							... 
							
							
							
							a property of a c++ class object (radar 7957369).
llvm-svn: 103279 
							
						 
						
							2010-05-07 18:56:13 +00:00  
						
					 
				
					
						
							
							
								 
								Devang Patel
							
						 
						
							 
							
							
							
							
								
							
							
								ba4ad7f2fd 
								
							 
						 
						
							
							
								
								Avoid use of DIDescriptor::getNode(). Use overloaded operators instead.  
							
							 
							
							... 
							
							
							
							llvm-svn: 103273 
							
						 
						
							2010-05-07 18:12:35 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								d8bb3aff76 
								
							 
						 
						
							
							
								
								Do not give implicitly-defined virtual members functions  
							
							 
							
							... 
							
							
							
							available_externally linkage, since they may not have been given a
strong definition in another translation unit. Without this patch, the
following test case fails to link with a GCC-compiled libstdc++:
  #include <sstream>
  int main() { std::basic_stringbuf<char> bs; }
Fixes the last problem with the Boost.IO library.
llvm-svn: 103208 
							
						 
						
							2010-05-06 23:13:35 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								1411bb8f76 
								
							 
						 
						
							
							
								
								Fix typo in comment; 80 col violation  
							
							 
							
							... 
							
							
							
							llvm-svn: 103204 
							
						 
						
							2010-05-06 22:33:50 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								ae498b3211 
								
							 
						 
						
							
							
								
								The global variable for the VTT might not have external linkage; allow  
							
							 
							
							... 
							
							
							
							us to find local variables, too. Fixes the last remaining
Boost.Rational failure.
llvm-svn: 103203 
							
						 
						
							2010-05-06 22:18:21 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								b8993384f3 
								
							 
						 
						
							
							
								
								Code Gen support for Getter/Setter synthesis of  
							
							 
							
							... 
							
							
							
							C++ object properties. (still radar 7468090).
llvm-svn: 103182 
							
						 
						
							2010-05-06 15:45:36 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								44456d294c 
								
							 
						 
						
							
							
								
								simplify EmitAggMemberInitializer a bit and make it work in 32-bit mode,  
							
							 
							
							... 
							
							
							
							fixing PR7063.
llvm-svn: 103171 
							
						 
						
							2010-05-06 06:35:23 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								3628326b44 
								
							 
						 
						
							
							
								
								add todos for isinf_sign and isnormal, which I don't intend to implement  
							
							 
							
							... 
							
							
							
							in the near future.
llvm-svn: 103169 
							
						 
						
							2010-05-06 06:13:53 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								dbff4bf5f4 
								
							 
						 
						
							
							
								
								implement codegen support for __builtin_isfinite, part of PR6083  
							
							 
							
							... 
							
							
							
							llvm-svn: 103168 
							
						 
						
							2010-05-06 06:04:13 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								43660c5bc0 
								
							 
						 
						
							
							
								
								implement part of PR6083: codegen support for isinf.  Like isnan,  
							
							 
							
							... 
							
							
							
							this is generating correct but suboptimal (extra extend to double)
code for the float case.  Will investigate next.
llvm-svn: 103166 
							
						 
						
							2010-05-06 05:35:16 +00:00  
						
					 
				
					
						
							
							
								 
								Chandler Carruth
							
						 
						
							 
							
							
							
							
								
							
							
								f3983652eb 
								
							 
						 
						
							
							
								
								Clean up the {} and else placement. This fixes an ambiguous else as well as  
							
							 
							
							... 
							
							
							
							picking a more consistent pattern.
llvm-svn: 103142 
							
						 
						
							2010-05-06 00:20:39 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								3baada6fd7 
								
							 
						 
						
							
							
								
								Pass the globaldecl into GetOrCreateLLVMFunction so that llvm  
							
							 
							
							... 
							
							
							
							function attributes like byval get applied to the function 
definition. This fixes PR7058 and makes i386 llvm/clang bootstrap 
pass all the same tests as x86-64 bootstrap for me (the llvmc 
tests still fail in both).
llvm-svn: 103131 
							
						 
						
							2010-05-05 22:55:13 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								25491a22af 
								
							 
						 
						
							
							
								
								This patch deals with Sema Part of Setter/Getter synthesis  
							
							 
							
							... 
							
							
							
							of properties which are of C++ objects. Code Gen to follow
(Radar 7468090).
llvm-svn: 103123 
							
						 
						
							2010-05-05 21:52:17 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								d450f06ef4 
								
							 
						 
						
							
							
								
								When we emit a non-constant initializer for a global variable of  
							
							 
							
							... 
							
							
							
							reference type, make sure that the initializer we build is the
of the appropriate type for the *reference*, not for the thing that it
refers to. Fixes PR7050.
llvm-svn: 103115 
							
						 
						
							2010-05-05 20:15:55 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								370eadf38d 
								
							 
						 
						
							
							
								
								For thread-safe static initialization of local statics with  
							
							 
							
							... 
							
							
							
							destructors, place the __cxa_atexit call after the __cxa_guard_release
call, mimicking GCC/LLVM-GCC behavior. Noticed while debugging
something related.
llvm-svn: 103088 
							
						 
						
							2010-05-05 15:38:32 +00:00  
						
					 
				
					
						
							
							
								 
								Alexis Hunt
							
						 
						
							 
							
							
							
							
								
							
							
								656bb314d9 
								
							 
						 
						
							
							
								
								Reapplying patch to change StmtNodes.def to StmtNodes.td, this time  
							
							 
							
							... 
							
							
							
							with no whitespace. This will allow statements to be referred to in
attribute TableGen files.
llvm-svn: 103087 
							
						 
						
							2010-05-05 15:24:00 +00:00  
						
					 
				
					
						
							
							
								 
								Alexis Hunt
							
						 
						
							 
							
							
							
							
								
							
							
								a8136cc408 
								
							 
						 
						
							
							
								
								Revert r103072; I accidentally ended up deleting a bunch of trailing  
							
							 
							
							... 
							
							
							
							whitespace which makes this patch unreadable. Will recommit without the
whitespace.
llvm-svn: 103086 
							
						 
						
							2010-05-05 15:23:54 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								94f9a4820a 
								
							 
						 
						
							
							
								
								Reimplement code generation for copying fields in the  
							
							 
							
							... 
							
							
							
							implicitly-generated copy constructor. Previously, Sema would perform
some checking and instantiation to determine which copy constructors,
etc., would be called, then CodeGen would attempt to figure out which
copy constructor to call... but would get it wrong, or poke at an
uninstantiated default argument, or fail in other ways.
The new scheme is similar to what we now do for the implicit
copy-assignment operator, where Sema performs all of the semantic
analysis and builds specific ASTs that look similar to the ASTs we'd
get from explicitly writing the copy constructor, so that CodeGen need
only do a direct translation.
However, it's not quite that simple because one cannot explicit write
elementwise copy-construction of an array. So, I've extended
CXXBaseOrMemberInitializer to contain a list of indexing variables
used to copy-construct the elements. For example, if we have:
  struct A { A(const A&); };
  
  struct B {
    A array[2][3];
  };
then we generate an implicit copy assignment operator for B that looks
something like this:
  B::B(const B &other) : array[i0][i1](other.array[i0][i1]) { }
CodeGen will loop over the invented variables i0 and i1 to visit all
elements in the array, so that each element in the destination array
will be copy-constructed from the corresponding element in the source
array. Of course, if we're dealing with arrays of scalars or class
types with trivial copy-assignment operators, we just generate a
memcpy rather than a loop.
Fixes PR6928, PR5989, and PR6887. Boost.Regex now compiles and passes
all of its regression tests.
Conspicuously missing from this patch is handling for the exceptional
case, where we need to destruct those objects that we have
constructed. I'll address that case separately.
llvm-svn: 103079 
							
						 
						
							2010-05-05 05:51:00 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								58fe1756fb 
								
							 
						 
						
							
							
								
								Use a more appropriate LLVM type for the vtable pointer.  
							
							 
							
							... 
							
							
							
							llvm-svn: 103078 
							
						 
						
							2010-05-05 05:47:36 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								ecc60b99f9 
								
							 
						 
						
							
							
								
								Unbreak CMake build.  
							
							 
							
							... 
							
							
							
							llvm-svn: 103077 
							
						 
						
							2010-05-05 05:41:05 +00:00  
						
					 
				
					
						
							
							
								 
								Alexis Hunt
							
						 
						
							 
							
							
							
							
								
							
							
								b9f408a873 
								
							 
						 
						
							
							
								
								Change StmtNodes.def to StmtNodes.td in anticipation of a rewrite of attributes  
							
							 
							
							... 
							
							
							
							llvm-svn: 103072 
							
						 
						
							2010-05-05 04:13:52 +00:00  
						
					 
				
					
						
							
							
								 
								John McCall
							
						 
						
							 
							
							
							
							
								
							
							
								4a39ab8078 
								
							 
						 
						
							
							
								
								Emit the globals, metadata, etc. associated with static variables even when  
							
							 
							
							... 
							
							
							
							they're unreachable.  This matters because (if they're POD, or if this is C)
the scope containing the variable might be reachable even if the variable
isn't.  Fixes PR7044.
llvm-svn: 103052 
							
						 
						
							2010-05-04 20:45:42 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								60c7e16b64 
								
							 
						 
						
							
							
								
								Fixes a code gen. crash when ivar object has trivial constructor.  
							
							 
							
							... 
							
							
							
							llvm-svn: 103028 
							
						 
						
							2010-05-04 19:29:32 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								c8be95274d 
								
							 
						 
						
							
							
								
								When instantiating a function that was declared via a typedef, e.g.,  
							
							 
							
							... 
							
							
							
							typedef int functype(int, int);
    functype func;
also instantiate the synthesized function parameters for the resulting
function declaration. 
With this change, Boost.Wave builds and passes all of its regression
tests.
llvm-svn: 103025 
							
						 
						
							2010-05-04 18:18:31 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								eeb233793d 
								
							 
						 
						
							
							
								
								Fixes a code gen crash when block is a reference type, etc.  
							
							 
							
							... 
							
							
							
							(radar 7495203).
llvm-svn: 103022 
							
						 
						
							2010-05-04 17:59:32 +00:00  
						
					 
				
					
						
							
							
								 
								John McCall
							
						 
						
							 
							
							
							
							
								
							
							
								e61b02bcaf 
								
							 
						 
						
							
							
								
								When inheriting a default argument expression, inherit the full expression,  
							
							 
							
							... 
							
							
							
							not just the inner expression.  This is important if the expression has any
temporaries.  Fixes PR 7028.
Basically a symptom of really tragic method names.
llvm-svn: 102998 
							
						 
						
							2010-05-04 01:53:42 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								751f7bc03c 
								
							 
						 
						
							
							
								
								Fixes a Code Gen. Crash when calling destructor on a __block  
							
							 
							
							... 
							
							
							
							variabe. Blocks and their construction/destruction is
wip though. 
llvm-svn: 102985 
							
						 
						
							2010-05-04 00:26:07 +00:00  
						
					 
				
					
						
							
							
								 
								John McCall
							
						 
						
							 
							
							
							
							
								
							
							
								5828ee7a27 
								
							 
						 
						
							
							
								
								Just bail out immediately when emitting an unreachable function-local static  
							
							 
							
							... 
							
							
							
							variable.  Surprisingly, this does seem to be the right way to solve this.
llvm-svn: 102961 
							
						 
						
							2010-05-03 21:39:56 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								aee1f51485 
								
							 
						 
						
							
							
								
								If we're generating code to create a pointer-to-member function  
							
							 
							
							... 
							
							
							
							aggregate and the result of the aggregate is unused, bail out
early. Fixes PR7027.
llvm-svn: 102942 
							
						 
						
							2010-05-03 20:00:27 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								3572d44190 
								
							 
						 
						
							
							
								
								When computing the address of a virtual member function pointer, use the pointer width instead of hardcoding for 64-bit.  
							
							 
							
							... 
							
							
							
							llvm-svn: 102921 
							
						 
						
							2010-05-03 16:05:06 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								d040e6b25a 
								
							 
						 
						
							
							
								
								Don't build an aggregate constructor loop when the constructor is trivial.  
							
							 
							
							... 
							
							
							
							llvm-svn: 102912 
							
						 
						
							2010-05-03 15:09:17 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								16e94af67c 
								
							 
						 
						
							
							
								
								Don't copy or initialize empty classes. Fixes PR7012.  
							
							 
							
							... 
							
							
							
							llvm-svn: 102891 
							
						 
						
							2010-05-03 01:20:20 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								8bdbb5be19 
								
							 
						 
						
							
							
								
								Store the entire base subobject in SubVTTIndices.  
							
							 
							
							... 
							
							
							
							llvm-svn: 102890 
							
						 
						
							2010-05-03 00:55:11 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								f4da2cf20a 
								
							 
						 
						
							
							
								
								Remove OldGetAddressOfBaseClass - bye bye ambiguities.  
							
							 
							
							... 
							
							
							
							llvm-svn: 102889 
							
						 
						
							2010-05-03 00:32:27 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								c58fb552f3 
								
							 
						 
						
							
							
								
								Get rid of the last caller of OldGetAddressOfBaseClass.  
							
							 
							
							... 
							
							
							
							llvm-svn: 102888 
							
						 
						
							2010-05-03 00:29:58 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								c4d0d0fed1 
								
							 
						 
						
							
							
								
								More work towards getting rid of OldGetAddressOfBaseClass.  
							
							 
							
							... 
							
							
							
							llvm-svn: 102887 
							
						 
						
							2010-05-03 00:07:07 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								e089060fd0 
								
							 
						 
						
							
							
								
								Get rid of a call to GetAddressOfDirectBaseInCompleteClass.  
							
							 
							
							... 
							
							
							
							llvm-svn: 102886 
							
						 
						
							2010-05-02 23:57:15 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								859b3064cb 
								
							 
						 
						
							
							
								
								Have getSubVTTIndex take a BaseSubobject instead of just a base.  
							
							 
							
							... 
							
							
							
							llvm-svn: 102885 
							
						 
						
							2010-05-02 23:53:25 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								4d205ba87f 
								
							 
						 
						
							
							
								
								Pass ForVirtualBase all the way to GetVTTParameter.  
							
							 
							
							... 
							
							
							
							llvm-svn: 102883 
							
						 
						
							2010-05-02 23:33:10 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								f8a71f08d1 
								
							 
						 
						
							
							
								
								Add the same 'ForVirtualBase' parameter to EmitCXXDestructorCall.  
							
							 
							
							... 
							
							
							
							llvm-svn: 102882 
							
						 
						
							2010-05-02 23:29:11 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								e11f9ce9dc 
								
							 
						 
						
							
							
								
								Revert my last change and add a 'ForVirtualBase' parameter to EmitCXXConstructorCall instead.  
							
							 
							
							... 
							
							
							
							llvm-svn: 102881 
							
						 
						
							2010-05-02 23:20:53 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								4c638f1217 
								
							 
						 
						
							
							
								
								Pass the construction kind down to EmitCXXConstructorCall.  
							
							 
							
							... 
							
							
							
							llvm-svn: 102880 
							
						 
						
							2010-05-02 23:01:10 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								245820b9d9 
								
							 
						 
						
							
							
								
								Remove another unused function.  
							
							 
							
							... 
							
							
							
							llvm-svn: 102871 
							
						 
						
							2010-05-02 18:13:35 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								54eb4843b1 
								
							 
						 
						
							
							
								
								Remove an unused function.  
							
							 
							
							... 
							
							
							
							llvm-svn: 102870 
							
						 
						
							2010-05-02 18:12:22 +00:00  
						
					 
				
					
						
							
							
								 
								Benjamin Kramer
							
						 
						
							 
							
							
							
							
								
							
							
								2718b4d757 
								
							 
						 
						
							
							
								
								CodeGen: Shrink RValue. 4 words -> 2 words.  
							
							 
							
							... 
							
							
							
							llvm-svn: 102863 
							
						 
						
							2010-05-02 14:59:10 +00:00  
						
					 
				
					
						
							
							
								 
								David Chisnall
							
						 
						
							 
							
							
							
							
								
							
							
								ff5f88c38e 
								
							 
						 
						
							
							
								
								As per Chris' request, return the Instruction from EmitCall and add the metadata in the caller.  
							
							 
							
							... 
							
							
							
							llvm-svn: 102862 
							
						 
						
							2010-05-02 13:41:58 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								b139cd5843 
								
							 
						 
						
							
							
								
								Complete reimplementation of the synthesis for implicitly-defined copy  
							
							 
							
							... 
							
							
							
							assignment operators. 
Previously, Sema provided type-checking and template instantiation for
copy assignment operators, then CodeGen would synthesize the actual
body of the copy constructor. Unfortunately, the two were not in sync,
and CodeGen might pick a copy-assignment operator that is different
from what Sema chose, leading to strange failures, e.g., link-time
failures when CodeGen called a copy-assignment operator that was not
instantiation, run-time failures when copy-assignment operators were
overloaded for const/non-const references and the wrong one was
picked, and run-time failures when by-value copy-assignment operators
did not have their arguments properly copy-initialized.
This implementation synthesizes the implicitly-defined copy assignment
operator bodies in Sema, so that the resulting ASTs encode exactly
what CodeGen needs to do; there is no longer any special code in
CodeGen to synthesize copy-assignment operators. The synthesis of the
body is relatively simple, and we generate one of three different
kinds of copy statements for each base or member:
  - For a class subobject, call the appropriate copy-assignment
    operator, after overload resolution has determined what that is.
  - For an array of scalar types or an array of class types that have
    trivial copy assignment operators, construct a call to
    __builtin_memcpy.
  - For an array of class types with non-trivial copy assignment
    operators, synthesize a (possibly nested!) for loop whose inner
    statement calls the copy constructor.
  - For a scalar type, use built-in assignment.
This patch fixes at least a few tests cases in Boost.Spirit that were
failing because CodeGen picked the wrong copy-assignment operator
(leading to link-time failures), and I suspect a number of undiagnosed
problems will also go away with this change.
Some of the diagnostics we had previously have gotten worse with this
change, since we're going through generic code for our
type-checking. I will improve this in a subsequent patch.
llvm-svn: 102853 
							
						 
						
							2010-05-01 20:49:11 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								b136e626ea 
								
							 
						 
						
							
							
								
								Simplify EmitCopyCtorCall.  
							
							 
							
							... 
							
							
							
							llvm-svn: 102849 
							
						 
						
							2010-05-01 17:07:40 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								aab3b57359 
								
							 
						 
						
							
							
								
								Simplify EmitClassAggrMemberwiseCopy.  
							
							 
							
							... 
							
							
							
							llvm-svn: 102848 
							
						 
						
							2010-05-01 17:02:18 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								ab826ad169 
								
							 
						 
						
							
							
								
								Clean up EmitClassMemberwiseCopy further.  
							
							 
							
							... 
							
							
							
							llvm-svn: 102846 
							
						 
						
							2010-05-01 16:54:05 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								820022c55c 
								
							 
						 
						
							
							
								
								Get rid of a parameter from EmitClassMemberwiseCopy.  
							
							 
							
							... 
							
							
							
							llvm-svn: 102845 
							
						 
						
							2010-05-01 16:49:43 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								7911150a3d 
								
							 
						 
						
							
							
								
								When defining implicit copy constructors, use SetBaseOrMemberInitializers to initialize the bases.  
							
							 
							
							... 
							
							
							
							llvm-svn: 102842 
							
						 
						
							2010-05-01 16:39:01 +00:00  
						
					 
				
					
						
							
							
								 
								David Chisnall
							
						 
						
							 
							
							
							
							
								
							
							
								c0cf422d56 
								
							 
						 
						
							
							
								
								Attach message send metadata to the lookup as well as to the call (GNU runtime).  
							
							 
							
							... 
							
							
							
							llvm-svn: 102839 
							
						 
						
							2010-05-01 12:56:56 +00:00  
						
					 
				
					
						
							
							
								 
								David Chisnall
							
						 
						
							 
							
							
							
							
								
							
							
								ea529a43d4 
								
							 
						 
						
							
							
								
								Make super message lookups cacheable (GNUstep Runtime)  
							
							 
							
							... 
							
							
							
							llvm-svn: 102837 
							
						 
						
							2010-05-01 12:37:16 +00:00  
						
					 
				
					
						
							
							
								 
								David Chisnall
							
						 
						
							 
							
							
							
							
								
							
							
								9eecafa480 
								
							 
						 
						
							
							
								
								Tweaked EmitCall() to permit the caller to provide some metadata to attach to the call site.  
							
							 
							
							... 
							
							
							
							Used this in CGObjCGNU to attach metadata about message sends to permit speculative inlining.
llvm-svn: 102833 
							
						 
						
							2010-05-01 11:15:56 +00:00  
						
					 
				
					
						
							
							
								 
								John McCall
							
						 
						
							 
							
							
							
							
								
							
							
								4d4dcc8ed7 
								
							 
						 
						
							
							
								
								When synthesizing Objective C records, give the synthetic fields public  
							
							 
							
							... 
							
							
							
							access.  Fixes an assertion.
Fixes rdar://problem/7927811.  Too lazy to reduce a test case.
llvm-svn: 102776 
							
						 
						
							2010-04-30 21:35:41 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								d6c5391cd9 
								
							 
						 
						
							
							
								
								Remove an unnecessary parameter from EmitClassCopyAssignment.  
							
							 
							
							... 
							
							
							
							llvm-svn: 102747 
							
						 
						
							2010-04-30 19:45:28 +00:00  
						
					 
				
					
						
							
							
								 
								David Chisnall
							
						 
						
							 
							
							
							
							
								
							
							
								d6a6af6a53 
								
							 
						 
						
							
							
								
								Fixed incorrect type of alloca (GNU runtime).  
							
							 
							
							... 
							
							
							
							llvm-svn: 102711 
							
						 
						
							2010-04-30 13:36:12 +00:00  
						
					 
				
					
						
							
							
								 
								John McCall
							
						 
						
							 
							
							
							
							
								
							
							
								b3cec96a7c 
								
							 
						 
						
							
							
								
								Account for the VTT argument when making an implicit copy constructor for  
							
							 
							
							... 
							
							
							
							a class with virtual bases.  Just a patch until Sema starts (correctly) doing
most of this analysis.
Fixes PR 6622.
llvm-svn: 102692 
							
						 
						
							2010-04-30 05:56:45 +00:00  
						
					 
				
					
						
							
							
								 
								John McCall
							
						 
						
							 
							
							
							
							
								
							
							
								48bf349471 
								
							 
						 
						
							
							
								
								Fix -fno-rtti -fexceptions by forcing the emission of (non-"builtin") RTTI  
							
							 
							
							... 
							
							
							
							when used by the exceptions routines.  Fixes PR 6974.
llvm-svn: 102684 
							
						 
						
							2010-04-30 01:15:21 +00:00  
						
					 
				
					
						
							
							
								 
								John McCall
							
						 
						
							 
							
							
							
							
								
							
							
								dac3ea6e8d 
								
							 
						 
						
							
							
								
								Teach EHCleanupBlock to deal appropriately with the possibility that there  
							
							 
							
							... 
							
							
							
							might not have been an insertion block set at start.  Fixes PR6975.
llvm-svn: 102677 
							
						 
						
							2010-04-30 00:06:43 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								786a3d910e 
								
							 
						 
						
							
							
								
								Get the base class addresses before calling EmitClassCopyAssignment.  
							
							 
							
							... 
							
							
							
							llvm-svn: 102676 
							
						 
						
							2010-04-30 00:04:01 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								2b4ec8d003 
								
							 
						 
						
							
							
								
								Remove an unnecessary argument to EmitClassCopyAssignment.  
							
							 
							
							... 
							
							
							
							llvm-svn: 102674 
							
						 
						
							2010-04-29 23:51:42 +00:00  
						
					 
				
					
						
							
							
								 
								Devang Patel
							
						 
						
							 
							
							
							
							
								
							
							
								dfcd0661a1 
								
							 
						 
						
							
							
								
								Use clang::VarDecl name instead of llvm::GlobalVariable name.  
							
							 
							
							... 
							
							
							
							llvm::GLobalVariable name may not match user visibile name for function static variables.
llvm-svn: 102644 
							
						 
						
							2010-04-29 17:48:37 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								0c00537583 
								
							 
						 
						
							
							
								
								IRgen/NeXT: Put the synthesized _objc_super, _message_ref_t decls in a valid DeclContext, to satisfy the invariants that should hold on a RecordDecl.  
							
							 
							
							... 
							
							
							
							llvm-svn: 102624 
							
						 
						
							2010-04-29 16:29:11 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								499b902510 
								
							 
						 
						
							
							
								
								Support for construct/destruct of ivar array  
							
							 
							
							... 
							
							
							
							of c++ objects (NeXt runtime).
radar 7900343.
llvm-svn: 102546 
							
						 
						
							2010-04-28 22:30:33 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								882211c1da 
								
							 
						 
						
							
							
								
								Completely reimplement __builtin_offsetof, based on a patch by Roberto  
							
							 
							
							... 
							
							
							
							Amadini.
This change introduces a new expression node type, OffsetOfExpr, that
describes __builtin_offsetof. Previously, __builtin_offsetof was
implemented using a unary operator whose subexpression involved
various synthesized array-subscript and member-reference expressions,
which was ugly and made it very hard to instantiate as a
template. OffsetOfExpr represents the AST more faithfully, with proper
type source information and a more compact representation.
OffsetOfExpr also has support for dependent __builtin_offsetof
expressions; it can be value-dependent, but will never be
type-dependent (like sizeof or alignof). This commit introduces
template instantiation for __builtin_offsetof as well.
There are two major caveats to this patch:
  1) CodeGen cannot handle the case where __builtin_offsetof is not a
  constant expression, so it produces an error. So, to avoid
  regressing in C, we retain the old UnaryOperator-based
  __builtin_offsetof implementation in C while using the shiny new
  OffsetOfExpr implementation in C++. The old implementation can go
  away once we have proper CodeGen support for this case, which we
  expect won't cause much trouble in C++.
  2) __builtin_offsetof doesn't work well with non-POD class types,
  particularly when the designated field is found within a base
  class. I will address this in a subsequent patch.
Fixes PR5880 and a bunch of assertions when building Boost.Python
tests. 
llvm-svn: 102542 
							
						 
						
							2010-04-28 22:16:22 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								0dec1e0d56 
								
							 
						 
						
							
							
								
								IRGen for initialization/destruction of  
							
							 
							
							... 
							
							
							
							ivar class objects (NeXt runtime).
(radar 7900343).
llvm-svn: 102533 
							
						 
						
							2010-04-28 21:28:56 +00:00  
						
					 
				
					
						
							
							
								 
								David Chisnall
							
						 
						
							 
							
							
							
							
								
							
							
								01aa46795e 
								
							 
						 
						
							
							
								
								Changed signature of GenerateMessageSend() function to pass the ObjCInterfaceDecl for class messages and removed the boolean IsClassMessage argument, which wasn't used anywhere.  
							
							 
							
							... 
							
							
							
							Emitted some metadata on message sends to allow a later pass to do some speculative inlining of class methods (GNU runtime).  Speculative inlining of instance methods requires type feedback to be useful (work in progress), but for class methods it works quite nicely.  
llvm-svn: 102514 
							
						 
						
							2010-04-28 19:33:36 +00:00  
						
					 
				
					
						
							
							
								 
								Benjamin Kramer
							
						 
						
							 
							
							
							
							
								
							
							
								9c05bf46d1 
								
							 
						 
						
							
							
								
								Remove unused function.  
							
							 
							
							... 
							
							
							
							llvm-svn: 102499 
							
						 
						
							2010-04-28 15:54:45 +00:00  
						
					 
				
					
						
							
							
								 
								David Chisnall
							
						 
						
							 
							
							
							
							
								
							
							
								d472c85285 
								
							 
						 
						
							
							
								
								Emit the correct symbol name for the class (GNU runtime).  
							
							 
							
							... 
							
							
							
							llvm-svn: 102497 
							
						 
						
							2010-04-28 14:29:56 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								7988def89f 
								
							 
						 
						
							
							
								
								Improve name mangling for dependent template names (e.g., typename  
							
							 
							
							... 
							
							
							
							T::template apply<U>), handling a few cases where we previously failed
and performing substitutions on such dependent names. Fixes a crash in
Boost.PropertyTree.
llvm-svn: 102490 
							
						 
						
							2010-04-28 05:58:56 +00:00  
						
					 
				
					
						
							
							
								 
								John McCall
							
						 
						
							 
							
							
							
							
								
							
							
								d06fb865eb 
								
							 
						 
						
							
							
								
								Properly pass the address of a lazily-generated function declaration with  
							
							 
							
							... 
							
							
							
							incomplete type.  Fixes PR6911.
llvm-svn: 102473 
							
						 
						
							2010-04-28 00:00:30 +00:00  
						
					 
				
					
						
							
							
								 
								David Chisnall
							
						 
						
							 
							
							
							
							
								
							
							
								e6d0073fa9 
								
							 
						 
						
							
							
								
								Fixed message send to void (broken by my last commit - GNU runtime).  
							
							 
							
							... 
							
							
							
							llvm-svn: 102459 
							
						 
						
							2010-04-27 20:33:30 +00:00  
						
					 
				
					
						
							
							
								 
								David Chisnall
							
						 
						
							 
							
							
							
							
								
							
							
								75afda6c33 
								
							 
						 
						
							
							
								
								Ensure return from a message to nil is always 0 (GNU runtime).  
							
							 
							
							... 
							
							
							
							This works around stack corruption / crashes resulting from PR6944, and also
works around people who expect 'what works on my machine' to work everywhere
(GCC crashes in a number of cases on SPARC that should now work correctly with
clang).
llvm-svn: 102430 
							
						 
						
							2010-04-27 15:08:48 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								19d6355b77 
								
							 
						 
						
							
							
								
								Fix comments.  
							
							 
							
							... 
							
							
							
							llvm-svn: 102429 
							
						 
						
							2010-04-27 14:51:07 +00:00  
						
					 
				
					
						
							
							
								 
								John McCall
							
						 
						
							 
							
							
							
							
								
							
							
								2408e32096 
								
							 
						 
						
							
							
								
								Make the InjectedClassNameType the canonical type of the current instantiation  
							
							 
							
							... 
							
							
							
							of a class template or class template partial specialization.  That is to
say, in
  template <class T> class A { ... };
or
  template <class T> class B<const T*> { ... };
make 'A<T>' and 'B<const T*>' sugar for the corresponding InjectedClassNameType
when written inside the appropriate context.  This allows us to track the
current instantiation appropriately even inside AST routines.  It also allows
us to compute a DeclContext for a type much more efficiently, at some extra
cost every time we write a template specialization (which can be optimized,
but I've left it simple in this patch).
llvm-svn: 102407 
							
						 
						
							2010-04-27 00:57:59 +00:00  
						
					 
				
					
						
							
							
								 
								Devang Patel
							
						 
						
							 
							
							
							
							
								
							
							
								42fb6f8b9a 
								
							 
						 
						
							
							
								
								Enable debug info for local variables at -O1+.  
							
							 
							
							... 
							
							
							
							llvm-svn: 102398 
							
						 
						
							2010-04-26 23:28:46 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								5e8416a77f 
								
							 
						 
						
							
							
								
								emit dtors with the right calling convention in -fno-use-cxa-atexit  
							
							 
							
							... 
							
							
							
							mode.
llvm-svn: 102377 
							
						 
						
							2010-04-26 20:35:54 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								46a572b871 
								
							 
						 
						
							
							
								
								Make the static type of the exception variable in an Objective-C  
							
							 
							
							... 
							
							
							
							@catch  a VarDecl. The dynamic type is still a ParmVarDecl, but that
will change soon. No effective functionality change.
llvm-svn: 102341 
							
						 
						
							2010-04-26 16:46:50 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								710cb20cd6 
								
							 
						 
						
							
							
								
								IRgen/NeXT: Fix several alignment issues with Objective-C metadata symbols:  
							
							 
							
							... 
							
							
							
							- Fix some places that had the alignment hard coded.
 - Use ABI type alignment, not preferred type alignment -- neither of this is exactly right, as we really want the C type alignment as required by the runtime, but the ABI alignment is a more correct choice.
This should be equivalent for x86_64, but fixes the alignment for ARM.
llvm-svn: 102314 
							
						 
						
							2010-04-25 20:39:32 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								5e63927d41 
								
							 
						 
						
							
							
								
								IRgen/NeXT: Reuse EmitImageInfo for both fragile and non-fragile ABI. This fixes Clang to correctly emit the "CorrectedSynthesize" bit when using the non-fragile ABI.  
							
							 
							
							... 
							
							
							
							llvm-svn: 102312 
							
						 
						
							2010-04-25 20:39:01 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								06eed9bee2 
								
							 
						 
						
							
							
								
								Land another cleanup patch.  
							
							 
							
							... 
							
							
							
							llvm-svn: 102293 
							
						 
						
							2010-04-25 01:03:12 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								53e1ba948d 
								
							 
						 
						
							
							
								
								Revert enough of my patches to fix self-host again :(  
							
							 
							
							... 
							
							
							
							llvm-svn: 102289 
							
						 
						
							2010-04-25 00:52:09 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								dde8b46e62 
								
							 
						 
						
							
							
								
								Cleanup SynthesizeCXXCopyConstructor.  
							
							 
							
							... 
							
							
							
							llvm-svn: 102286 
							
						 
						
							2010-04-24 23:11:18 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								84e3b62ac0 
								
							 
						 
						
							
							
								
								Clean up SynthesizeCXXCopyAssignment a little.  
							
							 
							
							... 
							
							
							
							llvm-svn: 102285 
							
						 
						
							2010-04-24 23:09:21 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								c4ba0cd2ea 
								
							 
						 
						
							
							
								
								RenameGetAddressOfBaseOfCompleteClass to GetAddressOfDirectBaseInCompleteClass to reflect that it only handles direct bases.  
							
							 
							
							... 
							
							
							
							llvm-svn: 102284 
							
						 
						
							2010-04-24 23:01:49 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								26b6e23d57 
								
							 
						 
						
							
							
								
								More cleanup.  
							
							 
							
							... 
							
							
							
							llvm-svn: 102282 
							
						 
						
							2010-04-24 22:43:39 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								9523ad4fd3 
								
							 
						 
						
							
							
								
								Simplify EmitClassMemberwiseCopy now that it's only used for fields.  
							
							 
							
							... 
							
							
							
							llvm-svn: 102281 
							
						 
						
							2010-04-24 22:36:50 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								90235beb55 
								
							 
						 
						
							
							
								
								DefineImplicitCopyConstructor now uses SetBaseOrMemberInitializers to create implicit base initializers. (Member initializers are still handled by CodeGenFunction::SynthesizeCXXCopyConstructor for now).  
							
							 
							
							... 
							
							
							
							llvm-svn: 102279 
							
						 
						
							2010-04-24 22:25:18 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								bea9e74e82 
								
							 
						 
						
							
							
								
								Rename GetAddressOfBaseClass to OldGetAddressOfBaseClass.  
							
							 
							
							... 
							
							
							
							llvm-svn: 102275 
							
						 
						
							2010-04-24 21:51:08 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								795213efde 
								
							 
						 
						
							
							
								
								Get rid of the old GetNonVirtualBaseClassOffset and change all call sites to use the new version.  
							
							 
							
							... 
							
							
							
							llvm-svn: 102274 
							
						 
						
							2010-04-24 21:27:51 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								8a64c1c94c 
								
							 
						 
						
							
							
								
								Change CodeGenFunction::GetAddressOfDerivedClass to take a BasePath.  
							
							 
							
							... 
							
							
							
							llvm-svn: 102273 
							
						 
						
							2010-04-24 21:23:59 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								c6eaea70af 
								
							 
						 
						
							
							
								
								Convert more call sites over to the new GetAddressOfBaseClass.  
							
							 
							
							... 
							
							
							
							llvm-svn: 102272 
							
						 
						
							2010-04-24 21:12:55 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								d829a02514 
								
							 
						 
						
							
							
								
								Add a new GetAddressOfBaseClass overload that takes a base path and. Use it for derived-to-base casts.  
							
							 
							
							... 
							
							
							
							llvm-svn: 102270 
							
						 
						
							2010-04-24 21:06:20 +00:00  
						
					 
				
					
						
							
							
								 
								Benjamin Kramer
							
						 
						
							 
							
							
							
							
								
							
							
								20f2d4382f 
								
							 
						 
						
							
							
								
								Fix pasto, add a comment.  
							
							 
							
							... 
							
							
							
							llvm-svn: 102263 
							
						 
						
							2010-04-24 20:26:20 +00:00  
						
					 
				
					
						
							
							
								 
								Benjamin Kramer
							
						 
						
							 
							
							
							
							
								
							
							
								bbb5deace6 
								
							 
						 
						
							
							
								
								Factor code. No functionality change.  
							
							 
							
							... 
							
							
							
							llvm-svn: 102262 
							
						 
						
							2010-04-24 20:19:58 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								fca18c1b41 
								
							 
						 
						
							
							
								
								NeXT: Clean up dispatch method policy selection.  
							
							 
							
							... 
							
							
							
							- Replace -cc1 level -fobjc-legacy-dispatch with -fobjc-dispatch-method={legacy,non-legacy,mixed}.
 - Lift "mixed" vs "non-mixed" policy choice up to driver level, instead of being buried in CGObjCMac.cpp.
 - No intended functionality change.
llvm-svn: 102255 
							
						 
						
							2010-04-24 17:56:46 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								0c509eeac7 
								
							 
						 
						
							
							
								
								CastExpr should not hold a pointer to the base path. More cleanup.  
							
							 
							
							... 
							
							
							
							llvm-svn: 102249 
							
						 
						
							2010-04-24 16:57:13 +00:00  
						
					 
				
					
						
							
							
								 
								Dan Gohman
							
						 
						
							 
							
							
							
							
								
							
							
								7905d187e6 
								
							 
						 
						
							
							
								
								Fix a place in inline asm lowering which was creating a TruncInst with a  
							
							 
							
							... 
							
							
							
							pointer operand. This fixes an abort on
MultiSource/Applications/ClamAV/libclamav_mbox.c.
llvm-svn: 102238 
							
						 
						
							2010-04-24 04:55:02 +00:00  
						
					 
				
					
						
							
							
								 
								Devang Patel
							
						 
						
							 
							
							
							
							
								
							
							
								8471593892 
								
							 
						 
						
							
							
								
								Revert accidental check-in.  
							
							 
							
							... 
							
							
							
							llvm-svn: 102226 
							
						 
						
							2010-04-24 00:49:16 +00:00  
						
					 
				
					
						
							
							
								 
								Devang Patel
							
						 
						
							 
							
							
							
							
								
							
							
								f8b55d478c 
								
							 
						 
						
							
							
								
								Revert r102215. This causes clang crash while compiling a test case from gdb testsuite.  
							
							 
							
							... 
							
							
							
							llvm-svn: 102224 
							
						 
						
							2010-04-24 00:40:35 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								96c79498fb 
								
							 
						 
						
							
							
								
								Improve the AST representation of Objective-C @try/@catch/@finally  
							
							 
							
							... 
							
							
							
							statements. Instead of the @try  having a single @catch , where all of
the @catch's were chained (using an O(n^2) algorithm nonetheless),
@try  just holds an array of its @catch  blocks. The resulting AST is
slightly more compact (not important) and better represents the actual
language semantics (good).
llvm-svn: 102221 
							
						 
						
							2010-04-23 22:50:49 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								d3fa70181d 
								
							 
						 
						
							
							
								
								More -fno-constant-cfstrings API work.  
							
							 
							
							... 
							
							
							
							llvm-svn: 102219 
							
						 
						
							2010-04-23 22:33:39 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								9759793855 
								
							 
						 
						
							
							
								
								Add an InheritancePath parameter to the ImplicitCastExpr constructor.  
							
							 
							
							... 
							
							
							
							llvm-svn: 102218 
							
						 
						
							2010-04-23 22:18:37 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								e3883874c5 
								
							 
						 
						
							
							
								
								NeXT/EH: When generating the rethrow code for a finally block, make sure to  
							
							 
							
							... 
							
							
							
							chain outwards when inside a nested exception scope.
 - A real test for this is going into LLVM test-suite.
llvm-svn: 102204 
							
						 
						
							2010-04-23 19:12:32 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								5a6b3e0865 
								
							 
						 
						
							
							
								
								NeXT/EH: Tidy up EH code a bit, don't emit the catch block EH handler if it is unreachable.  
							
							 
							
							... 
							
							
							
							llvm-svn: 102203 
							
						 
						
							2010-04-23 19:12:24 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								e804c28745 
								
							 
						 
						
							
							
								
								More work toward implementing  
							
							 
							
							... 
							
							
							
							NeXt's -fno-constant-cfstrings - wip.
llvm-svn: 102189 
							
						 
						
							2010-04-23 17:41:07 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								db6d5cb892 
								
							 
						 
						
							
							
								
								Implement PR6845.  We allow matching constraints to have different  
							
							 
							
							... 
							
							
							
							input and output types when the smaller value isn't mentioned in the
asm string.  Extend this support from integers to also allowing 
fp values to be mismatched (if not mentioned in the asm string).
llvm-svn: 102188 
							
						 
						
							2010-04-23 17:27:29 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								914af2182b 
								
							 
						 
						
							
							
								
								Handle compound assignment expressions (i += j) as lvalues, which is  
							
							 
							
							... 
							
							
							
							permitted in C++ but not in C. Fixes PR6900. Clang can now handle all
of Boost.Lambda's regression tests.
llvm-svn: 102170 
							
						 
						
							2010-04-23 04:16:32 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								ffe0884bc4 
								
							 
						 
						
							
							
								
								Emit a lame diagnostic when we can't mangle operator names  
							
							 
							
							... 
							
							
							
							llvm-svn: 102168 
							
						 
						
							2010-04-23 03:19:53 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								173627188d 
								
							 
						 
						
							
							
								
								Mangle dependent template names such as the nested-name-specifier in  
							
							 
							
							... 
							
							
							
							T::apply <U>::type
Fixes PR6899, although I want to dig a little deeper into the FIXME
for dependent template names that refer to operators.
llvm-svn: 102167 
							
						 
						
							2010-04-23 03:10:43 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								19043f0a6a 
								
							 
						 
						
							
							
								
								I hate default statements. Fixes PR6874.  
							
							 
							
							... 
							
							
							
							llvm-svn: 102160 
							
						 
						
							2010-04-23 02:02:43 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								63408e848b 
								
							 
						 
						
							
							
								
								Support for -fno-constant-cfstrings option - wip.  
							
							 
							
							... 
							
							
							
							llvm-svn: 102112 
							
						 
						
							2010-04-22 20:26:39 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								5981377698 
								
							 
						 
						
							
							
								
								IRgen: Fix another case where we generated an invalid access component when we  
							
							 
							
							... 
							
							
							
							immediately narrowed the access size. Fix this (and previous case) by just
choosing a better access size up-front.
llvm-svn: 102068 
							
						 
						
							2010-04-22 15:22:33 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								5d6c07e0e9 
								
							 
						 
						
							
							
								
								IRgen: Fix case where we might generate an access component with width == 0, if  
							
							 
							
							... 
							
							
							
							we have to narrow the access side immediately (can happen with packed,
-fno-bitfield-type-align).
llvm-svn: 102067 
							
						 
						
							2010-04-22 14:56:10 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								b219780b72 
								
							 
						 
						
							
							
								
								Suppress compiler warning.  
							
							 
							
							... 
							
							
							
							llvm-svn: 102047 
							
						 
						
							2010-04-22 03:17:06 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								fc66e0ed87 
								
							 
						 
						
							
							
								
								IRgen: Set alignment correctly on bit-field accesses.  
							
							 
							
							... 
							
							
							
							llvm-svn: 102046 
							
						 
						
							2010-04-22 03:17:04 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								488f55c271 
								
							 
						 
						
							
							
								
								IRgen: Rewrite bit-field access policy to not access data beyond the bounds of the structure, which we also now verify as part of the post-layout consistency checks.  
							
							 
							
							... 
							
							
							
							- This fixes some pedantic bugs with packed structures, as well as major problems with -fno-bitfield-type-align.
 - Fixes PR5591, PR5567, and all known -fno-bitfield-type-align issues.
 - Review appreciated.
llvm-svn: 102045 
							
						 
						
							2010-04-22 02:35:46 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								b6f4b05914 
								
							 
						 
						
							
							
								
								IRgen: Fix CGRecordLayout::print to print the bit-field infos in a consistent order.  
							
							 
							
							... 
							
							
							
							llvm-svn: 102044 
							
						 
						
							2010-04-22 02:35:36 +00:00  
						
					 
				
					
						
							
							
								 
								John McCall
							
						 
						
							 
							
							
							
							
								
							
							
								2e6567ae60 
								
							 
						 
						
							
							
								
								Call PerformCopyInitialization to properly initialize the exception temporary  
							
							 
							
							... 
							
							
							
							in a throw expression.  Use EmitAnyExprToMem to emit the throw expression,
which magically elides the final copy-constructor call (which raises a new
strict-compliance bug, but baby steps).  Give __cxa_throw a destructor pointer
if the exception type has a non-trivial destructor.
llvm-svn: 102039 
							
						 
						
							2010-04-22 01:10:34 +00:00  
						
					 
				
					
						
							
							
								 
								Devang Patel
							
						 
						
							 
							
							
							
							
								
							
							
								b9ab309650 
								
							 
						 
						
							
							
								
								Encode field accessibility.  
							
							 
							
							... 
							
							
							
							llvm-svn: 102033 
							
						 
						
							2010-04-21 23:12:37 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								53fac692fa 
								
							 
						 
						
							
							
								
								ABI/x86-32 & x86-64: Alignment on 'byval' must be set when when the alignment  
							
							 
							
							... 
							
							
							
							exceeds the minimum ABI alignment.
llvm-svn: 102019 
							
						 
						
							2010-04-21 19:49:55 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								557893d2a8 
								
							 
						 
						
							
							
								
								IRgen/x86-32: Factor out getIndirectResult(), to match x86-64 factoring.  
							
							 
							
							... 
							
							
							
							llvm-svn: 102015 
							
						 
						
							2010-04-21 19:10:51 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								2ba67440b6 
								
							 
						 
						
							
							
								
								IRgen: Add checking that the LLVM and AST record layout offsets agree (for  
							
							 
							
							... 
							
							
							
							non-bit-fields).
llvm-svn: 102014 
							
						 
						
							2010-04-21 19:10:49 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								34f54d55e2 
								
							 
						 
						
							
							
								
								Comment out an assert for now.  
							
							 
							
							... 
							
							
							
							llvm-svn: 102007 
							
						 
						
							2010-04-21 18:03:05 +00:00  
						
					 
				
					
						
							
							
								 
								John McCall
							
						 
						
							 
							
							
							
							
								
							
							
								bf814c79b6 
								
							 
						 
						
							
							
								
								I failed to notice that my last patch wasn't doing as much as it could  
							
							 
							
							... 
							
							
							
							because EmitBranch actually clears the insert point.  This version
actually accomplishes what I initially wanted.
llvm-svn: 101998 
							
						 
						
							2010-04-21 11:18:06 +00:00  
						
					 
				
					
						
							
							
								 
								John McCall
							
						 
						
							 
							
							
							
							
								
							
							
								e683359fc9 
								
							 
						 
						
							
							
								
								Teach EmitBlock to put the target block immediately after the current block  
							
							 
							
							... 
							
							
							
							(if there's a current block).  The chief advantage of doing this is that it
lets us pick blocks (e.g. EH blocks) to push to the end of the function so
that fallthrough happens consistently --- i.e. it gives us the flexibility
of ordering blocks as we please without having to change the order in which
we generate code.  There are standard (?) optimization passes which can do some
of that for us, but better to generate reasonable code to begin with.
llvm-svn: 101997 
							
						 
						
							2010-04-21 10:29:06 +00:00  
						
					 
				
					
						
							
							
								 
								John McCall
							
						 
						
							 
							
							
							
							
								
							
							
								2188696d98 
								
							 
						 
						
							
							
								
								Miscellaneous codegen cleanups.  Mostly, don't create new basic blocks  
							
							 
							
							... 
							
							
							
							just to save the current insertion state!  This change significantly
simplifies the IR CFG in exceptions code.
llvm-svn: 101996 
							
						 
						
							2010-04-21 10:05:39 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								9a12919421 
								
							 
						 
						
							
							
								
								Overhaul the AST representation of Objective-C message send  
							
							 
							
							... 
							
							
							
							expressions, to improve source-location information, clarify the
actual receiver of the message, and pave the way for proper C++
support. The ObjCMessageExpr node represents four different kinds of
message sends in a single AST node:
  1) Send to a object instance described by an expression (e.g., [x method:5])
  2) Send to a class described by the class name (e.g., [NSString method:5])
  3) Send to a superclass class (e.g, [super method:5] in class method)
  4) Send to a superclass instance (e.g., [super method:5] in instance method)
Previously these four cases where tangled together. Now, they have
more distinct representations. Specific changes:
  1) Unchanged; the object instance is represented by an Expr*.
  2) Previously stored the ObjCInterfaceDecl* referring to the class
  receiving the message. Now stores a TypeSourceInfo* so that we know
  how the class was spelled. This both maintains typedef information
  and opens the door for more complicated C++ types (e.g., dependent
  types). There was an alternative, unused representation of these
  sends by naming the class via an IdentifierInfo *. In practice, we
  either had an ObjCInterfaceDecl *, from which we would get the
  IdentifierInfo *, or we fell into the case below...
  3) Previously represented by a class message whose IdentifierInfo *
  referred to "super". Sema and CodeGen would use isStr("super") to
  determine if they had a send to super. Now represented as a
  "class super" send, where we have both the location of the "super"
  keyword and the ObjCInterfaceDecl* of the superclass we're
  targetting (statically).
  4) Previously represented by an instance message whose receiver is a
  an ObjCSuperExpr, which Sema and CodeGen would check for via
  isa<ObjCSuperExpr>(). Now represented as an "instance super" send,
  where we have both the location of the "super" keyword and the
  ObjCInterfaceDecl* of the superclass we're targetting
  (statically). Note that ObjCSuperExpr only has one remaining use in
  the AST, which is for "super.prop" references.
The new representation of ObjCMessageExpr is 2 pointers smaller than
the old one, since it combines more storage. It also eliminates a leak
when we loaded message-send expressions from a precompiled header. The
representation also feels much cleaner to me; comments welcome!
This patch attempts to maintain the same semantics we previously had
with Objective-C message sends. In several places, there are massive
changes that boil down to simply replacing a nested-if structure such
as:
  if (message has a receiver expression) {
    // instance message
    if (isa<ObjCSuperExpr>(...)) {
     // send to super
    } else {
     // send to an object
   }
  } else {
    // class message
    if (name->isStr("super")) {
      // class send to super
    } else {
      // send to class
    }
  }
with a switch
  switch (E->getReceiverKind()) {
  case ObjCMessageExpr::SuperInstance: ...
  case ObjCMessageExpr::Instance: ...
  case ObjCMessageExpr::SuperClass: ...
  case ObjCMessageExpr::Class:...
  }
There are quite a few places (particularly in the checkers) where
send-to-super is effectively ignored. I've placed FIXMEs in most of
them, and attempted to address send-to-super in a reasonable way. This
could use some review.
llvm-svn: 101972 
							
						 
						
							2010-04-21 00:45:42 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								acdfa7acfe 
								
							 
						 
						
							
							
								
								Fixes a code gen. bug by removing an assert.  
							
							 
							
							... 
							
							
							
							It is ok to have c++-ness inside extern "C" 
block. Fixes pr6644.
llvm-svn: 101948 
							
						 
						
							2010-04-20 22:02:31 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								91baecfeb3 
								
							 
						 
						
							
							
								
								Back out r101911 and see if it makes the bots happy.  
							
							 
							
							... 
							
							
							
							llvm-svn: 101921 
							
						 
						
							2010-04-20 18:05:10 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								20b551a443 
								
							 
						 
						
							
							
								
								IRgen: Always use i8 arrays to access union bit-fields. This is ugly, but  
							
							 
							
							... 
							
							
							
							matches how we currently handle structs, and this correctly handles
-fno-bitfield-type-align.
llvm-svn: 101918 
							
						 
						
							2010-04-20 17:52:30 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								6a0227df49 
								
							 
						 
						
							
							
								
								Fix a bug which triggered the assertion I added yesterday. Basically, when we initialize the vtable pointer for a virtual base, and there was another path from the most derived class to another base with the same class type, we would use the wrong base.  
							
							 
							
							... 
							
							
							
							llvm-svn: 101911 
							
						 
						
							2010-04-20 16:22:16 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								53cebd1ea6 
								
							 
						 
						
							
							
								
								Move code to apply a non-virtual and virtual offset out into a separate function.  
							
							 
							
							... 
							
							
							
							llvm-svn: 101909 
							
						 
						
							2010-04-20 16:03:35 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								9cffdf1331 
								
							 
						 
						
							
							
								
								don't slap noalias attribute on stret result arguments.  
							
							 
							
							... 
							
							
							
							This mirror's Dan's patch for llvm-gcc in r97989, and
fixes the miscompilation in PR6525.  There is some contention
over whether this is the right thing to do, but it is the
conservative answer and demonstrably fixes a miscompilation.
llvm-svn: 101877 
							
						 
						
							2010-04-20 05:44:43 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								652758c3ec 
								
							 
						 
						
							
							
								
								Pass the nearest virtual base decl to InitializeVTablePointers. No functionality change right now.  
							
							 
							
							... 
							
							
							
							llvm-svn: 101872 
							
						 
						
							2010-04-20 05:22:15 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								3d4218570a 
								
							 
						 
						
							
							
								
								Assert that the path from the derived to the base class in CodeGenFunction::GetAddressOfBaseClass is not ambiguous.  
							
							 
							
							... 
							
							
							
							llvm-svn: 101869 
							
						 
						
							2010-04-20 05:07:22 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								c4df407604 
								
							 
						 
						
							
							
								
								Keep track of the actual storage specifier written on a variable or  
							
							 
							
							... 
							
							
							
							function declaration, since it may end up being changed (e.g.,
"extern" can become "static" if a prior declaration was static). Patch
by Enea Zaffanella and Paolo Bolzoni.
llvm-svn: 101826 
							
						 
						
							2010-04-19 22:54:31 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								ccabe48235 
								
							 
						 
						
							
							
								
								AST: Dump ASTRecordLayout objects when they are created with -fdump-record-layouts.  
							
							 
							
							... 
							
							
							
							llvm-svn: 101815 
							
						 
						
							2010-04-19 20:44:53 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								2ea5183b59 
								
							 
						 
						
							
							
								
								IRgen: Kill unused function and move the type match assert to after record dumping.  
							
							 
							
							... 
							
							
							
							llvm-svn: 101814 
							
						 
						
							2010-04-19 20:44:47 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								fd34b0ac84 
								
							 
						 
						
							
							
								
								Check for darwin befoer cheking for version.  
							
							 
							
							... 
							
							
							
							(related to radar 7866951).
llvm-svn: 101799 
							
						 
						
							2010-04-19 18:38:31 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								4d55b2d049 
								
							 
						 
						
							
							
								
								Some renaming of methods, fixes typo  
							
							 
							
							... 
							
							
							
							(related to PR6769).
llvm-svn: 101794 
							
						 
						
							2010-04-19 18:15:02 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								dfb3983525 
								
							 
						 
						
							
							
								
								Force clang to produce legacy api for messaging  
							
							 
							
							... 
							
							
							
							in for pre-snowleoprd (NeXt runtime). Fixes
radar 7866951
llvm-svn: 101791 
							
						 
						
							2010-04-19 17:53:30 +00:00  
						
					 
				
					
						
							
							
								 
								Rafael Espindola
							
						 
						
							 
							
							
							
							
								
							
							
								47cf5b581a 
								
							 
						 
						
							
							
								
								Add comment explaning the use of c99 inline in c++.  
							
							 
							
							... 
							
							
							
							llvm-svn: 101787 
							
						 
						
							2010-04-19 16:58:20 +00:00  
						
					 
				
					
						
							
							
								 
								Dan Gohman
							
						 
						
							 
							
							
							
							
								
							
							
								145f3f1e83 
								
							 
						 
						
							
							
								
								Fix -Wcast-qual warnings.  
							
							 
							
							... 
							
							
							
							llvm-svn: 101786 
							
						 
						
							2010-04-19 16:39:44 +00:00  
						
					 
				
					
						
							
							
								 
								David Chisnall
							
						 
						
							 
							
							
							
							
								
							
							
								44ec555a87 
								
							 
						 
						
							
							
								
								Don't just emit ivar metadata - emit CORRECT ivar metadata. (GNU runtime)  
							
							 
							
							... 
							
							
							
							llvm-svn: 101759 
							
						 
						
							2010-04-19 01:37:25 +00:00  
						
					 
				
					
						
							
							
								 
								David Chisnall
							
						 
						
							 
							
							
							
							
								
							
							
								18cf7378de 
								
							 
						 
						
							
							
								
								Fix emitting ivar metadata for synthesized ivars and some 64-bit fixes. (GNU runtime)  
							
							 
							
							... 
							
							
							
							llvm-svn: 101758 
							
						 
						
							2010-04-19 00:45:34 +00:00  
						
					 
				
					
						
							
							
								 
								Rafael Espindola
							
						 
						
							 
							
							
							
							
								
							
							
								683fe4fc4c 
								
							 
						 
						
							
							
								
								If a method is virtual and the class key function is in another file, emit the method as available_externally.  
							
							 
							
							... 
							
							
							
							Fixes PR6747
llvm-svn: 101757 
							
						 
						
							2010-04-19 00:44:22 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								3fef72f0ba 
								
							 
						 
						
							
							
								
								Local static variables must be available module-wise  
							
							 
							
							... 
							
							
							
							as they are accessible in static methods in a class
local to the same function. Fixes PR6769.
llvm-svn: 101756 
							
						 
						
							2010-04-18 21:01:23 +00:00  
						
					 
				
					
						
							
							
								 
								Nuno Lopes
							
						 
						
							 
							
							
							
							
								
							
							
								247a138ec6 
								
							 
						 
						
							
							
								
								recommit r101568 to fix PR6766  
							
							 
							
							... 
							
							
							
							as a side-effect, remove two FIXMEs now fixed
llvm-svn: 101726 
							
						 
						
							2010-04-18 19:06:43 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								d5f27b0583 
								
							 
						 
						
							
							
								
								Simplify wide bit-field layout in CGRecordLayoutBuilder, and also fix a bug where assigning to a bit-field member would overwrite other parts of the struct.  
							
							 
							
							... 
							
							
							
							llvm-svn: 101681 
							
						 
						
							2010-04-17 22:54:57 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								8345a70c67 
								
							 
						 
						
							
							
								
								Fix an assert when assigning a boolean value to a bitfield of type _Bool.  
							
							 
							
							... 
							
							
							
							llvm-svn: 101678 
							
						 
						
							2010-04-17 21:52:22 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								2295f13bb0 
								
							 
						 
						
							
							
								
								Unnamed bit-fields in a union should be laid out with a type that doesn't affect alignment.  
							
							 
							
							... 
							
							
							
							llvm-svn: 101673 
							
						 
						
							2010-04-17 21:04:52 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								1de2f5710b 
								
							 
						 
						
							
							
								
								Factor union field layout code out into a separate function. No functionality change.  
							
							 
							
							... 
							
							
							
							llvm-svn: 101671 
							
						 
						
							2010-04-17 20:49:27 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								11e5140db9 
								
							 
						 
						
							
							
								
								Vtable -> VTable renames across the board.  
							
							 
							
							... 
							
							
							
							llvm-svn: 101666 
							
						 
						
							2010-04-17 20:15:18 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								a299f2c872 
								
							 
						 
						
							
							
								
								fix integrated assembler with i386 objc code.  
							
							 
							
							... 
							
							
							
							llvm-svn: 101660 
							
						 
						
							2010-04-17 18:26:20 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								c6db5ab8b2 
								
							 
						 
						
							
							
								
								Fix a bug where we would sometimes incorrectly mark an vtable function as unused.  
							
							 
							
							... 
							
							
							
							llvm-svn: 101643 
							
						 
						
							2010-04-17 17:24:33 +00:00  
						
					 
				
					
						
							
							
								 
								Benjamin Kramer
							
						 
						
							 
							
							
							
							
								
							
							
								b11416d061 
								
							 
						 
						
							
							
								
								Add raw_ostream operators to NamedDecl for convenience. Switch over all users of getNameAsString on a stream.  
							
							 
							
							... 
							
							
							
							The next step is to print the name directly into the stream, avoiding a temporary std::string copy.
llvm-svn: 101632 
							
						 
						
							2010-04-17 09:33:03 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								b714a4b4a0 
								
							 
						 
						
							
							
								
								revert r101568, which miscompiles this testcase, distilled from ldecod:  
							
							 
							
							... 
							
							
							
							void exit_picture()
{
  char yuv_types[4][6]= {"4:0:0","4:2:0","4:2:2","4:4:4"};
  foo(yuv_types);
}
llvm-svn: 101623 
							
						 
						
							2010-04-17 06:53:44 +00:00  
						
					 
				
					
						
							
							
								 
								Nuno Lopes
							
						 
						
							 
							
							
							
							
								
							
							
								74b595256a 
								
							 
						 
						
							
							
								
								fix PR6766: codegen of var initialized with wide char  
							
							 
							
							... 
							
							
							
							llvm-svn: 101568 
							
						 
						
							2010-04-16 23:19:41 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								3cff64ab58 
								
							 
						 
						
							
							
								
								fix a bogus assertion exposed by a recent change: packing the  
							
							 
							
							... 
							
							
							
							struct may cause it to shrink more than one byte.  Before
my recent changes we compiled the new test into:
%0 = type { [6 x i8] }
@x  = global %0 { [6 x i8] undef }, align 2        ; <%0*> [#uses=0]
which is obviously bogus.  Now we compile it into:
%0 = type <{ i32, i8, i8 }>
@x  = global %0 zeroinitializer, align 2           ; <%0*> [#uses=0]
Where the last byte only is tail padding.
llvm-svn: 101536 
							
						 
						
							2010-04-16 21:02:32 +00:00  
						
					 
				
					
						
							
							
								 
								Nuno Lopes
							
						 
						
							 
							
							
							
							
								
							
							
								5863c999e7 
								
							 
						 
						
							
							
								
								emit padding as undef values, take 2  
							
							 
							
							... 
							
							
							
							merge also a few tests I had here for this feature, and FileCheck'ize one file
llvm-svn: 101535 
							
						 
						
							2010-04-16 20:56:35 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								be6f3181dd 
								
							 
						 
						
							
							
								
								Make CGRecordLayoutBuilder deal with wide bit-fields. Will land tests shortly (Daniel, please review).  
							
							 
							
							... 
							
							
							
							llvm-svn: 101472 
							
						 
						
							2010-04-16 16:23:02 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								79bf976518 
								
							 
						 
						
							
							
								
								tidy up  
							
							 
							
							... 
							
							
							
							llvm-svn: 101447 
							
						 
						
							2010-04-16 06:12:51 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								9c78d63fbc 
								
							 
						 
						
							
							
								
								IRgen: Change CGBitFieldInfo to take the AccessInfo as constructor arguments, it is now an immutable object.  
							
							 
							
							... 
							
							
							
							Also, add some checking of various invariants that should hold on the CGBitFieldInfo access.
llvm-svn: 101345 
							
						 
						
							2010-04-15 05:09:32 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								bb13845c5f 
								
							 
						 
						
							
							
								
								IRgen: Eliminate now unused fields from CGBitFieldInfo.  
							
							 
							
							... 
							
							
							
							llvm-svn: 101344 
							
						 
						
							2010-04-15 05:09:28 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								67aba79b74 
								
							 
						 
						
							
							
								
								IRgen: (Reapply 101222, with fixes) Move EmitStoreThroughBitfieldLValue to use new CGBitfieldInfo::AccessInfo decomposition, instead of computing the access policy itself.  
							
							 
							
							... 
							
							
							
							- Sadly, this doesn't seem to give any .ll size win so far. It is possible to make this routine significantly smarter & avoid various shifting, masking, and zext/sext, but I'm not really convinced it is worth it. It is tricky, and this is really instcombine's job.
 - No intended functionality change; the test case is just to increase coverage & serves as a demo file, it worked before this commit.
The new fixes from r101222 are:
 1. The shift to the target position needs to occur after the value is extended to the correct size. This broke Clang bootstrap, among other things no doubt.
 2. Swap the order of arguments to OR, to get a tad more constant folding.
llvm-svn: 101339 
							
						 
						
							2010-04-15 03:47:33 +00:00  
						
					 
				
					
						
							
							
								 
								Eric Christopher
							
						 
						
							 
							
							
							
							
								
							
							
								1bbc7086ff 
								
							 
						 
						
							
							
								
								Rewrite handling of 64-bit palignr intrinsics to be vector shuffles.  
							
							 
							
							... 
							
							
							
							Stop multiplying constant by 8 accordingly in the header and change
intrinsic definition for what types we expect.
Add to existing palignr test to check that we're emitting the correct things.
llvm-svn: 101332 
							
						 
						
							2010-04-15 01:43:08 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								d51c1a6e09 
								
							 
						 
						
							
							
								
								IRgen/NeXT: Simplify to use AST record layout for getting offsets instead of the  
							
							 
							
							... 
							
							
							
							IRgen record layout, which this code doesn't need to depend on.
llvm-svn: 101257 
							
						 
						
							2010-04-14 17:02:21 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								91ea6ac3e9 
								
							 
						 
						
							
							
								
								Speculatively revert "IRgen: Move EmitStoreThroughBitfieldLValue to use new CGBitfieldInfo::AccessInfo decomposition, instead of computing the access policy itself.", I think it might be breaking bootstrap.  
							
							 
							
							... 
							
							
							
							llvm-svn: 101235 
							
						 
						
							2010-04-14 05:48:35 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								230e1541b3 
								
							 
						 
						
							
							
								
								IRgen: Move EmitStoreThroughBitfieldLValue to use new CGBitfieldInfo::AccessInfo decomposition, instead of computing the access policy itself.  
							
							 
							
							... 
							
							
							
							- Sadly, this doesn't seem to give any .ll size win so far. It is possible to make this routine significantly smarter & avoid various shifting, masking, and zext/sext, but I'm not really convinced it is worth it. It is tricky, and this is really instcombine's job.
 - No intended functionality change; the test case is just to increase coverage & serves as a demo file, it worked before this commit.
llvm-svn: 101222 
							
						 
						
							2010-04-14 04:08:03 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								b2b40a479d 
								
							 
						 
						
							
							
								
								IRgen: Tweak CGBitFieldInfo doxyments & add an accessor.  
							
							 
							
							... 
							
							
							
							llvm-svn: 101221 
							
						 
						
							2010-04-14 04:07:59 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								dad4062b4d 
								
							 
						 
						
							
							
								
								implement altivec.h and a bunch of support code, patch by Anton Yartsev!  
							
							 
							
							... 
							
							
							
							llvm-svn: 101215 
							
						 
						
							2010-04-14 03:54:58 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								3447a02d5f 
								
							 
						 
						
							
							
								
								IRgen: Move EmitLoadOfBitfieldLValue to use new CGBitfieldInfo::AccessInfo decomposition, instead of computing the access policy itself.  
							
							 
							
							... 
							
							
							
							- This lets the method focus slightly more on emitting clean IR to honor the policy which has been selected. On 403.gcc's combine.c, x86_64, -O0, this reduces the number of lines in the .ll file (~= # of instructions) by 2.5%.
 - No intended functionality change -- at -O3 this should produce equivalent if not identical output. On 403.gcc's combine.c, x86_64, -O3, this isn't quite true and some of the changes are regressions, but I'm not going to worry about that until we move to a new access policy.
 - There is still some room for improvement in the generated IR, in particular we can usually fold the sign-extension of the bit-field into one of the component access. See the FIXME.
llvm-svn: 101192 
							
						 
						
							2010-04-13 23:34:15 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								b935b9370d 
								
							 
						 
						
							
							
								
								IRgen: Enhance CGBitFieldInfo with enough information to fully describe the "policy" with which a bit-field should be accessed.  
							
							 
							
							... 
							
							
							
							- For now, these policies are computed to match the current IRgen strategy, although the new information isn't being used yet (except in -fdump-record-layouts).
 - Design comments appreciated.
llvm-svn: 101178 
							
						 
						
							2010-04-13 20:58:55 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								5e575c03b8 
								
							 
						 
						
							
							
								
								Removes a FIXME.  
							
							 
							
							... 
							
							
							
							llvm-svn: 101161 
							
						 
						
							2010-04-13 18:43:37 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								7e9d52aaca 
								
							 
						 
						
							
							
								
								Variation of objc_copyStruct API generation when  
							
							 
							
							... 
							
							
							
							property (atomic/nonatomic) is of aggregate type with
gc'able member objects) (NeXT runtime).
llvm-svn: 101156 
							
						 
						
							2010-04-13 18:32:24 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								ff0e2a36e2 
								
							 
						 
						
							
							
								
								Rework the ConstStructBuilder code to emit missing initializer  
							
							 
							
							... 
							
							
							
							elements with explicit zero values instead of with tail padding.
On an example like this:
struct foo { int a; int b; };
struct foo fooarray[] = {
    {1, 2},
    {4},
};
We now lay this out as:
@fooarray = global [2 x %struct.foo] [%struct.foo { i32 1, i32 2 }, %struct.foo { i32 4, i32 0 }]
instead of as:
@fooarray = global %0 <{ %struct.foo { i32 1, i32 2 }, %1 { i32 4, [4 x i8] zeroinitializer } }>
Preserving both the struct type of the second element, but also the array type of the entire thing.
llvm-svn: 101155 
							
						 
						
							2010-04-13 18:16:19 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								d8d760ce66 
								
							 
						 
						
							
							
								
								unbreak tests.  
							
							 
							
							... 
							
							
							
							llvm-svn: 101153 
							
						 
						
							2010-04-13 17:57:11 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								cfa3e7ae6a 
								
							 
						 
						
							
							
								
								move a bunch of ConstStructBuilder methods out of line.  
							
							 
							
							... 
							
							
							
							llvm-svn: 101152 
							
						 
						
							2010-04-13 17:45:57 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								7a4a29f89a 
								
							 
						 
						
							
							
								
								minor cleanups  
							
							 
							
							... 
							
							
							
							llvm-svn: 101151 
							
						 
						
							2010-04-13 17:39:09 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								08b0f66d2e 
								
							 
						 
						
							
							
								
								Add support for objc_copyStruct to enforce  
							
							 
							
							... 
							
							
							
							atomicity of aggregate properties in setter/getter
methods. wip.
llvm-svn: 101107 
							
						 
						
							2010-04-13 00:38:05 +00:00  
						
					 
				
					
						
							
							
								 
								Devang Patel
							
						 
						
							 
							
							
							
							
								
							
							
								74c10507a6 
								
							 
						 
						
							
							
								
								Fix debug info for cleanup block.  
							
							 
							
							... 
							
							
							
							llvm-svn: 101100 
							
						 
						
							2010-04-13 00:08:43 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								933f67887f 
								
							 
						 
						
							
							
								
								fix PR6660/6168: emit padding as zeros instead of undef.  Because  
							
							 
							
							... 
							
							
							
							trailing fields may not be represented in initializer lists, they
are being handled as padding and those fields *must* be zero 
initialized.
llvm-svn: 101067 
							
						 
						
							2010-04-12 21:10:05 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								f9c24f8403 
								
							 
						 
						
							
							
								
								IRgen: Factor out ComputeBitFieldInfo.  
							
							 
							
							... 
							
							
							
							llvm-svn: 101066 
							
						 
						
							2010-04-12 21:01:28 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								5a8c2034a4 
								
							 
						 
						
							
							
								
								Add some API code for future work.  
							
							 
							
							... 
							
							
							
							llvm-svn: 101052 
							
						 
						
							2010-04-12 18:18:10 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								b97bff9aa9 
								
							 
						 
						
							
							
								
								IRgen: Add CGRecordLayout::dump, and dump (irgen) record layouts as part of -fdump-record-layouts.  
							
							 
							
							... 
							
							
							
							llvm-svn: 101051 
							
						 
						
							2010-04-12 18:14:18 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								1c0f8bb4ce 
								
							 
						 
						
							
							
								
								Have the CXXBaseOrMemberInitializer keep track of whether an initializer initializes a virtual base or not.  
							
							 
							
							... 
							
							
							
							llvm-svn: 101004 
							
						 
						
							2010-04-12 00:51:03 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								3383e2ad74 
								
							 
						 
						
							
							
								
								Fix another bug where we wouldn't generate secondary vtables for construction vtables in some cases.  
							
							 
							
							... 
							
							
							
							llvm-svn: 100998 
							
						 
						
							2010-04-11 22:20:36 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								d78b224e91 
								
							 
						 
						
							
							
								
								More renames.  
							
							 
							
							... 
							
							
							
							llvm-svn: 100991 
							
						 
						
							2010-04-11 22:07:06 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								b41c633a34 
								
							 
						 
						
							
							
								
								Rename a function parameter.  
							
							 
							
							... 
							
							
							
							llvm-svn: 100990 
							
						 
						
							2010-04-11 22:03:57 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								de0338abac 
								
							 
						 
						
							
							
								
								Clarify an assertion.  
							
							 
							
							... 
							
							
							
							llvm-svn: 100986 
							
						 
						
							2010-04-11 20:23:06 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								343a26b56d 
								
							 
						 
						
							
							
								
								Fix a bug where we were adding too many vcall offsets in some cases.  
							
							 
							
							... 
							
							
							
							llvm-svn: 100985 
							
						 
						
							2010-04-11 20:04:11 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								0b5522114e 
								
							 
						 
						
							
							
								
								Enable an assert and remove a now unnecessary assert.  
							
							 
							
							... 
							
							
							
							llvm-svn: 100953 
							
						 
						
							2010-04-10 21:50:08 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								88cf34f2b4 
								
							 
						 
						
							
							
								
								Fix a bug where we would add the same function twice in a vtable.  
							
							 
							
							... 
							
							
							
							llvm-svn: 100949 
							
						 
						
							2010-04-10 20:39:29 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								bd7b0a8d55 
								
							 
						 
						
							
							
								
								revert 100942, pending discussion.  
							
							 
							
							... 
							
							
							
							llvm-svn: 100946 
							
						 
						
							2010-04-10 19:33:39 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								be1b9cbc63 
								
							 
						 
						
							
							
								
								Rename VtableComponent and VtableBuilder.  
							
							 
							
							... 
							
							
							
							llvm-svn: 100945 
							
						 
						
							2010-04-10 19:13:06 +00:00  
						
					 
				
					
						
							
							
								 
								David Chisnall
							
						 
						
							 
							
							
							
							
								
							
							
								916fb83f39 
								
							 
						 
						
							
							
								
								Fix for PR6811.  
							
							 
							
							... 
							
							
							
							llvm-svn: 100942 
							
						 
						
							2010-04-10 19:06:38 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								bc3be65d2e 
								
							 
						 
						
							
							
								
								fix PR6805: llvm.objectsize changed to take an i1 instead of an i32.  
							
							 
							
							... 
							
							
							
							llvm-svn: 100938 
							
						 
						
							2010-04-10 18:34:14 +00:00  
						
					 
				
					
						
							
							
								 
								Benjamin Kramer
							
						 
						
							 
							
							
							
							
								
							
							
								1554e4a4bb 
								
							 
						 
						
							
							
								
								A bunch of string-related microoptimizations in Mangler.  
							
							 
							
							... 
							
							
							
							llvm-svn: 100928 
							
						 
						
							2010-04-10 16:03:31 +00:00  
						
					 
				
					
						
							
							
								 
								Benjamin Kramer
							
						 
						
							 
							
							
							
							
								
							
							
								2e8ca0b86d 
								
							 
						 
						
							
							
								
								Fix use after free. Incrementing an use_iterator after its user is erased is unsafe.  
							
							 
							
							... 
							
							
							
							llvm-svn: 100926 
							
						 
						
							2010-04-10 11:02:40 +00:00  
						
					 
				
					
						
							
							
								 
								John McCall
							
						 
						
							 
							
							
							
							
								
							
							
								e2f3524f83 
								
							 
						 
						
							
							
								
								Doug pointed out that we have a perfectly reasonable expression here to  
							
							 
							
							... 
							
							
							
							serve as a source of source locations for the can't-yet-mangle diagnostic.
llvm-svn: 100924 
							
						 
						
							2010-04-10 09:39:25 +00:00  
						
					 
				
					
						
							
							
								 
								Gabor Greif
							
						 
						
							 
							
							
							
							
								
							
							
								d394aec87d 
								
							 
						 
						
							
							
								
								rely even less on CallInst internals  
							
							 
							
							... 
							
							
							
							llvm-svn: 100919 
							
						 
						
							2010-04-10 03:45:50 +00:00  
						
					 
				
					
						
							
							
								 
								Gabor Greif
							
						 
						
							 
							
							
							
							
								
							
							
								d0ef1346f3 
								
							 
						 
						
							
							
								
								do not rely on CallInst interna, use CallSite to access arguments  
							
							 
							
							... 
							
							
							
							llvm-svn: 100918 
							
						 
						
							2010-04-10 02:56:12 +00:00  
						
					 
				
					
						
							
							
								 
								John McCall
							
						 
						
							 
							
							
							
							
								
							
							
								e8917e0fd2 
								
							 
						 
						
							
							
								
								Mangle some expressions with codegen implications but no mangling "overhead".  
							
							 
							
							... 
							
							
							
							llvm-svn: 100909 
							
						 
						
							2010-04-09 22:54:09 +00:00  
						
					 
				
					
						
							
							
								 
								John McCall
							
						 
						
							 
							
							
							
							
								
							
							
								6936c863b0 
								
							 
						 
						
							
							
								
								Provide an extremely unsatisfactory diagnostic (instead of crashing) when  
							
							 
							
							... 
							
							
							
							mangling an unknown expression kind.  Also conveniently tells the user what
kind of expression they should add to the mangler!
llvm-svn: 100907 
							
						 
						
							2010-04-09 22:26:14 +00:00  
						
					 
				
					
						
							
							
								 
								John McCall
							
						 
						
							 
							
							
							
							
								
							
							
								09277542f2 
								
							 
						 
						
							
							
								
								Provide manglings for bool and character literal expressions.  These are  
							
							 
							
							... 
							
							
							
							just integer-literal expressions with special case implementations in the AST.
Fixes rdar://problem/7825453.
llvm-svn: 100905 
							
						 
						
							2010-04-09 21:48:08 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								af2a317e05 
								
							 
						 
						
							
							
								
								Rename CGVtable files to CGVTables.  
							
							 
							
							... 
							
							
							
							llvm-svn: 100778 
							
						 
						
							2010-04-08 16:30:25 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								ae9e9a63bd 
								
							 
						 
						
							
							
								
								Clarify an assert.  
							
							 
							
							... 
							
							
							
							llvm-svn: 100776 
							
						 
						
							2010-04-08 16:18:36 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								bc6a434773 
								
							 
						 
						
							
							
								
								Unbreak the build  
							
							 
							
							... 
							
							
							
							llvm-svn: 100775 
							
						 
						
							2010-04-08 16:07:47 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								eadd3cace9 
								
							 
						 
						
							
							
								
								Eliminate excessive PCH deserialization caused by the search for  
							
							 
							
							... 
							
							
							
							__cxxabiv1::__fundamental_type_info in every translation
unit. Previously, we would perform name lookup for
__cxxabiv1::__fundamental_type_info at the end of IRGen for a each
translation unit, to determine whether it was present. If so, we we
produce type information for all of the fundamental types. However,
this name lookup causes PCH deserialization of a significant part of the
translation unit, which has a woeful impact on performance.
With this change, we now look at each record type after we've
generated its vtable to see if it is
__cxxabiv1::__fundamental_type_info. If so, we generate type info for
all of the fundamental types. This works because
__cxxabiv1::__fundamental_type_info should always have a key function
(typically the virtual destructor), that will be defined once in the
support library. The fundamental type information will end up there.
Fixes <rdar://problem/7840011>.
llvm-svn: 100772 
							
						 
						
							2010-04-08 15:52:03 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								c75c8bd757 
								
							 
						 
						
							
							
								
								IRgen: Move the bit-field access type into CGBitFieldInfo, and change bit-field LValues to just store the base address of object containing the bit-field.  
							
							 
							
							... 
							
							
							
							llvm-svn: 100745 
							
						 
						
							2010-04-08 02:59:45 +00:00  
						
					 
				
					
						
							
							
								 
								John McCall
							
						 
						
							 
							
							
							
							
								
							
							
								8586bfd85d 
								
							 
						 
						
							
							
								
								@llvm.sqrt isn't really close enough to C's sqrt to justify emitting calls  
							
							 
							
							... 
							
							
							
							to the intrinsic, even when math-errno is off.
Fixes rdar://problem/7828230 by falling back on the library function.
llvm-svn: 100613 
							
						 
						
							2010-04-07 08:20:20 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								fdb76ccfb4 
								
							 
						 
						
							
							
								
								a ridiculous amount of propagation through the backend later,  
							
							 
							
							... 
							
							
							
							have the code generate slap a srcloc metadata on inline asm nodes.
This allows us to diagnose invalid inline asms with such nice 
diagnostics as:
<inline asm>:1:2: error: unrecognized instruction
        abc incl    %eax
        ^
asm.c:2:12: note: generated from here
  __asm__ ("abc incl    %0" : "+r" (X));
           ^
2 diagnostics generated.
llvm-svn: 100608 
							
						 
						
							2010-04-07 05:46:54 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								c0e8a59ac9 
								
							 
						 
						
							
							
								
								fit in 80 cols  
							
							 
							
							... 
							
							
							
							llvm-svn: 100534 
							
						 
						
							2010-04-06 17:29:22 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								196ea449ed 
								
							 
						 
						
							
							
								
								IRgen: Move BitFieldIsSigned bit into CGBitFieldInfo.  
							
							 
							
							... 
							
							
							
							llvm-svn: 100513 
							
						 
						
							2010-04-06 01:07:44 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								d45491077a 
								
							 
						 
						
							
							
								
								Simplify.  
							
							 
							
							... 
							
							
							
							llvm-svn: 100512 
							
						 
						
							2010-04-06 01:07:41 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								60d81e8611 
								
							 
						 
						
							
							
								
								Simplify.  
							
							 
							
							... 
							
							
							
							llvm-svn: 100511 
							
						 
						
							2010-04-06 01:07:39 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								dc406b8e92 
								
							 
						 
						
							
							
								
								IRgen: Move BitField LValues to just hold a reference to the CGBitFieldInfo.  
							
							 
							
							... 
							
							
							
							- Unfortunately, this requires some horrible code in CGObjCMac which always
   allocats a CGBitFieldInfo because we don't currently build a proper layout
   for Objective-C classes. It needs to be cleaned up, but I don't want the
   bit-field cleanups to be blocked on that.
llvm-svn: 100474 
							
						 
						
							2010-04-05 21:36:35 +00:00  
						
					 
				
					
						
							
							
								 
								Devang Patel
							
						 
						
							 
							
							
							
							
								
							
							
								a2c048eaf8 
								
							 
						 
						
							
							
								
								Emit debug info for objc getters and setters.  
							
							 
							
							... 
							
							
							
							llvm-svn: 100462 
							
						 
						
							2010-04-05 21:09:15 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								cd3d5e76ce 
								
							 
						 
						
							
							
								
								IRgen: Lift BitFieldInfo to CGBitFieldInfo at namespace level.  
							
							 
							
							... 
							
							
							
							llvm-svn: 100433 
							
						 
						
							2010-04-05 16:20:44 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								b76c4cd5ec 
								
							 
						 
						
							
							
								
								Add a FIXME and reduce nesting.  
							
							 
							
							... 
							
							
							
							llvm-svn: 100432 
							
						 
						
							2010-04-05 16:20:33 +00:00  
						
					 
				
					
						
							
							
								 
								Mon P Wang
							
						 
						
							 
							
							
							
							
								
							
							
								cc2ab0cdc9 
								
							 
						 
						
							
							
								
								Reapply patch for adding support for address spaces and added a isVolatile field to memcpy, memmove, and memset.  
							
							 
							
							... 
							
							
							
							llvm-svn: 100305 
							
						 
						
							2010-04-04 03:10:52 +00:00  
						
					 
				
					
						
							
							
								 
								Rafael Espindola
							
						 
						
							 
							
							
							
							
								
							
							
								8e7ca8e0b1 
								
							 
						 
						
							
							
								
								Don't produce a vtable for a class if we have an explicit template instantiation declaration and no key function. We will produce the vtable at the explicit template instantiation.  
							
							 
							
							... 
							
							
							
							Fixes PR6748
llvm-svn: 100266 
							
						 
						
							2010-04-03 04:26:42 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								7e5aba433d 
								
							 
						 
						
							
							
								
								IRgen/NeXT: Remove my refactoring-enabling asserts, and add a FIXME.  
							
							 
							
							... 
							
							
							
							llvm-svn: 100237 
							
						 
						
							2010-04-02 22:29:40 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								8c7f981833 
								
							 
						 
						
							
							
								
								IRgen/Obj-C: Eliminate FindIvarInterface, now that ivar's are in the right DeclContexts (-2 FIXMEs). We still have an annoying linear scan + hidden dependency on how Obj-C layout is done.  
							
							 
							
							... 
							
							
							
							- This is also an algorithmic improvement in IRgen for Obj-C, although it probably doesn't matter in practice.
llvm-svn: 100228 
							
						 
						
							2010-04-02 21:14:02 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								18a584b56c 
								
							 
						 
						
							
							
								
								NewDebugLoc got renamed to DebugLoc.  
							
							 
							
							... 
							
							
							
							llvm-svn: 100219 
							
						 
						
							2010-04-02 20:21:43 +00:00  
						
					 
				
					
						
							
							
								 
								Mon P Wang
							
						 
						
							 
							
							
							
							
								
							
							
								f7f3bff646 
								
							 
						 
						
							
							
								
								Revert r100193 since it causes failures in objc in clang  
							
							 
							
							... 
							
							
							
							llvm-svn: 100200 
							
						 
						
							2010-04-02 18:43:42 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								45cf7e3d2a 
								
							 
						 
						
							
							
								
								Rework our handling of copy construction of temporaries, which was a  
							
							 
							
							... 
							
							
							
							poor (and wrong) approximation of the actual rules governing when to
build a copy and when it can be elided.
The correct implementation is actually simpler than the
approximation. When we only enumerate constructors as part of
initialization (e.g., for direct initialization or when we're copying
from a class type or one of its derived classes), we don't create a
copy. When we enumerate all conversion functions, we do create a
copy. Before, we created some extra copies and missed some
others. The new test copy-initialization.cpp shows a case where we
missed creating a (required, non-elidable) copy as part of a
user-defined conversion, which resulted in a miscompile. This commit
also fixes PR6757, where the missing copy made us reject well-formed
code in the ternary operator.
This commit also cleans up our handling of copy elision in the case
where we create an extra copy of a temporary object, which became
necessary now that we produce the right copies. The code that seeks to
find the temporary object being copied has moved into
Expr::getTemporaryObject(); it used to have two different
not-quite-the-same implementations, one in Sema and one in CodeGen.
Note that we still do not attempt to perform the named return value
optimization, so we miss copy elisions for return values and throw
expressions.
llvm-svn: 100196 
							
						 
						
							2010-04-02 18:24:57 +00:00  
						
					 
				
					
						
							
							
								 
								Mon P Wang
							
						 
						
							 
							
							
							
							
								
							
							
								4b82a88764 
								
							 
						 
						
							
							
								
								Reapply patch for adding support for address spaces and added a isVolatile field to memcpy, memmove, and memset.  
							
							 
							
							... 
							
							
							
							llvm-svn: 100193 
							
						 
						
							2010-04-02 18:04:30 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								031d4d40d0 
								
							 
						 
						
							
							
								
								CG/NeXT: Assert some invariants on an ivar's containing decl context that I am about to refactor based on, following some testing.  
							
							 
							
							... 
							
							
							
							llvm-svn: 100188 
							
						 
						
							2010-04-02 15:43:29 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								e675d0f924 
								
							 
						 
						
							
							
								
								adjust to IRBuilder change and use faster DebugLoc apis.  
							
							 
							
							... 
							
							
							
							llvm-svn: 100093 
							
						 
						
							2010-04-01 06:31:43 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								0208535fda 
								
							 
						 
						
							
							
								
								Extend DependentNameType with a keyword enum that specifies whether  
							
							 
							
							... 
							
							
							
							this was parsed as a typename-specifier, elaborated-type-specifier
(including the kind), or just a dependent qualified type name.
llvm-svn: 100039 
							
						 
						
							2010-03-31 20:19:30 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								c1d2d8a014 
								
							 
						 
						
							
							
								
								Rename TypenameType to DependentNameType in anticipation of some  
							
							 
							
							... 
							
							
							
							refactoring work in this area.
llvm-svn: 100019 
							
						 
						
							2010-03-31 17:34:00 +00:00  
						
					 
				
					
						
							
							
								 
								Benjamin Kramer
							
						 
						
							 
							
							
							
							
								
							
							
								9e2e1c9024 
								
							 
						 
						
							
							
								
								Minor include pruning.  
							
							 
							
							... 
							
							
							
							llvm-svn: 100007 
							
						 
						
							2010-03-31 15:04:05 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								be49c03ff4 
								
							 
						 
						
							
							
								
								use the new optimized debug info metadata accessors.  In  
							
							 
							
							... 
							
							
							
							addition to the inherent win, this eliminates the pointless
cost of going through the name -> mdkind stringmap that we
were paying.
llvm-svn: 99983 
							
						 
						
							2010-03-31 03:36:01 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								034299ef25 
								
							 
						 
						
							
							
								
								IRGen: Move the auxiliary data structures tracking AST -> LLVM mappings out of CodeGenTypes, to per-record CGRecordLayout structures.  
							
							 
							
							... 
							
							
							
							- I did a cursory check that this was perf neutral, FWIW.
llvm-svn: 99978 
							
						 
						
							2010-03-31 01:09:11 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								e75a64f2d3 
								
							 
						 
						
							
							
								
								CGRecordLayoutBuilder: Switch unions to use same mechanism for tracking field and bit-field info as structs.  
							
							 
							
							... 
							
							
							
							- Anders, please check.
llvm-svn: 99977 
							
						 
						
							2010-03-31 00:55:13 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								d7f18dd750 
								
							 
						 
						
							
							
								
								Drastically simplify the computation of linkage for typeinfo by using  
							
							 
							
							... 
							
							
							
							the existing (and already well-tested) linkage computation for types,
with minor tweaks for dynamic classes and (pointers to) incomplete
types. Fixes PR6597.
llvm-svn: 99968 
							
						 
						
							2010-03-31 00:15:35 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								23ee4b7710 
								
							 
						 
						
							
							
								
								IRGen: Hide CGRecordLayoutBuilder class, because I can.  
							
							 
							
							... 
							
							
							
							llvm-svn: 99967 
							
						 
						
							2010-03-31 00:11:27 +00:00  
						
					 
				
					
						
							
							
								 
								John McCall
							
						 
						
							 
							
							
							
							
								
							
							
								d9c7c6568e 
								
							 
						 
						
							
							
								
								Introduce a new kind of derived-to-base cast which bypasses the need for  
							
							 
							
							... 
							
							
							
							null checks, and make sure we elide null checks when accessing base class
members.
llvm-svn: 99963 
							
						 
						
							2010-03-30 23:58:03 +00:00  
						
					 
				
					
						
							
							
								 
								Bob Wilson
							
						 
						
							 
							
							
							
							
								
							
							
								adb58e32cc 
								
							 
						 
						
							
							
								
								Revert Mon Ping's 99930 due to broken llvm-gcc buildbots.  
							
							 
							
							... 
							
							
							
							llvm-svn: 99949 
							
						 
						
							2010-03-30 22:28:46 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								6915cbe7a2 
								
							 
						 
						
							
							
								
								IRGen: Narrow getCGRecordLayout type.  
							
							 
							
							... 
							
							
							
							llvm-svn: 99946 
							
						 
						
							2010-03-30 22:26:12 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								072d0bb247 
								
							 
						 
						
							
							
								
								IRgen: Move CGRecordLayout to its own happy little file.  
							
							 
							
							... 
							
							
							
							llvm-svn: 99945 
							
						 
						
							2010-03-30 22:26:10 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								f4ffa0dabf 
								
							 
						 
						
							
							
								
								Minor formatting/FIXME cleanups.  
							
							 
							
							... 
							
							
							
							llvm-svn: 99944 
							
						 
						
							2010-03-30 22:26:07 +00:00  
						
					 
				
					
						
							
							
								 
								Rafael Espindola
							
						 
						
							 
							
							
							
							
								
							
							
								49b85ab6e6 
								
							 
						 
						
							
							
								
								Remember the regparm attribute in FunctionType::ExtInfo.  
							
							 
							
							... 
							
							
							
							Fixes PR3782.
llvm-svn: 99940 
							
						 
						
							2010-03-30 22:15:11 +00:00  
						
					 
				
					
						
							
							
								 
								Mon P Wang
							
						 
						
							 
							
							
							
							
								
							
							
								231e99743a 
								
							 
						 
						
							
							
								
								Added support for address spaces and added a isVolatile field to memcpy, memmove, and memset  
							
							 
							
							... 
							
							
							
							llvm-svn: 99930 
							
						 
						
							2010-03-30 21:02:45 +00:00  
						
					 
				
					
						
							
							
								 
								Rafael Espindola
							
						 
						
							 
							
							
							
							
								
							
							
								c50c27cca8 
								
							 
						 
						
							
							
								
								the big refactoring bits of PR3782.  
							
							 
							
							... 
							
							
							
							This introduces FunctionType::ExtInfo to hold the calling convention and the
noreturn attribute. The next patch will extend it to include the regparm
attribute and fix the bug.
llvm-svn: 99920 
							
						 
						
							2010-03-30 20:24:48 +00:00  
						
					 
				
					
						
							
							
								 
								Rafael Espindola
							
						 
						
							 
							
							
							
							
								
							
							
								ff6a1fc1f3 
								
							 
						 
						
							
							
								
								Don't produce a vtable if we are just instantiating a method and the  
							
							 
							
							... 
							
							
							
							class has no key function.
Fix PR6738.
llvm-svn: 99900 
							
						 
						
							2010-03-30 18:07:27 +00:00  
						
					 
				
					
						
							
							
								 
								Benjamin Kramer
							
						 
						
							 
							
							
							
							
								
							
							
								9e649c3cfe 
								
							 
						 
						
							
							
								
								Replace some constant-sized SmallVectors.  
							
							 
							
							... 
							
							
							
							llvm-svn: 99884 
							
						 
						
							2010-03-30 11:36:44 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								f141dd1b95 
								
							 
						 
						
							
							
								
								Remove the old vtable layout code.  
							
							 
							
							... 
							
							
							
							llvm-svn: 99869 
							
						 
						
							2010-03-30 03:43:47 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								a086edc0e6 
								
							 
						 
						
							
							
								
								Remove UseNewVTableCode checks.  
							
							 
							
							... 
							
							
							
							llvm-svn: 99868 
							
						 
						
							2010-03-30 03:35:35 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								9d08fc1cd2 
								
							 
						 
						
							
							
								
								Use the new function in EmitClassAggrMemberwiseCopy, fixing the same assert as seen in PR6628 but for arrays this time.  
							
							 
							
							... 
							
							
							
							llvm-svn: 99867 
							
						 
						
							2010-03-30 03:30:08 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								093bdff0c5 
								
							 
						 
						
							
							
								
								Factor emitting a call to a copy constructor out into a separate function.  
							
							 
							
							... 
							
							
							
							llvm-svn: 99866 
							
						 
						
							2010-03-30 03:27:09 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								b9fd57f198 
								
							 
						 
						
							
							
								
								Introduce a CXXTemporariesCleanupScope RAII object and use it to cleanup the temporaries code.  
							
							 
							
							... 
							
							
							
							llvm-svn: 99865 
							
						 
						
							2010-03-30 03:14:41 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								10834b8d56 
								
							 
						 
						
							
							
								
								Handle default arguments when calling copy constructors for bases or members when synthesizing a copy constructor. Fixes PR6628.  
							
							 
							
							... 
							
							
							
							llvm-svn: 99864 
							
						 
						
							2010-03-30 02:57:48 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								85e64359df 
								
							 
						 
						
							
							
								
								Flip the switch and use the new vtable layout code for everything. I've verified that this passes a self-host but I'll let the bots self host as well before removing the now dead code.  
							
							 
							
							... 
							
							
							
							llvm-svn: 99861 
							
						 
						
							2010-03-30 02:21:54 +00:00  
						
					 
				
					
						
							
							
								 
								Ted Kremenek
							
						 
						
							 
							
							
							
							
								
							
							
								dbb8cd1d34 
								
							 
						 
						
							
							
								
								Cache results computed by CGDebugInfo::getOrCreateFile() in a DenseMap.  
							
							 
							
							... 
							
							
							
							This reduces '-c -g' time on one file in 403.gcc by 12%.
llvm-svn: 99857 
							
						 
						
							2010-03-30 00:27:51 +00:00  
						
					 
				
					
						
							
							
								 
								Ted Kremenek
							
						 
						
							 
							
							
							
							
								
							
							
								ac031880af 
								
							 
						 
						
							
							
								
								Remove FIXME comment.  
							
							 
							
							... 
							
							
							
							llvm-svn: 99828 
							
						 
						
							2010-03-29 19:10:41 +00:00  
						
					 
				
					
						
							
							
								 
								Ted Kremenek
							
						 
						
							 
							
							
							
							
								
							
							
								23c29f0cbe 
								
							 
						 
						
							
							
								
								Change 'TypeCache' from being an std::map to a llvm::DenseMap.  This reduces codegen time  
							
							 
							
							... 
							
							
							
							on one .i file from 403.gcc by 0.5%.
llvm-svn: 99823 
							
						 
						
							2010-03-29 18:29:57 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								5902e7bb22 
								
							 
						 
						
							
							
								
								emit signed integer subtractions as 'sub nsw', patch by  
							
							 
							
							... 
							
							
							
							Anton Yartsev!
llvm-svn: 99817 
							
						 
						
							2010-03-29 17:28:16 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								eba1a60ef0 
								
							 
						 
						
							
							
								
								Another vtable layout fix, making us match gcc better.  
							
							 
							
							... 
							
							
							
							llvm-svn: 99812 
							
						 
						
							2010-03-29 15:08:41 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								cb6207f723 
								
							 
						 
						
							
							
								
								Handle pure virtual member functions.  
							
							 
							
							... 
							
							
							
							llvm-svn: 99807 
							
						 
						
							2010-03-29 05:40:50 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								a627ac7ee6 
								
							 
						 
						
							
							
								
								More vtable work - it's not possible to use the new vtable code for everything by setting a flag inside CGVtable.cpp. My plan is to run some tests and bootstrap and once that's done flip the bit.  
							
							 
							
							... 
							
							
							
							llvm-svn: 99804 
							
						 
						
							2010-03-29 03:38:52 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								800ded68b5 
								
							 
						 
						
							
							
								
								Only add thunks for the most derived class. This fixes some link errors I was seeing in files generated by the vtable tester utility.  
							
							 
							
							... 
							
							
							
							llvm-svn: 99801 
							
						 
						
							2010-03-29 02:53:58 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								383f4cc8b9 
								
							 
						 
						
							
							
								
								Flip the switch to always get vtables from the VTT when necessary, I've verified that clang bootstraps with this.  
							
							 
							
							... 
							
							
							
							llvm-svn: 99800 
							
						 
						
							2010-03-29 02:38:51 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								2d016af623 
								
							 
						 
						
							
							
								
								Use the newly added function in the VTT builder.  
							
							 
							
							... 
							
							
							
							llvm-svn: 99799 
							
						 
						
							2010-03-29 02:14:35 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								f6f24c609b 
								
							 
						 
						
							
							
								
								Cleanup, no functionality change.  
							
							 
							
							... 
							
							
							
							llvm-svn: 99798 
							
						 
						
							2010-03-29 02:08:26 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								9a97e2ef95 
								
							 
						 
						
							
							
								
								Add the thunks needed by this vtable.  
							
							 
							
							... 
							
							
							
							llvm-svn: 99793 
							
						 
						
							2010-03-29 01:38:05 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								848d86e5c4 
								
							 
						 
						
							
							
								
								Make sure to sort the vtable thunks by their vtable index :) With this we now pass the test from  http://www.codesourcery.com/public/cxx-abi/abi-examples.html#vtable-ctor  successfully.  
							
							 
							
							... 
							
							
							
							llvm-svn: 99792 
							
						 
						
							2010-03-29 01:28:05 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								948d3f4ec6 
								
							 
						 
						
							
							
								
								Fix another thinko, so that flags don't depend on previous bases.  
							
							 
							
							... 
							
							
							
							llvm-svn: 99791 
							
						 
						
							2010-03-29 01:16:41 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								74d7dfcf8e 
								
							 
						 
						
							
							
								
								When generating base ctors/dtors, we need to lookup virtual bases using the vtable.  
							
							 
							
							... 
							
							
							
							llvm-svn: 99790 
							
						 
						
							2010-03-29 01:14:25 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								27d86bddfe 
								
							 
						 
						
							
							
								
								Fix thinko.  
							
							 
							
							... 
							
							
							
							llvm-svn: 99788 
							
						 
						
							2010-03-29 01:12:13 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								5889027ccc 
								
							 
						 
						
							
							
								
								Use construction vtables when needed. This is currently guarded by -fdump-vtable-layouts since it doesn't work 100% yet :)  
							
							 
							
							... 
							
							
							
							llvm-svn: 99787 
							
						 
						
							2010-03-29 01:08:49 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								8baeaf0a26 
								
							 
						 
						
							
							
								
								Two bug fixes, we weren't updating the thunk index when creating the vtable initializer and we weren't storing the secondary virtual pointer indices.  
							
							 
							
							... 
							
							
							
							llvm-svn: 99786 
							
						 
						
							2010-03-29 01:04:16 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								d589593c93 
								
							 
						 
						
							
							
								
								Reapply r99775 with a fix for a silly bug - we were setting the vtable pointer for all bases, even those without a vtable pointer :)  
							
							 
							
							... 
							
							
							
							llvm-svn: 99777 
							
						 
						
							2010-03-28 21:07:49 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								fcc9f91287 
								
							 
						 
						
							
							
								
								Looks like I broke self-host again :(.  
							
							 
							
							... 
							
							
							
							llvm-svn: 99776 
							
						 
						
							2010-03-28 20:55:21 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								74eab715ae 
								
							 
						 
						
							
							
								
								More improvements to setting the vtable pointer. We now no longer set the vtable pointer for non-virtual primary bases. We also do a pre-order traversal of the class hierarchy; this is necessary in order to get the right vbase offset offsets in base ctors/dtors.  
							
							 
							
							... 
							
							
							
							llvm-svn: 99775 
							
						 
						
							2010-03-28 20:34:31 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								e87fae9afa 
								
							 
						 
						
							
							
								
								Factor vtable pointer setting code out into a separate function.  
							
							 
							
							... 
							
							
							
							llvm-svn: 99773 
							
						 
						
							2010-03-28 19:40:00 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								174376629a 
								
							 
						 
						
							
							
								
								Give thunks the same linkage as their original methods.  
							
							 
							
							... 
							
							
							
							llvm-svn: 99729 
							
						 
						
							2010-03-27 20:50:27 +00:00  
						
					 
				
					
						
							
							
								 
								Rafael Espindola
							
						 
						
							 
							
							
							
							
								
							
							
								adcc1d18e2 
								
							 
						 
						
							
							
								
								When given the magic class __cxxabiv1::__fundamental_type_info, produce  
							
							 
							
							... 
							
							
							
							the typeinfo for the fundamental types.
Fixes PR6685.
llvm-svn: 99701 
							
						 
						
							2010-03-27 02:52:14 +00:00  
						
					 
				
					
						
							
							
								 
								John McCall
							
						 
						
							 
							
							
							
							
								
							
							
								39ec71f2e9 
								
							 
						 
						
							
							
								
								When mapping restrict to noalias, look for 'restrict' on the parameter variable  
							
							 
							
							... 
							
							
							
							instead of the canonical parameter type (which has correctly dropped all such
direct qualifiers).  Fixes PR6695.
llvm-svn: 99688 
							
						 
						
							2010-03-27 00:47:27 +00:00  
						
					 
				
					
						
							
							
								 
								Nick Lewycky
							
						 
						
							 
							
							
							
							
								
							
							
								3cfe6af8b5 
								
							 
						 
						
							
							
								
								Implement new mangling for vectors.  
							
							 
							
							... 
							
							
							
							llvm-svn: 99616 
							
						 
						
							2010-03-26 07:18:04 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								aaf8acfea1 
								
							 
						 
						
							
							
								
								Revert r99612 and see if it fixes self-host.  
							
							 
							
							... 
							
							
							
							llvm-svn: 99614 
							
						 
						
							2010-03-26 06:35:42 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								6fffc64dd2 
								
							 
						 
						
							
							
								
								Don't initialize virtual pointers for primary bases, they've already been initialized.  
							
							 
							
							... 
							
							
							
							llvm-svn: 99612 
							
						 
						
							2010-03-26 05:53:12 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								1f9348c1fc 
								
							 
						 
						
							
							
								
								Simplify InitializeVtablePtrs in preparation of making it work with construction vtables.  
							
							 
							
							... 
							
							
							
							llvm-svn: 99609 
							
						 
						
							2010-03-26 04:39:42 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								f1a994ce33 
								
							 
						 
						
							
							
								
								Add and implement CodeGenVTables::getSecondaryVirtualPointerIndex (not used yet).  
							
							 
							
							... 
							
							
							
							llvm-svn: 99608 
							
						 
						
							2010-03-26 04:23:58 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								92d95f2f7b 
								
							 
						 
						
							
							
								
								Use the new vtable layout code for construction vtables.  
							
							 
							
							... 
							
							
							
							llvm-svn: 99606 
							
						 
						
							2010-03-26 04:13:46 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								5670d96524 
								
							 
						 
						
							
							
								
								More cleanup.  
							
							 
							
							... 
							
							
							
							llvm-svn: 99605 
							
						 
						
							2010-03-26 04:10:39 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								a208b3997d 
								
							 
						 
						
							
							
								
								Way more VTT builder cleanup.  
							
							 
							
							... 
							
							
							
							llvm-svn: 99604 
							
						 
						
							2010-03-26 03:56:54 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								45bd753b4a 
								
							 
						 
						
							
							
								
								More VTT builder cleanup.  
							
							 
							
							... 
							
							
							
							llvm-svn: 99588 
							
						 
						
							2010-03-26 00:58:21 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								c1b4747d5a 
								
							 
						 
						
							
							
								
								More VTT cleanup.  
							
							 
							
							... 
							
							
							
							llvm-svn: 99586 
							
						 
						
							2010-03-26 00:50:17 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								e67698bd73 
								
							 
						 
						
							
							
								
								Start cleaning up the VTT builder to make it work more like the VTable builder.  
							
							 
							
							... 
							
							
							
							llvm-svn: 99581 
							
						 
						
							2010-03-26 00:35:45 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								382a96550b 
								
							 
						 
						
							
							
								
								Remove some VTT builder arguments that were always zero.  
							
							 
							
							... 
							
							
							
							llvm-svn: 99576 
							
						 
						
							2010-03-26 00:11:51 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								f9c4585c80 
								
							 
						 
						
							
							
								
								Fix a code gen. bug involving generation of getter method  
							
							 
							
							... 
							
							
							
							from properties of _Complex type. (radar 7351147).
llvm-svn: 99558 
							
						 
						
							2010-03-25 21:56:43 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								151b062fee 
								
							 
						 
						
							
							
								
								Don't add address points for virtual primary bases that aren't primary bases in the complete class.  
							
							 
							
							... 
							
							
							
							llvm-svn: 99555 
							
						 
						
							2010-03-25 21:45:14 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								3f540c0d7d 
								
							 
						 
						
							
							
								
								Remove support for nand atomic builtins. They are inconsistently implemented in  
							
							 
							
							... 
							
							
							
							gcc, and the common expectation seems to be that they are unused. If and when
someone cares we can add them back with well documented demantics.
llvm-svn: 99522 
							
						 
						
							2010-03-25 17:13:09 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								a5736bde2e 
								
							 
						 
						
							
							
								
								Use the new vtable layout code for construction vtables.  
							
							 
							
							... 
							
							
							
							llvm-svn: 99516 
							
						 
						
							2010-03-25 16:49:53 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								a4147148ff 
								
							 
						 
						
							
							
								
								When -fdump-vtable-layouts is specified, construction vtable initializers will be generated using the new vtable layout code. (The code is still not completely in place but this is a huge step forward).  
							
							 
							
							... 
							
							
							
							llvm-svn: 99508 
							
						 
						
							2010-03-25 15:26:28 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								d03325c54f 
								
							 
						 
						
							
							
								
								More address point map shuffling.  
							
							 
							
							... 
							
							
							
							llvm-svn: 99462 
							
						 
						
							2010-03-25 00:51:13 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								0534b0201e 
								
							 
						 
						
							
							
								
								Shuffle some code around; this will make it easier to use the new layout code for address points.  
							
							 
							
							... 
							
							
							
							llvm-svn: 99461 
							
						 
						
							2010-03-25 00:35:49 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								02dde146e0 
								
							 
						 
						
							
							
								
								When returning from a function that has a reference return type, use  
							
							 
							
							... 
							
							
							
							EmitReferenceBindingToExpr() rather than assuming we have an
lvalue. This is just the lowest hanging fruit for PR6024, which still
requires a bit of work.
llvm-svn: 99447 
							
						 
						
							2010-03-24 23:14:04 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								2538674a98 
								
							 
						 
						
							
							
								
								Change two class forward declarations to struct forward declarations, silencing a Clang warning  
							
							 
							
							... 
							
							
							
							llvm-svn: 99405 
							
						 
						
							2010-03-24 16:59:08 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								47b4629b3b 
								
							 
						 
						
							
							
								
								Code gen for multi-dimensional dynamic allocations.  
							
							 
							
							... 
							
							
							
							Fixes PR6641.
llvm-svn: 99404 
							
						 
						
							2010-03-24 16:57:01 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								e90954de64 
								
							 
						 
						
							
							
								
								More vtable improvements. We now compute and keep track of all vtable related information which avoids computing the same vtable layout over and over.  
							
							 
							
							... 
							
							
							
							llvm-svn: 99403 
							
						 
						
							2010-03-24 16:42:11 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								67fbf9853f 
								
							 
						 
						
							
							
								
								Use getNamedGlobal instead of getGlobalVariable. (Fixes self-host).  
							
							 
							
							... 
							
							
							
							llvm-svn: 99385 
							
						 
						
							2010-03-24 05:32:05 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								b35ea55e2e 
								
							 
						 
						
							
							
								
								More vtable work; preparations for moving over to the new vtable layout code (finally).  
							
							 
							
							... 
							
							
							
							llvm-svn: 99381 
							
						 
						
							2010-03-24 03:57:14 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								95e0223baf 
								
							 
						 
						
							
							
								
								Remove old thunks code.  
							
							 
							
							... 
							
							
							
							llvm-svn: 99374 
							
						 
						
							2010-03-24 00:57:54 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								68fdb871dc 
								
							 
						 
						
							
							
								
								Flip the switch and use the new vtable layout code for thunks by default. Add a thunks.cpp test.  
							
							 
							
							... 
							
							
							
							llvm-svn: 99367 
							
						 
						
							2010-03-24 00:41:37 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								bad991dbfd 
								
							 
						 
						
							
							
								
								Add CodeGenFunction::GenerateThunk and implement it.  
							
							 
							
							... 
							
							
							
							llvm-svn: 99365 
							
						 
						
							2010-03-24 00:39:18 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								4a3cdf5ac7 
								
							 
						 
						
							
							
								
								Minor cleanup.  
							
							 
							
							... 
							
							
							
							llvm-svn: 99364 
							
						 
						
							2010-03-24 00:35:44 +00:00  
						
					 
				
					
						
							
							
								 
								Rafael Espindola
							
						 
						
							 
							
							
							
							
								
							
							
								fa1708fdea 
								
							 
						 
						
							
							
								
								revert 99311. Looks like it broke darwin bootstrap.  
							
							 
							
							... 
							
							
							
							llvm-svn: 99317 
							
						 
						
							2010-03-23 19:55:22 +00:00  
						
					 
				
					
						
							
							
								 
								Rafael Espindola
							
						 
						
							 
							
							
							
							
								
							
							
								4d3745ade6 
								
							 
						 
						
							
							
								
								Avoid producing implicit methods when we have a explicit template instantiation  
							
							 
							
							... 
							
							
							
							declaration.
llvm-svn: 99311 
							
						 
						
							2010-03-23 18:56:16 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								6c67b90752 
								
							 
						 
						
							
							
								
								Code gen for compound assignment of complex  
							
							 
							
							... 
							
							
							
							types using property syntax to access setter/getters.
(also radar 7351147).
llvm-svn: 99307 
							
						 
						
							2010-03-23 18:43:00 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								55e89f877c 
								
							 
						 
						
							
							
								
								More work on thunks - don't assert if there's a variable with the same name as the thunk already.  
							
							 
							
							... 
							
							
							
							llvm-svn: 99303 
							
						 
						
							2010-03-23 18:18:41 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								3131496622 
								
							 
						 
						
							
							
								
								Patch to implement code gen. use of compound assignent on  
							
							 
							
							... 
							
							
							
							properties of complex type. Radar 7351147.
llvm-svn: 99299 
							
						 
						
							2010-03-23 18:08:50 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								cd836f0b5f 
								
							 
						 
						
							
							
								
								More thunks scaffolding.  
							
							 
							
							... 
							
							
							
							llvm-svn: 99294 
							
						 
						
							2010-03-23 17:17:29 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								5c5abad5d9 
								
							 
						 
						
							
							
								
								More work on thunks.  
							
							 
							
							... 
							
							
							
							llvm-svn: 99287 
							
						 
						
							2010-03-23 16:36:50 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								274fc82289 
								
							 
						 
						
							
							
								
								Move ThunkInfo as well.  
							
							 
							
							... 
							
							
							
							llvm-svn: 99280 
							
						 
						
							2010-03-23 15:17:13 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								67fd3a50dc 
								
							 
						 
						
							
							
								
								Move ReturnAdjustment and ThisAdjustment out into CGVtable.h  
							
							 
							
							... 
							
							
							
							llvm-svn: 99279 
							
						 
						
							2010-03-23 15:13:06 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								995891667f 
								
							 
						 
						
							
							
								
								Use the canonical destructor, which fixes the self-host build. Thanks to Eli for noticing.  
							
							 
							
							... 
							
							
							
							llvm-svn: 99260 
							
						 
						
							2010-03-23 05:15:24 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								917229cf75 
								
							 
						 
						
							
							
								
								Baby steps towards making thunks be emitted from the new vtable layout code.  
							
							 
							
							... 
							
							
							
							llvm-svn: 99254 
							
						 
						
							2010-03-23 04:59:02 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								7cea12ff9b 
								
							 
						 
						
							
							
								
								Some renames.  
							
							 
							
							... 
							
							
							
							llvm-svn: 99253 
							
						 
						
							2010-03-23 04:44:10 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								af82f63b47 
								
							 
						 
						
							
							
								
								Always emit associated thunks when emitting the function itself. Remove getVtableAddressPoint, it's not used.  
							
							 
							
							... 
							
							
							
							llvm-svn: 99252 
							
						 
						
							2010-03-23 04:31:31 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								8841024a7c 
								
							 
						 
						
							
							
								
								Rename MaybeEmitVtable to EmitVTableRelatedData in preparation for making it emit thunks as well.  
							
							 
							
							... 
							
							
							
							llvm-svn: 99251 
							
						 
						
							2010-03-23 04:15:00 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								a864caff8c 
								
							 
						 
						
							
							
								
								Rename CGVtableInfo to CodeGenVTables in preparation of adding another VTableInfo class.  
							
							 
							
							... 
							
							
							
							llvm-svn: 99250 
							
						 
						
							2010-03-23 04:11:45 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								65f7a3f801 
								
							 
						 
						
							
							
								
								Comment the reasons for the strange little dance we do with the main file name for debug information  
							
							 
							
							... 
							
							
							
							llvm-svn: 99215 
							
						 
						
							2010-03-22 21:28:29 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								290c6ed7c7 
								
							 
						 
						
							
							
								
								More work on thunks; almost there now.  
							
							 
							
							... 
							
							
							
							llvm-svn: 99199 
							
						 
						
							2010-03-22 20:06:40 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								7eb99a607d 
								
							 
						 
						
							
							
								
								Add less than operators to ThisAdjustment, ReturnAdjustment and ThunkInfo. Sort the thunks before dumping them.  
							
							 
							
							... 
							
							
							
							llvm-svn: 99184 
							
						 
						
							2010-03-22 16:30:44 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								53a47bf901 
								
							 
						 
						
							
							
								
								Improve dumping of thunks.  
							
							 
							
							... 
							
							
							
							llvm-svn: 99181 
							
						 
						
							2010-03-22 16:10:59 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								64decd3586 
								
							 
						 
						
							
							
								
								We want to add all thunks, not just 'this' adjustment thunks.  
							
							 
							
							... 
							
							
							
							llvm-svn: 99177 
							
						 
						
							2010-03-22 15:47:01 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								4b2411e9d2 
								
							 
						 
						
							
							
								
								AddThunk should take a const reference.  
							
							 
							
							... 
							
							
							
							llvm-svn: 99140 
							
						 
						
							2010-03-21 20:27:14 +00:00  
						
					 
				
					
						
							
							
								 
								Rafael Espindola
							
						 
						
							 
							
							
							
							
								
							
							
								46b7987f85 
								
							 
						 
						
							
							
								
								Fix PR6648 by not creating a temporary with the type of a  
							
							 
							
							... 
							
							
							
							CXXExprWithTemporaries.
Not emitting the expression as an aggregate might be the right thing to do,
but is orthogonal. Emitting it as an scalar expression will still try to
create a temporary for the incomplete type of the CXXExprWithTemporaries and
fail.
llvm-svn: 99134 
							
						 
						
							2010-03-21 17:11:05 +00:00  
						
					 
				
					
						
							
							
								 
								David Chisnall
							
						 
						
							 
							
							
							
							
								
							
							
								12ae54d42f 
								
							 
						 
						
							
							
								
								Fixed synthesizing properties declared in properties (GNU runtime).  
							
							 
							
							... 
							
							
							
							llvm-svn: 99077 
							
						 
						
							2010-03-20 19:53:29 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								4ff562d557 
								
							 
						 
						
							
							
								
								IRgen: Wrap atomic intrinsics with memory barriers, to ensure we honor the semantics.  
							
							 
							
							... 
							
							
							
							- This should be conservatively correct, we eventually should have target hooks for platforms that are less strict.
llvm-svn: 99050 
							
						 
						
							2010-03-20 07:04:11 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								fe06df4bf3 
								
							 
						 
						
							
							
								
								C++: Add support for -fno-use-cxa-atexit.  
							
							 
							
							... 
							
							
							
							- So much typing, so little gain...
Also, rename the __cxx_global_initialization function just to match llvm-gcc.
llvm-svn: 99039 
							
						 
						
							2010-03-20 04:15:41 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								7572284f4f 
								
							 
						 
						
							
							
								
								IRgen: Inline GenerateCXXGlobal[VarDecl]InitFunc into sole caller.  
							
							 
							
							... 
							
							
							
							llvm-svn: 99038 
							
						 
						
							2010-03-20 04:15:29 +00:00  
						
					 
				
					
						
							
							
								 
								John McCall
							
						 
						
							 
							
							
							
							
								
							
							
								7ec5043c2c 
								
							 
						 
						
							
							
								
								Change CodeGenModule to rely on the Module's symbol table instead of  
							
							 
							
							... 
							
							
							
							shadowing it in the GlobalDeclMap.  Eliminates the string-uniquing
requirement for mangled names, which should help C++ codegen times a little.
Forces us to do string lookups instead of pointer lookups, which might hurt
codegen times a little across the board.  We'll see how it plays out.
Removing the string-uniquing requirement implicitly fixes any bugs like
PR6635 which arose from the fact that we had multiple uniquing tables for
different kinds of identifiers.
llvm-svn: 99012 
							
						 
						
							2010-03-19 23:29:14 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								fc7a4813ab 
								
							 
						 
						
							
							
								
								Try to improve computation of the main file name for debug  
							
							 
							
							... 
							
							
							
							information, to address recent gdb failures.
llvm-svn: 98959 
							
						 
						
							2010-03-19 14:49:09 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								c6b5a3df1e 
								
							 
						 
						
							
							
								
								For debug information, get the main file name from the source manager  
							
							 
							
							... 
							
							
							
							rather than from the -main-file-name flag, since the source manager
has proper path information. Fixes <rdar://problem/7769538>.
llvm-svn: 98898 
							
						 
						
							2010-03-18 23:46:43 +00:00  
						
					 
				
					
						
							
							
								 
								Benjamin Kramer
							
						 
						
							 
							
							
							
							
								
							
							
								966e934b34 
								
							 
						 
						
							
							
								
								Replace some SmallVectors with arrays.  
							
							 
							
							... 
							
							
							
							llvm-svn: 98833 
							
						 
						
							2010-03-18 16:59:57 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								18c582d9c8 
								
							 
						 
						
							
							
								
								When dumping vtables, also dump the thunks.  
							
							 
							
							... 
							
							
							
							llvm-svn: 98799 
							
						 
						
							2010-03-18 02:44:19 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								56446146fd 
								
							 
						 
						
							
							
								
								More work on thunks.  
							
							 
							
							... 
							
							
							
							llvm-svn: 98765 
							
						 
						
							2010-03-17 20:06:32 +00:00  
						
					 
				
					
						
							
							
								 
								Rafael Espindola
							
						 
						
							 
							
							
							
							
								
							
							
								cd7eef900f 
								
							 
						 
						
							
							
								
								Correctly mangle dependent TypenameType.  
							
							 
							
							... 
							
							
							
							Fixes PR6625.
llvm-svn: 98707 
							
						 
						
							2010-03-17 04:28:11 +00:00  
						
					 
				
					
						
							
							
								 
								David Chisnall
							
						 
						
							 
							
							
							
							
								
							
							
								2bfc50bf68 
								
							 
						 
						
							
							
								
								Fixed copy-and-paste error causing categories to contain the protocols declared on the class, not the protocols declared on the category.  
							
							 
							
							... 
							
							
							
							llvm-svn: 98455 
							
						 
						
							2010-03-13 22:20:45 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								b14d123774 
								
							 
						 
						
							
							
								
								Give explicit template instantiations weak ODR linkage. Former  
							
							 
							
							... 
							
							
							
							iterations of this patch gave explicit template instantiation
link-once ODR linkage, which permitted the back end to eliminate
unused symbols. Weak ODR linkage still requires the symbols to be
generated.
llvm-svn: 98441 
							
						 
						
							2010-03-13 18:23:07 +00:00  
						
					 
				
					
						
							
							
								 
								Benjamin Kramer
							
						 
						
							 
							
							
							
							
								
							
							
								69b3c43391 
								
							 
						 
						
							
							
								
								Use raw_ostream instead of sprintf.  
							
							 
							
							... 
							
							
							
							llvm-svn: 98438 
							
						 
						
							2010-03-13 12:06:51 +00:00  
						
					 
				
					
						
							
							
								 
								Kovarththanan Rajaratnam
							
						 
						
							 
							
							
							
							
								
							
							
								ba2c65277a 
								
							 
						 
						
							
							
								
								Use SmallString instead of SmallVector  
							
							 
							
							... 
							
							
							
							llvm-svn: 98436 
							
						 
						
							2010-03-13 10:17:05 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								17b76185f1 
								
							 
						 
						
							
							
								
								Re-revert the explicit template instantiation linkage patch. I am beginning to look incompetent  
							
							 
							
							... 
							
							
							
							llvm-svn: 98425 
							
						 
						
							2010-03-13 03:49:57 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								89cae0f224 
								
							 
						 
						
							
							
								
								Reinstate patch to turn explicit template instantiations into weak symbols  
							
							 
							
							... 
							
							
							
							llvm-svn: 98424 
							
						 
						
							2010-03-13 03:14:19 +00:00  
						
					 
				
					
						
							
							
								 
								Jeffrey Yasskin
							
						 
						
							 
							
							
							
							
								
							
							
								f6442f80cb 
								
							 
						 
						
							
							
								
								Allow users to set CPPFLAGS and CXXFLAGS on the make command line.  
							
							 
							
							... 
							
							
							
							Tested: make CPPFLAGS=-m64 CXXFLAGS=-m64 -j8 && (cd tools/clang;make test)
llvm-svn: 98399 
							
						 
						
							2010-03-12 22:55:16 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								c6140734c5 
								
							 
						 
						
							
							
								
								Fix a rare corner case bug which exposed a serious block API generation  
							
							 
							
							... 
							
							
							
							when initialized variable is a byref block variable and is referenced recursively
in the initializer (you guessed it, it is block implementation of
fibonacci number). Fix, on the other hand is trvial, by generating the
API for byref variable before API for its initializer. We will have this
test added to our internal test suite as a clang-style test is not possible
due to very convoluted IR sequence. Fixes radar 7745514.
llvm-svn: 98393 
							
						 
						
							2010-03-12 21:40:43 +00:00  
						
					 
				
					
						
							
							
								 
								Devang Patel
							
						 
						
							 
							
							
							
							
								
							
							
								a42d3ea60e 
								
							 
						 
						
							
							
								
								If main file name is empty then use "<unknown>".  
							
							 
							
							... 
							
							
							
							llvm-svn: 98385 
							
						 
						
							2010-03-12 21:04:27 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								5d3b901e48 
								
							 
						 
						
							
							
								
								More this adjustment simplification.  
							
							 
							
							... 
							
							
							
							llvm-svn: 98333 
							
						 
						
							2010-03-12 05:28:07 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								539bc40906 
								
							 
						 
						
							
							
								
								Revert the linkage change for explicit template instantiations; something is amiss  
							
							 
							
							... 
							
							
							
							llvm-svn: 98332 
							
						 
						
							2010-03-12 05:13:59 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								3c289673d6 
								
							 
						 
						
							
							
								
								Remove OldOffset.  
							
							 
							
							... 
							
							
							
							llvm-svn: 98331 
							
						 
						
							2010-03-12 05:02:01 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								2b2b8f1949 
								
							 
						 
						
							
							
								
								Remove debug output.  
							
							 
							
							... 
							
							
							
							llvm-svn: 98330 
							
						 
						
							2010-03-12 04:55:20 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								8a2402989d 
								
							 
						 
						
							
							
								
								Begin simplifying handling of thunks.  
							
							 
							
							... 
							
							
							
							llvm-svn: 98329 
							
						 
						
							2010-03-12 04:54:20 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								ee3f72299c 
								
							 
						 
						
							
							
								
								Give explicit template instantiations weak linkage (but don't defer  
							
							 
							
							... 
							
							
							
							them). Fixes PR6578.
llvm-svn: 98328 
							
						 
						
							2010-03-12 04:49:06 +00:00  
						
					 
				
					
						
							
							
								 
								Devang Patel
							
						 
						
							 
							
							
							
							
								
							
							
								01bb5ce932 
								
							 
						 
						
							
							
								
								Keep track of Record context to ensure that record elements are properly nested in debug info.  
							
							 
							
							... 
							
							
							
							llvm-svn: 98283 
							
						 
						
							2010-03-11 20:01:48 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								9723d6c699 
								
							 
						 
						
							
							
								
								fix PR6433, crash on va_arg of typedef.  
							
							 
							
							... 
							
							
							
							llvm-svn: 98264 
							
						 
						
							2010-03-11 18:19:55 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								dd819c981f 
								
							 
						 
						
							
							
								
								Use the new vtable layout code for computing virtual base offset offsets.  
							
							 
							
							... 
							
							
							
							llvm-svn: 98257 
							
						 
						
							2010-03-11 16:06:20 +00:00  
						
					 
				
					
						
							
							
								 
								Rafael Espindola
							
						 
						
							 
							
							
							
							
								
							
							
								4d5c3d99e5 
								
							 
						 
						
							
							
								
								Correctly mangle address of member in template arguments. Fixes PR6460  
							
							 
							
							... 
							
							
							
							llvm-svn: 98254 
							
						 
						
							2010-03-11 14:07:00 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								4cbe83cccb 
								
							 
						 
						
							
							
								
								Rename getVirtualBaseOffsetIndex to getVirtualBaseOffsetOffset to reflect what it actually does.  
							
							 
							
							... 
							
							
							
							llvm-svn: 98248 
							
						 
						
							2010-03-11 07:15:17 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								e4424888e4 
								
							 
						 
						
							
							
								
								When possible, use the vbase offset offsets from the most derived class directly.  
							
							 
							
							... 
							
							
							
							llvm-svn: 98247 
							
						 
						
							2010-03-11 07:00:45 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								7f6b71e222 
								
							 
						 
						
							
							
								
								Keep track of, and dump, vbase offset offsets.  
							
							 
							
							... 
							
							
							
							llvm-svn: 98245 
							
						 
						
							2010-03-11 06:43:12 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								9f28dbc53a 
								
							 
						 
						
							
							
								
								Fix tests.  
							
							 
							
							... 
							
							
							
							llvm-svn: 98242 
							
						 
						
							2010-03-11 06:10:52 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								d5531e2d18 
								
							 
						 
						
							
							
								
								Run the new vtable builder for construction vtables as well now. Note that we still don't use the data it generates.  
							
							 
							
							... 
							
							
							
							llvm-svn: 98239 
							
						 
						
							2010-03-11 05:48:21 +00:00  
						
					 
				
					
						
							
							
								 
								John McCall
							
						 
						
							 
							
							
							
							
								
							
							
								ea8d8bb718 
								
							 
						 
						
							
							
								
								Support PPC-32 DWARF EH intrinisics.  Thanks to rdivacky for his assistance.  
							
							 
							
							... 
							
							
							
							llvm-svn: 98206 
							
						 
						
							2010-03-11 00:10:12 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								4d94109903 
								
							 
						 
						
							
							
								
								set alignment on static locals properly, patch by Arnaud de Grandmaison!  
							
							 
							
							... 
							
							
							
							llvm-svn: 98204 
							
						 
						
							2010-03-10 23:59:59 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								423406f335 
								
							 
						 
						
							
							
								
								Fix calculation of whether a member function needs a thunk in construction vtables.  
							
							 
							
							... 
							
							
							
							llvm-svn: 98191 
							
						 
						
							2010-03-10 21:25:37 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								115b4756b5 
								
							 
						 
						
							
							
								
								We were mistakenly marking morally virtual bases as being uninteresting. Fix this.  
							
							 
							
							... 
							
							
							
							llvm-svn: 98180 
							
						 
						
							2010-03-10 19:39:11 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								703a08605f 
								
							 
						 
						
							
							
								
								Ignore non-interesting bases when emitting construction vtables.  
							
							 
							
							... 
							
							
							
							llvm-svn: 98177 
							
						 
						
							2010-03-10 19:15:26 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								804cf51dcf 
								
							 
						 
						
							
							
								
								Don't accidentally mark some functions in construction vtables as unused. Also land the test for a previous checkin, now that it's correct.  
							
							 
							
							... 
							
							
							
							llvm-svn: 98139 
							
						 
						
							2010-03-10 06:51:42 +00:00  
						
					 
				
					
						
							
							
								 
								John McCall
							
						 
						
							 
							
							
							
							
								
							
							
								e78aac41de 
								
							 
						 
						
							
							
								
								Create a new InjectedClassNameType to represent bare-word references to the  
							
							 
							
							... 
							
							
							
							injected class name of a class template or class template partial specialization.
This is a non-canonical type;  the canonical type is still a template 
specialization type.  This becomes the TypeForDecl of the pattern declaration,
which cleans up some amount of code (and complicates some other parts, but
whatever).
Fixes PR6326 and probably a few others, primarily by re-establishing a few
invariants about TypeLoc sizes.     
llvm-svn: 98134 
							
						 
						
							2010-03-10 03:28:59 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								02b99d6b7c 
								
							 
						 
						
							
							
								
								When building construction vtables, we need to check if a primary virtual base is actually a primary virtual base in the layout class.  
							
							 
							
							... 
							
							
							
							llvm-svn: 98131 
							
						 
						
							2010-03-10 03:02:01 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								ca82a4fdba 
								
							 
						 
						
							
							
								
								Improve vcall offset handling in construction vtables. With this we layout the construction vtables from the ABI examples correctly.  
							
							 
							
							... 
							
							
							
							llvm-svn: 98127 
							
						 
						
							2010-03-10 02:33:41 +00:00  
						
					 
				
					
						
							
							
								 
								Rafael Espindola
							
						 
						
							 
							
							
							
							
								
							
							
								e7113ca907 
								
							 
						 
						
							
							
								
								Delay codegen of vtables when handling implicit instantiations.  
							
							 
							
							... 
							
							
							
							This fixes PR6474.
llvm-svn: 98123 
							
						 
						
							2010-03-10 02:19:29 +00:00  
						
					 
				
					
						
							
							
								 
								Devang Patel
							
						 
						
							 
							
							
							
							
								
							
							
								05c37d2800 
								
							 
						 
						
							
							
								
								Use SmallString instead of alloca.  
							
							 
							
							... 
							
							
							
							llvm-svn: 98112 
							
						 
						
							2010-03-10 00:19:43 +00:00  
						
					 
				
					
						
							
							
								 
								Devang Patel
							
						 
						
							 
							
							
							
							
								
							
							
								93f274c161 
								
							 
						 
						
							
							
								
								Fix file reference for derived and composite types. Now, dwarf writer uses strict verifier that ignores debug info for such types if their file info is unknown.  
							
							 
							
							... 
							
							
							
							llvm-svn: 98096 
							
						 
						
							2010-03-09 22:49:11 +00:00  
						
					 
				
					
						
							
							
								 
								Devang Patel
							
						 
						
							 
							
							
							
							
								
							
							
								4f26205ba8 
								
							 
						 
						
							
							
								
								More then one anonymous aggregates on one line creates chaos when MDNode uniquness is combined with RAUW operation. Right solution is to avoid using RAUW.  
							
							 
							
							... 
							
							
							
							This fixes PR 6554.
llvm-svn: 98083 
							
						 
						
							2010-03-09 21:32:27 +00:00  
						
					 
				
					
						
							
							
								 
								Devang Patel
							
						 
						
							 
							
							
							
							
								
							
							
								f2aa707895 
								
							 
						 
						
							
							
								
								Use getLast() instead of getBasename().  
							
							 
							
							... 
							
							
							
							llvm-svn: 98072 
							
						 
						
							2010-03-09 19:14:07 +00:00  
						
					 
				
					
						
							
							
								 
								Devang Patel
							
						 
						
							 
							
							
							
							
								
							
							
								408dcf60aa 
								
							 
						 
						
							
							
								
								Start using DIFile. Corresponding llvm patch is r98020.  
							
							 
							
							... 
							
							
							
							llvm-svn: 98021 
							
						 
						
							2010-03-09 00:44:50 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								e18aaf2c4b 
								
							 
						 
						
							
							
								
								add a codegen hack to work around an AST bug, allowing us to compile the  
							
							 
							
							... 
							
							
							
							code in PR6537.  This should be reverted when the ast bug is fixed.
llvm-svn: 97981 
							
						 
						
							2010-03-08 21:08:07 +00:00  
						
					 
				
					
						
							
							
								 
								Devang Patel
							
						 
						
							 
							
							
							
							
								
							
							
								d3cbaa1ddf 
								
							 
						 
						
							
							
								
								Avoid using DIDescriptor.isNull().  
							
							 
							
							... 
							
							
							
							llvm-svn: 97976 
							
						 
						
							2010-03-08 20:53:17 +00:00  
						
					 
				
					
						
							
							
								 
								Devang Patel
							
						 
						
							 
							
							
							
							
								
							
							
								9cf2705a5d 
								
							 
						 
						
							
							
								
								Revert r97949.  
							
							 
							
							... 
							
							
							
							llvm-svn: 97964 
							
						 
						
							2010-03-08 19:20:58 +00:00  
						
					 
				
					
						
							
							
								 
								Devang Patel
							
						 
						
							 
							
							
							
							
								
							
							
								4ce8ebb087 
								
							 
						 
						
							
							
								
								Avoid DIDescriptor.isNull() checks.  
							
							 
							
							... 
							
							
							
							llvm-svn: 97949 
							
						 
						
							2010-03-08 18:26:57 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								de4827dd34 
								
							 
						 
						
							
							
								
								Extend ObjCMessageExpr for class method sends with the source location  
							
							 
							
							... 
							
							
							
							of the class name.
llvm-svn: 97943 
							
						 
						
							2010-03-08 16:40:19 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								c934bc840c 
								
							 
						 
						
							
							
								
								Perform overload resolution when static_cast'ing from a  
							
							 
							
							... 
							
							
							
							pointer-to-member-to-derived to a pointer-to-member-to-base. Fixes
PR6072.
llvm-svn: 97923 
							
						 
						
							2010-03-07 23:24:59 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								577cf97cf3 
								
							 
						 
						
							
							
								
								Don't turn off mangling in implicitly extern "C" system headers. GCC  
							
							 
							
							... 
							
							
							
							doesn't do this on any of the major platforms, and we don't really
support any of the platforms that do (nor will we actually handle
those headers well). Fixes PR6217; see PR6530 for details on what we
would need to do to support these platforms.
llvm-svn: 97899 
							
						 
						
							2010-03-07 05:10:40 +00:00  
						
					 
				
					
						
							
							
								 
								Benjamin Kramer
							
						 
						
							 
							
							
							
							
								
							
							
								f0a0f68c79 
								
							 
						 
						
							
							
								
								Add a message to these asserts.  
							
							 
							
							... 
							
							
							
							llvm-svn: 97873 
							
						 
						
							2010-03-06 09:07:19 +00:00  
						
					 
				
					
						
							
							
								 
								Rafael Espindola
							
						 
						
							 
							
							
							
							
								
							
							
								d51c9b9a9f 
								
							 
						 
						
							
							
								
								Use static method in GlobalValue  
							
							 
							
							... 
							
							
							
							llvm-svn: 97872 
							
						 
						
							2010-03-06 07:35:18 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								99d20f83ba 
								
							 
						 
						
							
							
								
								PR6515: Implement __builtin_signbit and friends.  
							
							 
							
							... 
							
							
							
							I'm reasonably sure my implementation is correct, but it would be nice if
someone could double-check.
llvm-svn: 97864 
							
						 
						
							2010-03-06 02:17:52 +00:00  
						
					 
				
					
						
							
							
								 
								John McCall
							
						 
						
							 
							
							
							
							
								
							
							
								beec5a080f 
								
							 
						 
						
							
							
								
								Implement __builtin_dwarf_sp_column for i386 (Darwin and not), x86-64 (all),  
							
							 
							
							... 
							
							
							
							and ARM.  Implement __builtin_init_dwarf_reg_size_table for i386 (both) and
x86-64 (all).
llvm-svn: 97859 
							
						 
						
							2010-03-06 00:35:14 +00:00  
						
					 
				
					
						
							
							
								 
								Blaine Garst
							
						 
						
							 
							
							
							
							
								
							
							
								f27ab71d9f 
								
							 
						 
						
							
							
								
								add support for a 1<<29 bit in the block flags field to mark blocks using alternate struct return ABI  
							
							 
							
							... 
							
							
							
							llvm-svn: 97775 
							
						 
						
							2010-03-05 01:29:59 +00:00  
						
					 
				
					
						
							
							
								 
								Rafael Espindola
							
						 
						
							 
							
							
							
							
								
							
							
								4c489c7030 
								
							 
						 
						
							
							
								
								Don't produce an alias for a destructor if the target is weak.  
							
							 
							
							... 
							
							
							
							This fixes bootstrap on ELF systems :-)
llvm-svn: 97773 
							
						 
						
							2010-03-05 01:21:10 +00:00  
						
					 
				
					
						
							
							
								 
								Rafael Espindola
							
						 
						
							 
							
							
							
							
								
							
							
								bef98689ad 
								
							 
						 
						
							
							
								
								really fix 6473 by handling weakref in constant expressions.  
							
							 
							
							... 
							
							
							
							llvm-svn: 97750 
							
						 
						
							2010-03-04 21:26:03 +00:00  
						
					 
				
					
						
							
							
								 
								Rafael Espindola
							
						 
						
							 
							
							
							
							
								
							
							
								2e42fec3a0 
								
							 
						 
						
							
							
								
								Fix PR6473.  
							
							 
							
							... 
							
							
							
							Clang's support for weakref is now better than llvm-gcc's :-)
We don't introduce a new symbol and we correctly mark undefined references weak only if there is no
definition or regular undefined references in the same file.
llvm-svn: 97733 
							
						 
						
							2010-03-04 18:17:24 +00:00  
						
					 
				
					
						
							
							
								 
								John McCall
							
						 
						
							 
							
							
							
							
								
							
							
								731be6620c 
								
							 
						 
						
							
							
								
								Revert changes r97693, r97700, and r97718.  
							
							 
							
							... 
							
							
							
							Our testing framework can't deal with disabled targets yet.
llvm-svn: 97719 
							
						 
						
							2010-03-04 04:29:44 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								9eba9dfb0c 
								
							 
						 
						
							
							
								
								Refactor local class name mangling and make it  
							
							 
							
							... 
							
							
							
							ABI conforming.
llvm-svn: 97702 
							
						 
						
							2010-03-04 01:02:03 +00:00  
						
					 
				
					
						
							
							
								 
								John McCall
							
						 
						
							 
							
							
							
							
								
							
							
								81d4d12504 
								
							 
						 
						
							
							
								
								Implement __builtin_dwarf_sp_column().  
							
							 
							
							... 
							
							
							
							llvm-svn: 97700 
							
						 
						
							2010-03-04 00:44:01 +00:00  
						
					 
				
					
						
							
							
								 
								John McCall
							
						 
						
							 
							
							
							
							
								
							
							
								6abe39c61e 
								
							 
						 
						
							
							
								
								Create a TargetMachine whenever we create a CodeGenAction.  The codegen of  
							
							 
							
							... 
							
							
							
							some builtins will rely on target knowledge.
llvm-svn: 97693 
							
						 
						
							2010-03-04 00:23:29 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								281aae6328 
								
							 
						 
						
							
							
								
								Fix code gen bug generating code for  
							
							 
							
							... 
							
							
							
							((id)cat)->isa. Fixes radar 7709015.
llvm-svn: 97672 
							
						 
						
							2010-03-03 22:09:47 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								576def7fbe 
								
							 
						 
						
							
							
								
								fix PR6475, we were doing side-effecting stuff in an assert.  
							
							 
							
							... 
							
							
							
							llvm-svn: 97669 
							
						 
						
							2010-03-03 21:52:23 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								a529c25555 
								
							 
						 
						
							
							
								
								Implements mangling of local class names to  
							
							 
							
							... 
							
							
							
							fix a code gen crash. This is WIP as not
all ABI cases are covered (there is a FIXME to 
this effect). Fixes radar 7696748.
llvm-svn: 97658 
							
						 
						
							2010-03-03 19:41:08 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								5cc15e058b 
								
							 
						 
						
							
							
								
								add framework for ARM builtins, Patch by Edmund Grimley Evans!  
							
							 
							
							... 
							
							
							
							llvm-svn: 97656 
							
						 
						
							2010-03-03 19:03:45 +00:00  
						
					 
				
					
						
							
							
								 
								John McCall
							
						 
						
							 
							
							
							
							
								
							
							
								515c3c548c 
								
							 
						 
						
							
							
								
								Sketch out an implementation for __builtin_dwarf_cfa.  I have no idea  
							
							 
							
							... 
							
							
							
							why the front-end is calculating the argument to llvm.eh.dwarf.cfa().
llvm-svn: 97653 
							
						 
						
							2010-03-03 10:30:05 +00:00  
						
					 
				
					
						
							
							
								 
								John McCall
							
						 
						
							 
							
							
							
							
								
							
							
								66769f8544 
								
							 
						 
						
							
							
								
								Implement __builtin_eh_return.  
							
							 
							
							... 
							
							
							
							llvm-svn: 97643 
							
						 
						
							2010-03-03 05:38:58 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								5b0057c05b 
								
							 
						 
						
							
							
								
								Fix a bug with base offset merging that Devang noticed.  
							
							 
							
							... 
							
							
							
							llvm-svn: 97641 
							
						 
						
							2010-03-03 04:58:02 +00:00  
						
					 
				
					
						
							
							
								 
								John McCall
							
						 
						
							 
							
							
							
							
								
							
							
								d4f4b7f5ee 
								
							 
						 
						
							
							
								
								Add proper target hooks for __builtin_extract_return_address and  
							
							 
							
							... 
							
							
							
							__builtin_frob_return_address.  The implementations for both are
still trivial in the default case.
llvm-svn: 97638 
							
						 
						
							2010-03-03 04:15:11 +00:00  
						
					 
				
					
						
							
							
								 
								John McCall
							
						 
						
							 
							
							
							
							
								
							
							
								1950a11939 
								
							 
						 
						
							
							
								
								Don't emit derived-to-base destructor aliases if we don't have a definition  
							
							 
							
							... 
							
							
							
							for the base destructor, because aliases to declarations aren't legal.
Fixes PR 6471.
llvm-svn: 97637 
							
						 
						
							2010-03-03 03:40:11 +00:00  
						
					 
				
					
						
							
							
								 
								Rafael Espindola
							
						 
						
							 
							
							
							
							
								
							
							
								70e040d552 
								
							 
						 
						
							
							
								
								During codegen assert that any copy assignment, destructor or constructor that  
							
							 
							
							... 
							
							
							
							we need to synthesize has been marked as used by Sema.
Change Sema to avoid these asserts.
llvm-svn: 97589 
							
						 
						
							2010-03-02 21:28:26 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								93b1b49082 
								
							 
						 
						
							
							
								
								Simplify code.  
							
							 
							
							... 
							
							
							
							llvm-svn: 97551 
							
						 
						
							2010-03-02 05:40:45 +00:00  
						
					 
				
					
						
							
							
								 
								John McCall
							
						 
						
							 
							
							
							
							
								
							
							
								b6cc2c0439 
								
							 
						 
						
							
							
								
								Inspired by seeing "MIPS" go by in the commits, I've gone ahead and  
							
							 
							
							... 
							
							
							
							implemented a (codegen) target hook for __builtin_extend_pointer.
I'm also making it return a uint64_t instead of an unsigned word;  this
comports with typical usage (i.e. the one use I know of).
I don't know if any of the existing targets requires this hook to be
set (other than x86 and x86_64, which I know do not).
llvm-svn: 97547 
							
						 
						
							2010-03-02 03:50:12 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								6f1f002651 
								
							 
						 
						
							
							
								
								Rename BaseOffset to Offset and make it signed in preparation of more construction vtable work.  
							
							 
							
							... 
							
							
							
							llvm-svn: 97546 
							
						 
						
							2010-03-02 03:44:06 +00:00  
						
					 
				
					
						
							
							
								 
								John McCall
							
						 
						
							 
							
							
							
							
								
							
							
								4b613fae35 
								
							 
						 
						
							
							
								
								After much consultation aimed at figuring out what this builtin actually  
							
							 
							
							... 
							
							
							
							does, document the results and then implement __builtin_extend_pointer for
platforms where it's a no-op.
llvm-svn: 97540 
							
						 
						
							2010-03-02 02:31:24 +00:00  
						
					 
				
					
						
							
							
								 
								John McCall
							
						 
						
							 
							
							
							
							
								
							
							
								bd8d9bd39c 
								
							 
						 
						
							
							
								
								Split out types that are non-canonical unless dependent as their own  
							
							 
							
							... 
							
							
							
							category.  Use this in a few places to eliminate unnecessary TST cases and
do some future-proofing.  Provide terrible manglings for typeof.  Mangle
decltype with some hope of accuracy.
Our manglings for some of the cases covered in the testcase are different
from gcc's, which I've raised as an issue with the ABI list.
llvm-svn: 97523 
							
						 
						
							2010-03-01 23:49:17 +00:00  
						
					 
				
					
						
							
							
								 
								John McCall
							
						 
						
							 
							
							
							
							
								
							
							
								de9607bc6f 
								
							 
						 
						
							
							
								
								The latest draft uses 'dt' to mangle member expressions, and now so do we.  
							
							 
							
							... 
							
							
							
							llvm-svn: 97479 
							
						 
						
							2010-03-01 19:12:25 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								a51c67424e 
								
							 
						 
						
							
							
								
								Improve name mangling for dependently-scoped declaration references.  
							
							 
							
							... 
							
							
							
							llvm-svn: 97422 
							
						 
						
							2010-02-28 22:05:49 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								5610db6923 
								
							 
						 
						
							
							
								
								Add name mangling for DeclRefExprs that refer to external names  
							
							 
							
							... 
							
							
							
							llvm-svn: 97418 
							
						 
						
							2010-02-28 21:40:32 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								5b79c31471 
								
							 
						 
						
							
							
								
								Remove debug output.  
							
							 
							
							... 
							
							
							
							llvm-svn: 97407 
							
						 
						
							2010-02-28 18:39:30 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								7162ab947b 
								
							 
						 
						
							
							
								
								Handle unused functions in construction vtables correctly.  
							
							 
							
							... 
							
							
							
							llvm-svn: 97406 
							
						 
						
							2010-02-28 18:37:33 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								8b37bb7c48 
								
							 
						 
						
							
							
								
								When laying out vtables for virtual bases in construction vtables, we need to check if the vtable is a primary base in the layout class.  
							
							 
							
							... 
							
							
							
							llvm-svn: 97402 
							
						 
						
							2010-02-28 18:08:38 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								e3385f566b 
								
							 
						 
						
							
							
								
								More improvements to construction vtables; we know handle vbase offsets correctly (I hope).  
							
							 
							
							... 
							
							
							
							llvm-svn: 97361 
							
						 
						
							2010-02-28 01:43:58 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								62c6c72bab 
								
							 
						 
						
							
							
								
								Pass information about whether a base is virtual or not down to getCtorVtable, we need this information in the vtable builder.  
							
							 
							
							... 
							
							
							
							llvm-svn: 97356 
							
						 
						
							2010-02-28 00:36:23 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								31f595f5ef 
								
							 
						 
						
							
							
								
								Add new function.  
							
							 
							
							... 
							
							
							
							llvm-svn: 97353 
							
						 
						
							2010-02-28 00:10:58 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								f98b47d3b9 
								
							 
						 
						
							
							
								
								Fix to dumpLayout; we want to be able to dump address points even if the vtable doesn't have any methods.  
							
							 
							
							... 
							
							
							
							llvm-svn: 97350 
							
						 
						
							2010-02-27 23:58:01 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								c3f92a16f2 
								
							 
						 
						
							
							
								
								Add a simple construction vtable test.  
							
							 
							
							... 
							
							
							
							llvm-svn: 97344 
							
						 
						
							2010-02-27 21:09:00 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								9391375d95 
								
							 
						 
						
							
							
								
								Start fleshing out construction vtable support.  
							
							 
							
							... 
							
							
							
							llvm-svn: 97342 
							
						 
						
							2010-02-27 20:39:05 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								603d7d1910 
								
							 
						 
						
							
							
								
								Enable the new vtable layout code for vtables that aren't construction vtables. (This doesn't mean that we emit LLVM IR using it yet, it just means that it's running and hopefully not crashing or asserting).  
							
							 
							
							... 
							
							
							
							llvm-svn: 97341 
							
						 
						
							2010-02-27 20:02:53 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								9f19aaaa3a 
								
							 
						 
						
							
							
								
								Move ComputeThisAdjustmentBaseOffset to VtableBuilder.  
							
							 
							
							... 
							
							
							
							llvm-svn: 97340 
							
						 
						
							2010-02-27 19:57:44 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								b26c2abac7 
								
							 
						 
						
							
							
								
								Make sure to insert the primary base in the set :)  
							
							 
							
							... 
							
							
							
							llvm-svn: 97339 
							
						 
						
							2010-02-27 19:51:04 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								e02a926a1c 
								
							 
						 
						
							
							
								
								Use the real base offset when calculating vbase offsets.  
							
							 
							
							... 
							
							
							
							llvm-svn: 97338 
							
						 
						
							2010-02-27 19:21:58 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								4d0729a7cc 
								
							 
						 
						
							
							
								
								Figured out why the test was failing, this will hopefully fix it.  
							
							 
							
							... 
							
							
							
							llvm-svn: 97336 
							
						 
						
							2010-02-27 19:00:53 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								2b381bbb5c 
								
							 
						 
						
							
							
								
								Don't add this adjustments for pure virtual member functions.  
							
							 
							
							... 
							
							
							
							llvm-svn: 97334 
							
						 
						
							2010-02-27 18:16:50 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								01d3c7da60 
								
							 
						 
						
							
							
								
								We want to store method info for unused functions.  
							
							 
							
							... 
							
							
							
							llvm-svn: 97333 
							
						 
						
							2010-02-27 18:09:40 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								4068798cbc 
								
							 
						 
						
							
							
								
								Finish up the changes to this adjustments.  
							
							 
							
							... 
							
							
							
							llvm-svn: 97328 
							
						 
						
							2010-02-27 16:52:49 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								d46ed89d79 
								
							 
						 
						
							
							
								
								Stub out more of the 'this' pointer adjustment fixes I've been planning. Start using a set vector for primary bases so they will be ordered.  
							
							 
							
							... 
							
							
							
							llvm-svn: 97326 
							
						 
						
							2010-02-27 16:18:19 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								d2025417ef 
								
							 
						 
						
							
							
								
								Fix another vtable layout bug; we weren't looking hard enough for overriden functions when determining if an overrider will ever be used.  
							
							 
							
							... 
							
							
							
							llvm-svn: 97306 
							
						 
						
							2010-02-27 06:38:03 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								d69b2f93ea 
								
							 
						 
						
							
							
								
								Handle vcall offset sharing between destructors.  
							
							 
							
							... 
							
							
							
							llvm-svn: 97304 
							
						 
						
							2010-02-27 04:12:52 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								b08aaa3e10 
								
							 
						 
						
							
							
								
								Fix a bug where we were generating an unnecessary vtable for a virtual base that's already a primary virtual base.  
							
							 
							
							... 
							
							
							
							llvm-svn: 97303 
							
						 
						
							2010-02-27 04:05:52 +00:00  
						
					 
				
					
						
							
							
								 
								John McCall
							
						 
						
							 
							
							
							
							
								
							
							
								43c6ffbeec 
								
							 
						 
						
							
							
								
								Sundry fixes to the new vtable builder.  
							
							 
							
							... 
							
							
							
							llvm-svn: 97258 
							
						 
						
							2010-02-26 20:22:44 +00:00  
						
					 
				
					
						
							
							
								 
								David Chisnall
							
						 
						
							 
							
							
							
							
								
							
							
								36c6320d78 
								
							 
						 
						
							
							
								
								Don't generate method metadata for @dynamic properties.  Fixes PR6354.  
							
							 
							
							... 
							
							
							
							llvm-svn: 97199 
							
						 
						
							2010-02-26 01:11:38 +00:00  
						
					 
				
					
						
							
							
								 
								John McCall
							
						 
						
							 
							
							
							
							
								
							
							
								2da83a3a38 
								
							 
						 
						
							
							
								
								Use the power of types to track down another canonicalization bug in  
							
							 
							
							... 
							
							
							
							the ABI-computation interface.  Fixes <rdar://problem/7691046>.
llvm-svn: 97197 
							
						 
						
							2010-02-26 00:48:12 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								9e3b3a3bbe 
								
							 
						 
						
							
							
								
								Improve vcall offset handling.  
							
							 
							
							... 
							
							
							
							llvm-svn: 97174 
							
						 
						
							2010-02-25 22:23:13 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								ed7d0e8be8 
								
							 
						 
						
							
							
								
								Fux a bug where we were trying to add overriders for non-virtual bases of virtual bases more than once.  
							
							 
							
							... 
							
							
							
							llvm-svn: 97173 
							
						 
						
							2010-02-25 22:18:35 +00:00  
						
					 
				
					
						
							
							
								 
								Sanjiv Gupta
							
						 
						
							 
							
							
							
							
								
							
							
								9ac3092d34 
								
							 
						 
						
							
							
								
								Targets (like pic16) may have mangled the name of global variables,  
							
							 
							
							... 
							
							
							
							so get the name from Var rather than the original decl.
llvm-svn: 97114 
							
						 
						
							2010-02-25 05:20:44 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								01bbef516e 
								
							 
						 
						
							
							
								
								Remove dead code.  
							
							 
							
							... 
							
							
							
							llvm-svn: 97109 
							
						 
						
							2010-02-25 03:57:50 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								422f778ba1 
								
							 
						 
						
							
							
								
								Move the vcall and vbase offset layout code out into its own class.  
							
							 
							
							... 
							
							
							
							llvm-svn: 97107 
							
						 
						
							2010-02-25 03:45:56 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								3c1ec97a28 
								
							 
						 
						
							
							
								
								Get rid of 'this' adjustments from the FinalOverriders class since they can be different for the same overrider in different parts of the vtable.  
							
							 
							
							... 
							
							
							
							llvm-svn: 97068 
							
						 
						
							2010-02-24 22:32:18 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								d8d698da60 
								
							 
						 
						
							
							
								
								Improve this adjustment pointer calculation.  
							
							 
							
							... 
							
							
							
							llvm-svn: 97067 
							
						 
						
							2010-02-24 22:27:12 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								8025e7b1b9 
								
							 
						 
						
							
							
								
								Make ComputeThisAdjustmentBaseOffset public for now.  
							
							 
							
							... 
							
							
							
							llvm-svn: 97066 
							
						 
						
							2010-02-24 22:18:01 +00:00  
						
					 
				
					
						
							
							
								 
								John McCall
							
						 
						
							 
							
							
							
							
								
							
							
								aea181de04 
								
							 
						 
						
							
							
								
								Fix an iterator-invalidation bug that was causing selfhost errors  
							
							 
							
							... 
							
							
							
							on non-darwin platforms.  Fixes PR6411. Test case doesn't reduce,
unfortunately.
llvm-svn: 97055 
							
						 
						
							2010-02-24 20:32:01 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								a9f633b060 
								
							 
						 
						
							
							
								
								Generate correct vcall offsets when we have a primary virtual base that is not a primary base in the complete class hierarchy.  
							
							 
							
							... 
							
							
							
							llvm-svn: 97039 
							
						 
						
							2010-02-24 16:43:12 +00:00  
						
					 
				
					
						
							
							
								 
								John McCall
							
						 
						
							 
							
							
							
							
								
							
							
								8ee376f08a 
								
							 
						 
						
							
							
								
								Canonicalize parameter and return types before computing ABI info.  Eliminates  
							
							 
							
							... 
							
							
							
							a common source of oddities and, in theory, removes some redundant ABI
computations.  Also fixes a miscompile I introduced yesterday by refactoring
some code and causing a slightly different code path to be taken that
didn't perform *parameter* type canonicalization, just normal type
canonicalization;  this in turn caused a bit of ABI code to misfire because
it was looking for 'double' or 'float' but received 'const float'.
llvm-svn: 97030 
							
						 
						
							2010-02-24 07:14:12 +00:00  
						
					 
				
					
						
							
							
								 
								Devang Patel
							
						 
						
							 
							
							
							
							
								
							
							
								b407338fe2 
								
							 
						 
						
							
							
								
								Emit debug info for VectorType.  
							
							 
							
							... 
							
							
							
							llvm-svn: 96999 
							
						 
						
							2010-02-23 22:59:39 +00:00  
						
					 
				
					
						
							
							
								 
								Rafael Espindola
							
						 
						
							 
							
							
							
							
								
							
							
								c18086ae17 
								
							 
						 
						
							
							
								
								Add support for the weakref attribute. We still produce "alias weak" as llvm-gcc does, but are more strict on what uses of weakref we accept.  
							
							 
							
							... 
							
							
							
							llvm-svn: 96992 
							
						 
						
							2010-02-23 22:00:30 +00:00  
						
					 
				
					
						
							
							
								 
								Blaine Garst
							
						 
						
							 
							
							
							
							
								
							
							
								fc83aa04db 
								
							 
						 
						
							
							
								
								Unconditionally support block introspection data in a new field at the end  
							
							 
							
							... 
							
							
							
							of the block descriptor field.  This field is the ObjC style @encode
signature of the implementation function, and was to this point
conditionally provided in the block literal data structure.  That
provisional support is removed.
Additionally, eliminate unused enumerations for the block literal flags field.
The first shipping ABI unconditionally set (1<<29) but this bit is unused
by the runtime, so the second ABI will unconditionally have (1<<30) set so
that the runtime can in fact distinguish whether the additional data is
present or not.
llvm-svn: 96989 
							
						 
						
							2010-02-23 21:51:17 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								1e6bc133ce 
								
							 
						 
						
							
							
								
								Make previous fix handle a few more edge cases.  
							
							 
							
							... 
							
							
							
							llvm-svn: 96962 
							
						 
						
							2010-02-23 18:25:09 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								ad5f0789f6 
								
							 
						 
						
							
							
								
								PR6400: Handle an extreme edge case in mangling correctly.  
							
							 
							
							... 
							
							
							
							llvm-svn: 96961 
							
						 
						
							2010-02-23 18:20:18 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								d2c0de6b44 
								
							 
						 
						
							
							
								
								PR6386: Fix a recent regression in IRGen of cast-to-union constructs.  
							
							 
							
							... 
							
							
							
							llvm-svn: 96958 
							
						 
						
							2010-02-23 17:58:35 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								8939e400b6 
								
							 
						 
						
							
							
								
								Implement IsOverriderUsed. This can't be tested yet due to some other bugs :)  
							
							 
							
							... 
							
							
							
							llvm-svn: 96897 
							
						 
						
							2010-02-23 06:34:44 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								a8796c692c 
								
							 
						 
						
							
							
								
								Stub out IsOverriderUsed.  
							
							 
							
							... 
							
							
							
							llvm-svn: 96883 
							
						 
						
							2010-02-23 04:26:39 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								0570f71255 
								
							 
						 
						
							
							
								
								More fixes. Don't try to emit a virtual base vtable if the virtual base in question is a primary virtual base of some other base.  
							
							 
							
							... 
							
							
							
							llvm-svn: 96881 
							
						 
						
							2010-02-23 03:48:14 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								bae46277fe 
								
							 
						 
						
							
							
								
								Always emit vcall offset for the primary base, not only if it's virtual. Remove a debug printf, and add the test case that now passes.  
							
							 
							
							... 
							
							
							
							llvm-svn: 96880 
							
						 
						
							2010-02-23 03:26:17 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								510d22d097 
								
							 
						 
						
							
							
								
								Simplify the vcall offset calculation and make it give the correct answers :) My test case now has the right values but in the wrong order.  
							
							 
							
							... 
							
							
							
							llvm-svn: 96877 
							
						 
						
							2010-02-23 03:14:49 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								30f5301e54 
								
							 
						 
						
							
							
								
								More work on vcall offsets. We now emit the right number of vcall offsets in my local test case, but not the right values.  
							
							 
							
							... 
							
							
							
							llvm-svn: 96874 
							
						 
						
							2010-02-23 02:47:31 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								075056a8f9 
								
							 
						 
						
							
							
								
								Move BaseOffset out of the FinalOverriders class.  
							
							 
							
							... 
							
							
							
							llvm-svn: 96853 
							
						 
						
							2010-02-23 01:34:28 +00:00  
						
					 
				
					
						
							
							
								 
								John McCall
							
						 
						
							 
							
							
							
							
								
							
							
								f8ff7b9fd1 
								
							 
						 
						
							
							
								
								Perform two more constructor/destructor code-size optimizations:  
							
							 
							
							... 
							
							
							
							1) emit base destructors as aliases to their unique base class destructors
under some careful conditions.  This is enabled for the same targets that can
support complete-to-base aliases, i.e. not darwin.
2) Emit non-variadic complete constructors for classes with no virtual bases
as calls to the base constructor.  This is enabled on all targets and in
theory can trigger in situations that the alias optimization can't (mostly
involving virtual bases, mostly not yet supported).
These are bundled together because I didn't think it worthwhile to split them,
not because they really need to be.
llvm-svn: 96842 
							
						 
						
							2010-02-23 00:48:20 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								f4f2e0247f 
								
							 
						 
						
							
							
								
								Change the name of the vtable-debugging environment variable to  
							
							 
							
							... 
							
							
							
							CLANG_VTABLE_DEBUG.
llvm-svn: 96785 
							
						 
						
							2010-02-22 16:48:26 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								76eb74a1cd 
								
							 
						 
						
							
							
								
								Don't use NamedDecl::getNameAsCString() when dealing with C++ methods,  
							
							 
							
							... 
							
							
							
							since they may not have normal identifiers for names. Fixes PR6369.
llvm-svn: 96784 
							
						 
						
							2010-02-22 16:44:27 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								36c569fb33 
								
							 
						 
						
							
							
								
								Eliminate the default arguments to ASTContext::getFunctionType(),  
							
							 
							
							... 
							
							
							
							fixing up a few callers that thought they were propagating NoReturn
information but were in fact saying something about exception
specifications.
llvm-svn: 96766 
							
						 
						
							2010-02-21 22:15:06 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								350b56eed5 
								
							 
						 
						
							
							
								
								Add the CK_UnusedFunctionPointer component kind for unused function pointers.  
							
							 
							
							... 
							
							
							
							llvm-svn: 96695 
							
						 
						
							2010-02-19 20:08:13 +00:00  
						
					 
				
					
						
							
							
								 
								John McCall
							
						 
						
							 
							
							
							
							
								
							
							
								b81884d347 
								
							 
						 
						
							
							
								
								More refactoring around constructor/destructor code generation.  
							
							 
							
							... 
							
							
							
							Fix some bugs with function-try-blocks and simplify normal try-block
code generation.
This implementation excludes a deleting destructor's call to
operator delete() from the function-try-block, which I believe
is correct but which I can't find straightforward support for at
a moment's glance.
llvm-svn: 96670 
							
						 
						
							2010-02-19 09:25:03 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								2d3d903872 
								
							 
						 
						
							
							
								
								Dump this-adjustments for destructors as well.  
							
							 
							
							... 
							
							
							
							llvm-svn: 96660 
							
						 
						
							2010-02-19 06:03:53 +00:00  
						
					 
				
					
						
							
							
								 
								John McCall
							
						 
						
							 
							
							
							
							
								
							
							
								d4324148d7 
								
							 
						 
						
							
							
								
								Re-introduce the ctor/dtor alias optimization, this time hidden behind a  
							
							 
							
							... 
							
							
							
							command-line option which defaults off.
llvm-svn: 96649 
							
						 
						
							2010-02-19 01:32:20 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								aef662206b 
								
							 
						 
						
							
							
								
								Patch removes IVars list from ObjCInterfaceDecl and  
							
							 
							
							... 
							
							
							
							instead relies on their DeclContext for iteration, etc.
llvm-svn: 96638 
							
						 
						
							2010-02-19 00:31:17 +00:00  
						
					 
				
					
						
							
							
								 
								Blaine Garst
							
						 
						
							 
							
							
							
							
								
							
							
								5421a83e4a 
								
							 
						 
						
							
							
								
								remove unused function & enumerations  
							
							 
							
							... 
							
							
							
							llvm-svn: 96635 
							
						 
						
							2010-02-19 00:24:37 +00:00  
						
					 
				
					
						
							
							
								 
								John McCall
							
						 
						
							 
							
							
							
							
								
							
							
								334ce7c1c4 
								
							 
						 
						
							
							
								
								Revert the ctor/dtor alias optimization for now;  the buildbots can detect  
							
							 
							
							... 
							
							
							
							some failure here that I can't.
llvm-svn: 96612 
							
						 
						
							2010-02-18 21:31:48 +00:00  
						
					 
				
					
						
							
							
								 
								John McCall
							
						 
						
							 
							
							
							
							
								
							
							
								5c60a6f597 
								
							 
						 
						
							
							
								
								Make deleting and complete dtor variants defer to other dtor variants by  
							
							 
							
							... 
							
							
							
							calling them as subroutines.  This triggers whenever the alias optimization
doesn't, i.e. when the dtor has linkonce linkage or there are virtual bases
or it's the deleting dtor.
llvm-svn: 96605 
							
						 
						
							2010-02-18 19:59:28 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								f8b53536ed 
								
							 
						 
						
							
							
								
								Attempt to fix the 32-bit test failures.  
							
							 
							
							... 
							
							
							
							llvm-svn: 96595 
							
						 
						
							2010-02-18 18:20:49 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								e5faca7cda 
								
							 
						 
						
							
							
								
								Fix another bug and add another class.  
							
							 
							
							... 
							
							
							
							llvm-svn: 96590 
							
						 
						
							2010-02-18 17:32:33 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								8847d9e40a 
								
							 
						 
						
							
							
								
								More work on vcall offsets.  
							
							 
							
							... 
							
							
							
							llvm-svn: 96587 
							
						 
						
							2010-02-18 17:26:40 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								78277c7705 
								
							 
						 
						
							
							
								
								Start stubbing out vcall offset handling.  
							
							 
							
							... 
							
							
							
							llvm-svn: 96585 
							
						 
						
							2010-02-18 17:00:09 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								5a7654a9d8 
								
							 
						 
						
							
							
								
								Store the base offset of the final overrider in the OverriderInfo struct, to be used for vcall offsets.  
							
							 
							
							... 
							
							
							
							llvm-svn: 96582 
							
						 
						
							2010-02-18 16:29:24 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								c8316a2e08 
								
							 
						 
						
							
							
								
								Remove some dead code.  
							
							 
							
							... 
							
							
							
							llvm-svn: 96581 
							
						 
						
							2010-02-18 16:24:20 +00:00  
						
					 
				
					
						
							
							
								 
								John McCall
							
						 
						
							 
							
							
							
							
								
							
							
								89b12b34f6 
								
							 
						 
						
							
							
								
								Extract out function-body code generation into its own method.  No functionality  
							
							 
							
							... 
							
							
							
							change.
llvm-svn: 96564 
							
						 
						
							2010-02-18 03:17:58 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								d2408f78a5 
								
							 
						 
						
							
							
								
								silence warning in a cleaner way  
							
							 
							
							... 
							
							
							
							llvm-svn: 96520 
							
						 
						
							2010-02-17 21:42:34 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								999ddbcf8e 
								
							 
						 
						
							
							
								
								Patch to remove arbitrary imporation of 'self' into  
							
							 
							
							... 
							
							
							
							a block without it being used. This causes over release
of objects in certain runtime-senitive apps.
(fixes radar 7581175).
llvm-svn: 96501 
							
						 
						
							2010-02-17 19:54:08 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								586ca163b4 
								
							 
						 
						
							
							
								
								Did not intend to check this in.  
							
							 
							
							... 
							
							
							
							llvm-svn: 96486 
							
						 
						
							2010-02-17 18:11:55 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								c0309cd3d1 
								
							 
						 
						
							
							
								
								Use proper lexcial context for newly added ivars.  
							
							 
							
							... 
							
							
							
							llvm-svn: 96484 
							
						 
						
							2010-02-17 18:10:54 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								231461f88f 
								
							 
						 
						
							
							
								
								Make FinalOverriders handle virtual bases correctly. Unfortunately this can't be tested just yet.  
							
							 
							
							... 
							
							
							
							llvm-svn: 96481 
							
						 
						
							2010-02-17 17:48:25 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								d2fd302726 
								
							 
						 
						
							
							
								
								Handle primary bases in AddVCallOffsets.  
							
							 
							
							... 
							
							
							
							llvm-svn: 96461 
							
						 
						
							2010-02-17 06:30:02 +00:00  
						
					 
				
					
						
							
							
								 
								Chandler Carruth
							
						 
						
							 
							
							
							
							
								
							
							
								c20a9586c4 
								
							 
						 
						
							
							
								
								Silence GCC warning by marking an assert-only variable as unused.  
							
							 
							
							... 
							
							
							
							llvm-svn: 96459 
							
						 
						
							2010-02-17 06:24:18 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								b0a588f038 
								
							 
						 
						
							
							
								
								First cut at emitting vcall offsets.  
							
							 
							
							... 
							
							
							
							llvm-svn: 96455 
							
						 
						
							2010-02-17 06:07:19 +00:00  
						
					 
				
					
						
							
							
								 
								John McCall
							
						 
						
							 
							
							
							
							
								
							
							
								67cea74745 
								
							 
						 
						
							
							
								
								Emit complete constructors and destructors as aliases to base constructors  
							
							 
							
							... 
							
							
							
							and destructors when the two entities are semantically identical, i.e. when
the class has no virtual base classes.  We only do this for linkage types
for which aliases are supported, i.e. internal and external, i.e. not linkonce.
llvm-svn: 96451 
							
						 
						
							2010-02-17 03:52:49 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								db042200c0 
								
							 
						 
						
							
							
								
								Pass through whether a base is virtual or not.  
							
							 
							
							... 
							
							
							
							llvm-svn: 96449 
							
						 
						
							2010-02-17 03:11:55 +00:00  
						
					 
				
					
						
							
							
								 
								Sanjiv Gupta
							
						 
						
							 
							
							
							
							
								
							
							
								ba1e267a4c 
								
							 
						 
						
							
							
								
								implement EmitVAArg. pretty much the same way other targets do.  
							
							 
							
							... 
							
							
							
							llvm-svn: 96446 
							
						 
						
							2010-02-17 02:25:52 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								03db9e9cd3 
								
							 
						 
						
							
							
								
								Correctly calculate base offsets for 'this' pointer adjustments involving virtual bases. This can't be tested yet due to lack of vcall offsets :)  
							
							 
							
							... 
							
							
							
							llvm-svn: 96441 
							
						 
						
							2010-02-17 02:05:23 +00:00  
						
					 
				
					
						
							
							
								 
								John McCall
							
						 
						
							 
							
							
							
							
								
							
							
								347132b32f 
								
							 
						 
						
							
							
								
								IRgen optimization:  cache the value of 'this' and 'vtt' instead of  
							
							 
							
							... 
							
							
							
							repeatedly reloading from an alloca.  We still need to create the alloca
for debug info purposes (although we currently create it in all cases
because of some abstraction boundaries that're hard to break down).
llvm-svn: 96403 
							
						 
						
							2010-02-16 22:04:33 +00:00  
						
					 
				
					
						
							
							
								 
								Devang Patel
							
						 
						
							 
							
							
							
							
								
							
							
								7585580ccc 
								
							 
						 
						
							
							
								
								Distinguish two lexical blocks at the same level.  
							
							 
							
							... 
							
							
							
							llvm-svn: 96397 
							
						 
						
							2010-02-16 21:41:20 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								fd09df7839 
								
							 
						 
						
							
							
								
								IRgen: Switch 'retval' to use CreateIRTemp.  
							
							 
							
							... 
							
							
							
							llvm-svn: 96376 
							
						 
						
							2010-02-16 19:45:20 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								d004918ccb 
								
							 
						 
						
							
							
								
								IRgen: Add CreateIRTemp, which creates a temporary alloca but with type converted "not-for-memory". Dunno a better name.  
							
							 
							
							... 
							
							
							
							llvm-svn: 96374 
							
						 
						
							2010-02-16 19:44:13 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								27bacafb71 
								
							 
						 
						
							
							
								
								IRgen: Switch EmitCompoundLiteralLValue to use CreateMemTemp.  
							
							 
							
							... 
							
							
							
							llvm-svn: 96373 
							
						 
						
							2010-02-16 19:43:39 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								13f0f66223 
								
							 
						 
						
							
							
								
								Handle layout of vtables for virtual bases.  
							
							 
							
							... 
							
							
							
							llvm-svn: 96355 
							
						 
						
							2010-02-16 16:49:35 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								b716a543c9 
								
							 
						 
						
							
							
								
								Move some code around in preparation for virtual base vtables.  
							
							 
							
							... 
							
							
							
							llvm-svn: 96354 
							
						 
						
							2010-02-16 16:26:28 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								14157939ab 
								
							 
						 
						
							
							
								
								Fix a bug where we would not emit secondary vtables for bases of a primary base.  
							
							 
							
							... 
							
							
							
							llvm-svn: 96351 
							
						 
						
							2010-02-16 16:02:57 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								77904f1d5b 
								
							 
						 
						
							
							
								
								Emit vbase offsets.  
							
							 
							
							... 
							
							
							
							llvm-svn: 96329 
							
						 
						
							2010-02-16 04:59:55 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								dc2dba306c 
								
							 
						 
						
							
							
								
								More work on the new layout code.  
							
							 
							
							... 
							
							
							
							llvm-svn: 96328 
							
						 
						
							2010-02-16 04:49:44 +00:00  
						
					 
				
					
						
							
							
								 
								John McCall
							
						 
						
							 
							
							
							
							
								
							
							
								6ce747220a 
								
							 
						 
						
							
							
								
								When emitting complete destructors for classes with virtual bases, compute  
							
							 
							
							... 
							
							
							
							the offset to the virtual bases statically inside of relying on the virtual
base offsets in the object's vtable(s).  This is both more efficient and
sound against the destructor's manipulation of the vtables.
Also extract a few helper routines.
Oh and we seem to pass all tests with an optimized clang now.
llvm-svn: 96327 
							
						 
						
							2010-02-16 04:15:37 +00:00  
						
					 
				
					
						
							
							
								 
								Devang Patel
							
						 
						
							 
							
							
							
							
								
							
							
								e8814ce0a6 
								
							 
						 
						
							
							
								
								Use getLocStart(), instead of getLocEnd(), to record starting location of objc method. :)  
							
							 
							
							... 
							
							
							
							llvm-svn: 96245 
							
						 
						
							2010-02-15 18:08:38 +00:00  
						
					 
				
					
						
							
							
								 
								Duncan Sands
							
						 
						
							 
							
							
							
							
								
							
							
								998f9d975b 
								
							 
						 
						
							
							
								
								Uniformize the names of type predicates: rather than having isFloatTy and  
							
							 
							
							... 
							
							
							
							isInteger, we now have isFloatTy and isIntegerTy.  Requested by Chris!
llvm-svn: 96224 
							
						 
						
							2010-02-15 16:14:01 +00:00  
						
					 
				
					
						
							
							
								 
								John McCall
							
						 
						
							 
							
							
							
							
								
							
							
								7538eec67b 
								
							 
						 
						
							
							
								
								When emitting an aggregate into a temporary, make sure we set the alignment  
							
							 
							
							... 
							
							
							
							on the alloca.
The fact that codegen makes this class of bug so wonderfully easy to make is
embarrassing.
llvm-svn: 96204 
							
						 
						
							2010-02-15 01:23:36 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								033d48697f 
								
							 
						 
						
							
							
								
								Don't compute final overriders or build vtables for bases that don't need a vtable.  
							
							 
							
							... 
							
							
							
							llvm-svn: 96171 
							
						 
						
							2010-02-14 17:05:59 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								073a0c88cc 
								
							 
						 
						
							
							
								
								Build fix.  
							
							 
							
							... 
							
							
							
							llvm-svn: 96140 
							
						 
						
							2010-02-14 00:44:19 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								6a7e6a4c3c 
								
							 
						 
						
							
							
								
								Baby steps towards teaching FinalOverriders about virtual bases.  
							
							 
							
							... 
							
							
							
							llvm-svn: 96139 
							
						 
						
							2010-02-14 00:37:35 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								1888b44988 
								
							 
						 
						
							
							
								
								Don't try to layout construction vtables for now.  
							
							 
							
							... 
							
							
							
							llvm-svn: 96138 
							
						 
						
							2010-02-14 00:22:59 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								258a1e35e8 
								
							 
						 
						
							
							
								
								Improve support for non-virtual 'this' pointer adjustments. With this, it should be possible to use the new vtable layout code for all class hierarchies that do not involve virtual bases.  
							
							 
							
							... 
							
							
							
							llvm-svn: 96137 
							
						 
						
							2010-02-14 00:16:19 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								d3adb0ced9 
								
							 
						 
						
							
							
								
								Add basic support for simple non-virtual 'this' pointer adjustments.  
							
							 
							
							... 
							
							
							
							llvm-svn: 96136 
							
						 
						
							2010-02-13 23:40:17 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								cce9ee8970 
								
							 
						 
						
							
							
								
								Add support for very simple non-virtual this adjustments in the FinalOverriders class.  
							
							 
							
							... 
							
							
							
							llvm-svn: 96133 
							
						 
						
							2010-02-13 23:17:31 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								c809cbdc3f 
								
							 
						 
						
							
							
								
								Cleanup; remove some duplicated code.  
							
							 
							
							... 
							
							
							
							llvm-svn: 96131 
							
						 
						
							2010-02-13 22:39:18 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								a678aa1e51 
								
							 
						 
						
							
							
								
								Assert if we encounter this adjustments.  
							
							 
							
							... 
							
							
							
							llvm-svn: 96125 
							
						 
						
							2010-02-13 22:23:31 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								e75aaa97b3 
								
							 
						 
						
							
							
								
								Start laying out secondary vtables.  
							
							 
							
							... 
							
							
							
							llvm-svn: 96123 
							
						 
						
							2010-02-13 22:05:23 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								3f9917de6e 
								
							 
						 
						
							
							
								
								Merge base offsets and dump them.  
							
							 
							
							... 
							
							
							
							llvm-svn: 96121 
							
						 
						
							2010-02-13 21:33:22 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								c1290adab7 
								
							 
						 
						
							
							
								
								Don't make return adjustments for pure virtual member functions.  
							
							 
							
							... 
							
							
							
							llvm-svn: 96120 
							
						 
						
							2010-02-13 21:16:54 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								cf5a882da1 
								
							 
						 
						
							
							
								
								Handle virtual bases in return adjustment types.  
							
							 
							
							... 
							
							
							
							llvm-svn: 96119 
							
						 
						
							2010-02-13 21:07:32 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								f3f67846c8 
								
							 
						 
						
							
							
								
								Handle virtual bases in ComputeBaseOffset.  
							
							 
							
							... 
							
							
							
							llvm-svn: 96117 
							
						 
						
							2010-02-13 20:41:15 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								6a6cbfc55f 
								
							 
						 
						
							
							
								
								More work on covariant return types. We now handle non-virtual adjustments fine.  
							
							 
							
							... 
							
							
							
							llvm-svn: 96114 
							
						 
						
							2010-02-13 20:11:51 +00:00  
						
					 
				
					
						
							
							
								 
								Charles Davis
							
						 
						
							 
							
							
							
							
								
							
							
								4ea31ab369 
								
							 
						 
						
							
							
								
								Emit the 'alignstack' LLVM function attribute when we encounter a function  
							
							 
							
							... 
							
							
							
							marked 'force_align_arg_pointer'. Almost there; now all I need to do is finish
up the backend.
llvm-svn: 96100 
							
						 
						
							2010-02-13 15:54:06 +00:00  
						
					 
				
					
						
							
							
								 
								Chandler Carruth
							
						 
						
							 
							
							
							
							
								
							
							
								a932bbca75 
								
							 
						 
						
							
							
								
								Fix think-o, attributes can't come *within* the type of the variable.  
							
							 
							
							... 
							
							
							
							llvm-svn: 96099 
							
						 
						
							2010-02-13 10:42:55 +00:00  
						
					 
				
					
						
							
							
								 
								Chandler Carruth
							
						 
						
							 
							
							
							
							
								
							
							
								94eab4ad04 
								
							 
						 
						
							
							
								
								Silence unused variable warning in a build without assertions.  
							
							 
							
							... 
							
							
							
							llvm-svn: 96098 
							
						 
						
							2010-02-13 10:38:52 +00:00  
						
					 
				
					
						
							
							
								 
								Benjamin Kramer
							
						 
						
							 
							
							
							
							
								
							
							
								e047e11189 
								
							 
						 
						
							
							
								
								Remove dead {include, semicolon, variable}.  
							
							 
							
							... 
							
							
							
							llvm-svn: 96087 
							
						 
						
							2010-02-13 09:15:07 +00:00  
						
					 
				
					
						
							
							
								 
								Benjamin Kramer
							
						 
						
							 
							
							
							
							
								
							
							
								02c673781d 
								
							 
						 
						
							
							
								
								Use a different name for this iterator. MSVC and clang++ didn't like "I" in the same scope twice.  
							
							 
							
							... 
							
							
							
							llvm-svn: 96086 
							
						 
						
							2010-02-13 09:11:28 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								eee53d9c06 
								
							 
						 
						
							
							
								
								More work on return type adjustments in the new vtable builder.  
							
							 
							
							... 
							
							
							
							llvm-svn: 96070 
							
						 
						
							2010-02-13 02:02:03 +00:00  
						
					 
				
					
						
							
							
								 
								John McCall
							
						 
						
							 
							
							
							
							
								
							
							
								ef3057c419 
								
							 
						 
						
							
							
								
								Switch the standard DeclarationName comparator to be a tri-valued comparator.  
							
							 
							
							... 
							
							
							
							Use that while fixing a nasty misuse of qsort in vtable codegen which, somehow,
has not actually caused a crash.
llvm-svn: 96062 
							
						 
						
							2010-02-13 01:04:05 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								18c28f6cdc 
								
							 
						 
						
							
							
								
								if-0 out printf.  
							
							 
							
							... 
							
							
							
							llvm-svn: 96052 
							
						 
						
							2010-02-13 00:03:21 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								0760481f26 
								
							 
						 
						
							
							
								
								Fix a refacto that broke the clang-on-clang build.  
							
							 
							
							... 
							
							
							
							llvm-svn: 95994 
							
						 
						
							2010-02-12 18:14:46 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								5272c2574a 
								
							 
						 
						
							
							
								
								Start stubbing out more of the covariant thunk support.  
							
							 
							
							... 
							
							
							
							llvm-svn: 95990 
							
						 
						
							2010-02-12 17:37:14 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								8e661e15f2 
								
							 
						 
						
							
							
								
								Keep track of whether a final overrider needs a return type adjustment.  
							
							 
							
							... 
							
							
							
							llvm-svn: 95985 
							
						 
						
							2010-02-12 17:13:23 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								136bd19224 
								
							 
						 
						
							
							
								
								Move overrider out into a separate struct.  
							
							 
							
							... 
							
							
							
							llvm-svn: 95984 
							
						 
						
							2010-02-12 16:55:34 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								e8a9756e63 
								
							 
						 
						
							
							
								
								Keep track of the address points for all primary bases, and add the ability to dump multiple address points for a single offset.  
							
							 
							
							... 
							
							
							
							llvm-svn: 95970 
							
						 
						
							2010-02-12 07:43:48 +00:00  
						
					 
				
					
						
							
							
								 
								John McCall
							
						 
						
							 
							
							
							
							
								
							
							
								84c416b9f6 
								
							 
						 
						
							
							
								
								Fix a bug causing an assertion when a covariant return type differed from  
							
							 
							
							... 
							
							
							
							an overriden type only by reduced qualification.
llvm-svn: 95968 
							
						 
						
							2010-02-12 06:15:07 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								65b4978f7f 
								
							 
						 
						
							
							
								
								More work on vtable layout. We can now layout vtables with primary bases.  
							
							 
							
							... 
							
							
							
							llvm-svn: 95965 
							
						 
						
							2010-02-12 05:25:12 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								09da3372b6 
								
							 
						 
						
							
							
								
								When dumping vtables, dump whether a virtual member function is pure or not.  
							
							 
							
							... 
							
							
							
							llvm-svn: 95963 
							
						 
						
							2010-02-12 02:38:13 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								9fbf6d95f6 
								
							 
						 
						
							
							
								
								More work on the final overriders.  
							
							 
							
							... 
							
							
							
							llvm-svn: 95954 
							
						 
						
							2010-02-12 01:40:03 +00:00  
						
					 
				
					
						
							
							
								 
								Devang Patel
							
						 
						
							 
							
							
							
							
								
							
							
								f4df65cf60 
								
							 
						 
						
							
							
								
								Do not ignore anonymous records.  
							
							 
							
							... 
							
							
							
							llvm-svn: 95953 
							
						 
						
							2010-02-12 01:31:06 +00:00  
						
					 
				
					
						
							
							
								 
								Devang Patel
							
						 
						
							 
							
							
							
							
								
							
							
								e003dd1721 
								
							 
						 
						
							
							
								
								Cache new compile unit.  
							
							 
							
							... 
							
							
							
							llvm-svn: 95952 
							
						 
						
							2010-02-12 01:30:31 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								e8ac42ad5c 
								
							 
						 
						
							
							
								
								Stub out the final overriders class.  
							
							 
							
							... 
							
							
							
							llvm-svn: 95922 
							
						 
						
							2010-02-11 21:24:32 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								dd27b5d7bb 
								
							 
						 
						
							
							
								
								Use getAs instead of cast/dyn_cast on types. (I'm sure Doug will appreciate this).  
							
							 
							
							... 
							
							
							
							llvm-svn: 95911 
							
						 
						
							2010-02-11 19:45:15 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								727ffb14a1 
								
							 
						 
						
							
							
								
								Move two functions to the top. No functionality change.  
							
							 
							
							... 
							
							
							
							llvm-svn: 95908 
							
						 
						
							2010-02-11 19:39:49 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								5bd8d19291 
								
							 
						 
						
							
							
								
								More vtable layout dumper improvements. Handle destructors, dump the complete function type of the member functions (using PredefinedExpr::ComputeName.  
							
							 
							
							... 
							
							
							
							llvm-svn: 95887 
							
						 
						
							2010-02-11 18:20:28 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								932c2f2a9a 
								
							 
						 
						
							
							
								
								Keep track of, and dump, vtable address points.  
							
							 
							
							... 
							
							
							
							llvm-svn: 95874 
							
						 
						
							2010-02-11 17:18:51 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								5d40c6f658 
								
							 
						 
						
							
							
								
								Check in the beginnings of my new vtable layout builder idea.  
							
							 
							
							... 
							
							
							
							Right now, it's off by default but can be tested by passing -fdump-vtable-layouts to clang -cc1. This option will cause all vtables that will normally be emitted as part of codegen to also be dumped using the new layout code.
I've also added a very simple new vtable layout test case.
llvm-svn: 95865 
							
						 
						
							2010-02-11 08:02:13 +00:00  
						
					 
				
					
						
							
							
								 
								Ted Kremenek
							
						 
						
							 
							
							
							
							
								
							
							
								7f4945aa9c 
								
							 
						 
						
							
							
								
								Remove use of 'std::string' from Attr objects, using instead a byte  
							
							 
							
							... 
							
							
							
							array allocated using the allocator in ASTContext.  This addresses
these strings getting leaked when using a BumpPtrAllocator (in
ASTContext).
Fixes: <rdar://problem/7636765>
llvm-svn: 95853 
							
						 
						
							2010-02-11 05:28:37 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								d505812422 
								
							 
						 
						
							
							
								
								Eliminate a bunch of unnecessary ASTContexts from members functions of  
							
							 
							
							... 
							
							
							
							Decl subclasses. No functionality change.
llvm-svn: 95841 
							
						 
						
							2010-02-11 01:19:42 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								0a5a2216e2 
								
							 
						 
						
							
							
								
								Eliminate the ASTContext parameter from RecordDecl::getDefinition()  
							
							 
							
							... 
							
							
							
							and CXXRecordDecl::getDefinition(); it's totally unnecessary. No
functionality change.
llvm-svn: 95836 
							
						 
						
							2010-02-11 01:04:33 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								989908fbac 
								
							 
						 
						
							
							
								
								Generate the objc_read_weak API when calling  
							
							 
							
							... 
							
							
							
							a __weak block. Fixes radar 7628591.
llvm-svn: 95822 
							
						 
						
							2010-02-10 23:34:57 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								c55042c20f 
								
							 
						 
						
							
							
								
								hopefully silence a warning on the clang-i386-darwin9 tester.  
							
							 
							
							... 
							
							
							
							llvm-svn: 95812 
							
						 
						
							2010-02-10 21:41:43 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								3241d400c8 
								
							 
						 
						
							
							
								
								Switch to using -fsjlj-exceptions instead of hard-coding it. Notably, this fixes  
							
							 
							
							... 
							
							
							
							calls to the UnwindResumeOrRethrow function for C++/Obj-C exception handling,
for Darwin ARM.
llvm-svn: 95787 
							
						 
						
							2010-02-10 18:49:11 +00:00  
						
					 
				
					
						
							
							
								 
								Devang Patel
							
						 
						
							 
							
							
							
							
								
							
							
								535fdaf020 
								
							 
						 
						
							
							
								
								Refactor code that generates debug info for variables that has BlocksAttr.  
							
							 
							
							... 
							
							
							
							llvm-svn: 95786 
							
						 
						
							2010-02-10 18:49:08 +00:00  
						
					 
				
					
						
							
							
								 
								Devang Patel
							
						 
						
							 
							
							
							
							
								
							
							
								1b5330afe9 
								
							 
						 
						
							
							
								
								Use current location as the location of compiler generated arguments, e.g. self, _cmd etc.  
							
							 
							
							... 
							
							
							
							llvm-svn: 95743 
							
						 
						
							2010-02-10 01:09:50 +00:00  
						
					 
				
					
						
							
							
								 
								Benjamin Kramer
							
						 
						
							 
							
							
							
							
								
							
							
								f3a499ad88 
								
							 
						 
						
							
							
								
								StringRefize two random methods, remove a dead variable and a weird constructor call.  
							
							 
							
							... 
							
							
							
							This maybe fixes some of the errors GCC 4.5 gives on this code.
llvm-svn: 95684 
							
						 
						
							2010-02-09 19:31:24 +00:00  
						
					 
				
					
						
							
							
								 
								Devang Patel
							
						 
						
							 
							
							
							
							
								
							
							
								0ae70d16b8 
								
							 
						 
						
							
							
								
								Fix virtual bases' debug info.  
							
							 
							
							... 
							
							
							
							llvm-svn: 95678 
							
						 
						
							2010-02-09 19:09:28 +00:00  
						
					 
				
					
						
							
							
								 
								Devang Patel
							
						 
						
							 
							
							
							
							
								
							
							
								cce7e85165 
								
							 
						 
						
							
							
								
								Mark  implicit "this" argument as an artificial argument.  
							
							 
							
							... 
							
							
							
							llvm-svn: 95673 
							
						 
						
							2010-02-09 17:57:50 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								a7566f163a 
								
							 
						 
						
							
							
								
								IRgen: Add CreateMemTemp, for creating an temporary memory object for a particular type, and flood fill. - CreateMemTemp sets the alignment on the alloca correctly, which fixes a great many places in IRgen where we were doing the wrong thing.  
							
							 
							
							... 
							
							
							
							- This fixes many many more places than the test case, but my feeling is we need to audit alignment systematically so I'm not inclined to try hard to test the individual fixes in this patch. If this bothers you, patches welcome!
PR6240.
llvm-svn: 95648 
							
						 
						
							2010-02-09 02:48:28 +00:00  
						
					 
				
					
						
							
							
								 
								Jakob Stoklund Olesen
							
						 
						
							 
							
							
							
							
								
							
							
								819e54b65c 
								
							 
						 
						
							
							
								
								Pass inline keyword to optimizer as the new InlineHint function attribute.  
							
							 
							
							... 
							
							
							
							At the moment the inlinehint attribute is ignored by the Inliner unless you
pass a -respect-inlinehint option.  This will soon be the default.
The inlinehint attribute is set if the inline keyword is explicitly specified
on any declaration.
llvm-svn: 95623 
							
						 
						
							2010-02-09 00:10:00 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								3d33fab7fc 
								
							 
						 
						
							
							
								
								Reapply r95393, without the change to CGExpr. I was wrong in assuming that the  
							
							 
							
							... 
							
							
							
							element type always matched the converted LLVM type for ExprType.
llvm-svn: 95596 
							
						 
						
							2010-02-08 22:53:07 +00:00  
						
					 
				
					
						
							
							
								 
								John McCall
							
						 
						
							 
							
							
							
							
								
							
							
								340aafaac6 
								
							 
						 
						
							
							
								
								Emit global references with constant initializers as constants.  Fixes PR5585.  
							
							 
							
							... 
							
							
							
							The standard actually says that such references should have internal linkage,
but gcc doesn't do that, so we probably can't get away with it.
llvm-svn: 95577 
							
						 
						
							2010-02-08 21:46:50 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								ff8cce4395 
								
							 
						 
						
							
							
								
								Make sure to set vtable pointers in the destructors as well.  
							
							 
							
							... 
							
							
							
							llvm-svn: 95525 
							
						 
						
							2010-02-07 19:45:40 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								6d0e5bd8f3 
								
							 
						 
						
							
							
								
								Use the right type when taking the address of a non-virtual member function pointer. Fixes PR6258.  
							
							 
							
							... 
							
							
							
							llvm-svn: 95524 
							
						 
						
							2010-02-07 17:37:13 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								cee2d2f016 
								
							 
						 
						
							
							
								
								Use the right linkage for static variables inside C++ inline functions.  
							
							 
							
							... 
							
							
							
							llvm-svn: 95512 
							
						 
						
							2010-02-07 02:03:08 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								10d369d1a2 
								
							 
						 
						
							
							
								
								Improved handling of the visibility attribute. Declarations now inherit their parent's visibility.  
							
							 
							
							... 
							
							
							
							(This is kind of a risky change, but I did a self-host build and everything appears to work fine!)
llvm-svn: 95511 
							
						 
						
							2010-02-07 01:44:36 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								9878f9f73b 
								
							 
						 
						
							
							
								
								Make EmitStartEHSpec and EmitEndEHSpec return early when exceptions are disabled.  
							
							 
							
							... 
							
							
							
							llvm-svn: 95509 
							
						 
						
							2010-02-06 23:59:05 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								fcd764a168 
								
							 
						 
						
							
							
								
								Add support for threadsafe statics, and make them the default (matching gcc).  
							
							 
							
							... 
							
							
							
							Daniel, I'd appreciate a review of the driver/cc1 parts.
llvm-svn: 95508 
							
						 
						
							2010-02-06 23:23:06 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								5ade5d39b4 
								
							 
						 
						
							
							
								
								Call destructors for constructed bases as well.  
							
							 
							
							... 
							
							
							
							llvm-svn: 95502 
							
						 
						
							2010-02-06 20:00:21 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								ba63167b64 
								
							 
						 
						
							
							
								
								If a constructor throws an exception we need to execute the destructors for all fully constructed members. Fixes ctor_dtor_count.cpp in the test suite.  
							
							 
							
							... 
							
							
							
							llvm-svn: 95501 
							
						 
						
							2010-02-06 19:50:17 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								61f6db54e1 
								
							 
						 
						
							
							
								
								Switch CodeGen's "is this variable declaration a definition?" logic  
							
							 
							
							... 
							
							
							
							over to VarDecl::isThisDeclarationADefinition(), which handles
variables declared with linkage specifications better (among other
things). CMake 2.9 (from CVS) now builds with clang++ and is somewhat
functional.
llvm-svn: 95486 
							
						 
						
							2010-02-06 05:15:45 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								2c4de4c31e 
								
							 
						 
						
							
							
								
								Only append 'L' for internal variable declarations, not all declarations. (Found by the mangle checker, yay)  
							
							 
							
							... 
							
							
							
							llvm-svn: 95485 
							
						 
						
							2010-02-06 04:52:27 +00:00  
						
					 
				
					
						
							
							
								 
								Ted Kremenek
							
						 
						
							 
							
							
							
							
								
							
							
								9c193965ba 
								
							 
						 
						
							
							
								
								Remove unused variable.  
							
							 
							
							... 
							
							
							
							llvm-svn: 95476 
							
						 
						
							2010-02-06 03:29:18 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								6710c5351e 
								
							 
						 
						
							
							
								
								Use the correct function info for constructors when applying function attributes. Fixes PR6245.  
							
							 
							
							... 
							
							
							
							llvm-svn: 95474 
							
						 
						
							2010-02-06 02:44:09 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								cae03b1e6d 
								
							 
						 
						
							
							
								
								Assert when we try to mangle a dependent template name, rather than  
							
							 
							
							... 
							
							
							
							crashing unceremoniously.
llvm-svn: 95464 
							
						 
						
							2010-02-06 01:09:36 +00:00  
						
					 
				
					
						
							
							
								 
								John McCall
							
						 
						
							 
							
							
							
							
								
							
							
								ca972cd1f1 
								
							 
						 
						
							
							
								
								Rearrange some checks to avoid call to isCopyConstructor() and clarify path  
							
							 
							
							... 
							
							
							
							taken for non-trivial constructors.
llvm-svn: 95457 
							
						 
						
							2010-02-06 00:25:16 +00:00  
						
					 
				
					
						
							
							
								 
								John McCall
							
						 
						
							 
							
							
							
							
								
							
							
								ab26cfa58d 
								
							 
						 
						
							
							
								
								Standardize the parsing of function type attributes in a way that  
							
							 
							
							... 
							
							
							
							follows (as conservatively as possible) gcc's current behavior:  attributes
written on return types that don't apply there are applied to the function
instead, etc.  Only parse CC attributes as type attributes, not as decl attributes;
don't accepet noreturn as a decl attribute on ValueDecls, either (it still
needs to apply to other decls, like blocks).  Consistently consume CC/noreturn
information throughout codegen;  enforce this by removing their default values
in CodeGenTypes::getFunctionInfo().
llvm-svn: 95436 
							
						 
						
							2010-02-05 21:31:56 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								a643780483 
								
							 
						 
						
							
							
								
								Revert r95393, which broke Clang's self-host.  
							
							 
							
							... 
							
							
							
							llvm-svn: 95430 
							
						 
						
							2010-02-05 21:10:36 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								a16b0cae9a 
								
							 
						 
						
							
							
								
								Implement name mangling for template template parameters  
							
							 
							
							... 
							
							
							
							llvm-svn: 95427 
							
						 
						
							2010-02-05 20:45:00 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								9c4e4651d5 
								
							 
						 
						
							
							
								
								IRgen: A few more ConvertType cleanups.  
							
							 
							
							... 
							
							
							
							llvm-svn: 95423 
							
						 
						
							2010-02-05 20:02:42 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								d0bc7b9d13 
								
							 
						 
						
							
							
								
								IRgen: Factor out EmitAggExprToLValue.  
							
							 
							
							... 
							
							
							
							llvm-svn: 95416 
							
						 
						
							2010-02-05 19:38:31 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								df506b934e 
								
							 
						 
						
							
							
								
								Fix a code gen bug accessing 'isa' field via a message call  
							
							 
							
							... 
							
							
							
							(Fixes radar 7609722).
llvm-svn: 95406 
							
						 
						
							2010-02-05 19:18:30 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								8848175547 
								
							 
						 
						
							
							
								
								IRgen: Fix some CreateTempAlloca calls to use ConvertTypeForMem when that is  
							
							 
							
							... 
							
							
							
							conceptually correct. Review appreciated (Chris, Eli, Anders).
llvm-svn: 95401 
							
						 
						
							2010-02-05 18:56:49 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								cb86e1088a 
								
							 
						 
						
							
							
								
								Fix the bug that was breaking self-host, and re-land the static ctor fixes.  
							
							 
							
							... 
							
							
							
							llvm-svn: 95400 
							
						 
						
							2010-02-05 18:38:45 +00:00  
						
					 
				
					
						
							
							
								 
								Charles Davis
							
						 
						
							 
							
							
							
							
								
							
							
								5a5473f0f8 
								
							 
						 
						
							
							
								
								Now that we store calling conventions in the types, use them instead of  
							
							 
							
							... 
							
							
							
							getting the calling convention from the target function, which may or may not
exist. Fixes PR5280.
llvm-svn: 95399 
							
						 
						
							2010-02-05 18:13:10 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								363589bded 
								
							 
						 
						
							
							
								
								IRgen: Use hasAggregateLLVMType instead of isSingleValueType() for cases that  
							
							 
							
							... 
							
							
							
							need to deal with aggregates specially; this is consistent with the rest of IRgen.
Also, simplify EmitParmDecl and don't worry about using Decl::getNameAsString.
llvm-svn: 95393 
							
						 
						
							2010-02-05 17:51:33 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								af77cd220a 
								
							 
						 
						
							
							
								
								Revert r95363 and r95375, which broke self-host.  
							
							 
							
							... 
							
							
							
							llvm-svn: 95389 
							
						 
						
							2010-02-05 16:18:08 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								c6eec40189 
								
							 
						 
						
							
							
								
								Check in a mangle checker that's turned off by default.  
							
							 
							
							... 
							
							
							
							llvm-svn: 95377 
							
						 
						
							2010-02-05 07:31:37 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								893555ce66 
								
							 
						 
						
							
							
								
								Fix array initialization test.  
							
							 
							
							... 
							
							
							
							llvm-svn: 95375 
							
						 
						
							2010-02-05 07:00:11 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								ecac409cb0 
								
							 
						 
						
							
							
								
								If a global initializer has a non-trivial destructor it can't be emitted as a constant (even if it has a trivial constructor).  
							
							 
							
							... 
							
							
							
							llvm-svn: 95363 
							
						 
						
							2010-02-05 05:19:42 +00:00  
						
					 
				
					
						
							
							
								 
								John McCall
							
						 
						
							 
							
							
							
							
								
							
							
								ae580fede3 
								
							 
						 
						
							
							
								
								Always start tag definitions before completing them.  Assert same.  
							
							 
							
							... 
							
							
							
							Fixes latent and not-so-latent objc++ and blocks++ bugs.
llvm-svn: 95340 
							
						 
						
							2010-02-05 01:33:36 +00:00  
						
					 
				
					
						
							
							
								 
								John McCall
							
						 
						
							 
							
							
							
							
								
							
							
								67da35c832 
								
							 
						 
						
							
							
								
								Extract a common structure for holding information about the definition  
							
							 
							
							... 
							
							
							
							of a C++ record.  Exposed a lot of problems where various routines were
silently doing The Wrong Thing (or The Acceptable Thing in The Wrong Order)
when presented with a non-definition.  Also cuts down on memory usage.
llvm-svn: 95330 
							
						 
						
							2010-02-04 22:26:26 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								824e0613de 
								
							 
						 
						
							
							
								
								When binding an lvalue to a reference, we always need to pop temporaries.  
							
							 
							
							... 
							
							
							
							With this fix, and the other fixes committed today a make check-all with a clang-built LLVM now gives:
Expected Passes    : 6933
Expected Failures  : 46
Unsupported Tests  : 40
Unexpected Failures: 27
which means that we pass 99.96% of all tests :) The resulting 27 tests are all LLVMC tests and seem to be because of differences in the clang and gcc drivers.
llvm-svn: 95313 
							
						 
						
							2010-02-04 17:32:58 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								9b942c65a5 
								
							 
						 
						
							
							
								
								Fix a bug where we would not mark temporaries as conditional when emitting a conditional operator as an lvalue.  
							
							 
							
							... 
							
							
							
							llvm-svn: 95311 
							
						 
						
							2010-02-04 17:26:01 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								ae612d22ac 
								
							 
						 
						
							
							
								
								Rename StartConditionalBranch/FinishConditionalBranch to BeginConditionalBranch/EndConditionalBranch.  
							
							 
							
							... 
							
							
							
							llvm-svn: 95308 
							
						 
						
							2010-02-04 17:18:07 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								c4325486b9 
								
							 
						 
						
							
							
								
								Fix another pointer-to-member function miscompile, this time when trying to call a virtual member function.  
							
							 
							
							... 
							
							
							
							llvm-svn: 95307 
							
						 
						
							2010-02-04 17:08:48 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								7914dad72d 
								
							 
						 
						
							
							
								
								Calculate offset correctly when taking the address of a virtual member function.  
							
							 
							
							... 
							
							
							
							llvm-svn: 95305 
							
						 
						
							2010-02-04 16:38:05 +00:00  
						
					 
				
					
						
							
							
								 
								John McCall
							
						 
						
							 
							
							
							
							
								
							
							
								d061b4429e 
								
							 
						 
						
							
							
								
								Mangle member expressions.  Also invented.  
							
							 
							
							... 
							
							
							
							llvm-svn: 95284 
							
						 
						
							2010-02-04 02:56:29 +00:00  
						
					 
				
					
						
							
							
								 
								John McCall
							
						 
						
							 
							
							
							
							
								
							
							
								11ef09f8b5 
								
							 
						 
						
							
							
								
								Add a cautionary note about the mangling I just invented.  
							
							 
							
							... 
							
							
							
							llvm-svn: 95275 
							
						 
						
							2010-02-04 01:48:38 +00:00  
						
					 
				
					
						
							
							
								 
								John McCall
							
						 
						
							 
							
							
							
							
								
							
							
								09de8ecd88 
								
							 
						 
						
							
							
								
								Add mangling support for calls, sizeof/alignof, constructor calls,  
							
							 
							
							... 
							
							
							
							float literals, and unresolved lookups (which required hand-wavey extensions).
llvm-svn: 95273 
							
						 
						
							2010-02-04 01:42:13 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								45858d2d59 
								
							 
						 
						
							
							
								
								Revert "Numerous changes to selector handling:", this breaks a whole bunch of  
							
							 
							
							... 
							
							
							
							working code, for no apparent reason.
llvm-svn: 95244 
							
						 
						
							2010-02-03 20:11:42 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								66498388a7 
								
							 
						 
						
							
							
								
								Handle reference binding in aggregate initializers. Fixes another 47 tests.  
							
							 
							
							... 
							
							
							
							llvm-svn: 95235 
							
						 
						
							2010-02-03 19:13:55 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								9b92ef90f0 
								
							 
						 
						
							
							
								
								Add a band-aid fix for clang self-hosting. A better fix will follow shortly.  
							
							 
							
							... 
							
							
							
							llvm-svn: 95232 
							
						 
						
							2010-02-03 18:54:13 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								b247350ef7 
								
							 
						 
						
							
							
								
								More cleanup.  
							
							 
							
							... 
							
							
							
							llvm-svn: 95226 
							
						 
						
							2010-02-03 17:33:16 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								3b227bd629 
								
							 
						 
						
							
							
								
								Revert the new reference binding code; I came up with a way simpler solution for the reference binding bug that is preventing self-hosting.  
							
							 
							
							... 
							
							
							
							llvm-svn: 95223 
							
						 
						
							2010-02-03 16:38:03 +00:00  
						
					 
				
					
						
							
							
								 
								David Chisnall
							
						 
						
							 
							
							
							
							
								
							
							
								5bb4efdf3c 
								
							 
						 
						
							
							
								
								First pass at adding GC support for GNU runtime.  GC ivar maps not yet constructed, GC flag not set.  
							
							 
							
							... 
							
							
							
							Please don't try using this yet - the runtime support is still very immature and your code will almost certainly crash if you do.  
llvm-svn: 95222 
							
						 
						
							2010-02-03 15:59:02 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								7dc5c17d92 
								
							 
						 
						
							
							
								
								When a function or variable somehow depends on a type or declaration  
							
							 
							
							... 
							
							
							
							that is in an anonymous namespace, give that function or variable
internal linkage.
This change models an oddity of the C++ standard, where names declared
in an anonymous namespace have external linkage but, because anonymous
namespace are really "uniquely-named" namespaces, the names cannot be
referenced from other translation units. That means that they have
external linkage for semantic analysis, but the only sensible
implementation for code generation is to give them internal
linkage. We now model this notion via the UniqueExternalLinkage
linkage type. There are several changes here:
  - Extended NamedDecl::getLinkage() to produce UniqueExternalLinkage
    when the declaration is in an anonymous namespace.
  - Added Type::getLinkage() to determine the linkage of a type, which
    is defined as the minimum linkage of the types (when we're dealing
    with a compound type that is not a struct/class/union).
  - Extended NamedDecl::getLinkage() to consider the linkage of the
    template arguments and template parameters of function template
    specializations and class template specializations.
  - Taught code generation to rely on NamedDecl::getLinkage() when
    determining the linkage of variables and functions, also
    considering the linkage of the types of those variables and
    functions (C++ only). Map UniqueExternalLinkage to internal
    linkage, taking out the explicit checks for
    isInAnonymousNamespace().
This fixes much of PR5792, which, as discovered by Anders Carlsson, is
actually the reason behind the pass-manager assertion that causes the
majority of clang-on-clang regression test failures. With this fix,
Clang-built-Clang+LLVM passes 88% of its regression tests (up from
67%). The specific numbers are:
LLVM:
  Expected Passes    : 4006
  Expected Failures  : 32
  Unsupported Tests  : 40
  Unexpected Failures: 736
Clang:
  Expected Passes    : 1903
  Expected Failures  : 14
  Unexpected Failures: 75
Overall:
  Expected Passes    : 5909
  Expected Failures  : 46
  Unsupported Tests  : 40
  Unexpected Failures: 811
Still to do:
  - Improve testing
  - Check whether we should allow the presence of types with
  InternalLinkage (in addition to UniqueExternalLinkage) given
  variables/functions internal linkage in C++, as mentioned in
  PR5792. 
  - Determine how expensive the getLinkage() calls are in practice;
  consider caching the result in NamedDecl.
  - Assess the feasibility of Chris's idea in comment #1  of PR5792.
llvm-svn: 95216 
							
						 
						
							2010-02-03 09:33:45 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								eb1e610d00 
								
							 
						 
						
							
							
								
								remove a big chunk of #if 0 code.  
							
							 
							
							... 
							
							
							
							llvm-svn: 95201 
							
						 
						
							2010-02-03 05:28:17 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								db56b919e5 
								
							 
						 
						
							
							
								
								Provide a real fix for PR6199, reverting the old workaround. Here, we  
							
							 
							
							... 
							
							
							
							realize that CXXConstructExpr is always implicit, so we should just
return its argument (if there is only one) rather than directly
invoking the constructor.
llvm-svn: 95192 
							
						 
						
							2010-02-03 03:01:57 +00:00  
						
					 
				
					
						
							
							
								 
								David Chisnall
							
						 
						
							 
							
							
							
							
								
							
							
								92b762e256 
								
							 
						 
						
							
							
								
								Numerous changes to selector handling:  
							
							 
							
							... 
							
							
							
							- Don't use GlobalAliases with non-0 GEPs (GNU runtime) - this was unsupported and LLVM will be generating errors if you do it soon.  This also simplifies the code generated by the GNU runtime a bit.  
- Make GetSelector() return a constant (GNU runtime), not a load of a store of a constant.
- Recognise @selector() expressions as valid static initialisers (as GCC does).
- Add methods to GCObjCRuntime to emit selectors as constants (needed for using @selector() expressions as constants.  These need implementing for the Mac runtimes - I couldn't figure out how to do this, they seem to require a load.
- Store an ObjCMethodDecl in an ObjCSelectorExpr so that we can get at the type information for the selector.  This is needed for generating typed selectors from @selector() expressions (as GCC does).  Ideally, this information should be stored in the Selector, but that would be an invasive change.  We should eventually add checks for common uses of @selector() expressions.  Possibly adding an attribute that can be applied to method args providing the types of a selector so, for example, you'd do something like this:
- (id)performSelector: __attribute__((selector_types(id, SEL, id)))(SEL)
           withObject: (id)object;
Then, any @selector() expressions passed to the method will be check to ensure that it conforms to this signature.  We do this at run time on the GNU runtime already, but it would be nice to do it at compile time on all runtimes.
- Made @selector() expressions emit type info if available and the runtime supports it.
Someone more familiar with the Mac runtime needs to implement the GetConstantSelector() function in CGObjCMac.  This currently just assert()s.
llvm-svn: 95189 
							
						 
						
							2010-02-03 02:09:30 +00:00  
						
					 
				
					
						
							
							
								 
								John McCall
							
						 
						
							 
							
							
							
							
								
							
							
								2adddcae7e 
								
							 
						 
						
							
							
								
								Remove abstract expression kinds from the StmtClass enum.  Update a few users  
							
							 
							
							... 
							
							
							
							appropriately.  Call out a few missing cases in the expression mangler.
llvm-svn: 95176 
							
						 
						
							2010-02-03 00:55:45 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								a71cc15361 
								
							 
						 
						
							
							
								
								Implement promotion for enumeration types.  
							
							 
							
							... 
							
							
							
							WHAT!?!
It turns out that Type::isPromotableIntegerType() was not considering
enumeration types to be promotable, so we would never do the
promotion despite having properly computed the promotion type when the
enum was defined. Various operations on values of enum type just
"worked" because we could still compute the integer rank of an enum
type; the oddity, however, is that operations such as "add an enum and
an unsigned" would often have an enum result type (!). The bug
actually showed up as a spurious -Wformat diagnostic
(<rdar://problem/7595366>), but in theory it could cause miscompiles.
In this commit:
  - Enum types with a promotion type of "int" or "unsigned int" are
  promotable.
  - Tweaked the computation of promotable types for enums
  - For all of the ABIs, treat enum types the same way as their
  underlying types (*not* their promotion types) for argument passing
  and return values
  - Extend the ABI tester with support for enumeration types
llvm-svn: 95117 
							
						 
						
							2010-02-02 20:10:50 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								5dc86337fb 
								
							 
						 
						
							
							
								
								Set the correct vtable pointers _before_ generating code for any member initializers. Fixes about ~2000 clang/LLVM tests in the clang-on-clang build.  
							
							 
							
							... 
							
							
							
							llvm-svn: 95116 
							
						 
						
							2010-02-02 19:58:43 +00:00  
						
					 
				
					
						
							
							
								 
								Chandler Carruth
							
						 
						
							 
							
							
							
							
								
							
							
								173bfe477b 
								
							 
						 
						
							
							
								
								Use the Arg variable rather than re-computing it. This also silences GCC's  
							
							 
							
							... 
							
							
							
							unused variable warning.
llvm-svn: 95085 
							
						 
						
							2010-02-02 12:15:55 +00:00  
						
					 
				
					
						
							
							
								 
								John McCall
							
						 
						
							 
							
							
							
							
								
							
							
								49786a6c31 
								
							 
						 
						
							
							
								
								Codegen CXXConstructExprs with trivial constructors as constants.  
							
							 
							
							... 
							
							
							
							Eliminates a lot of spurious global initializers, fixing PR6205.
llvm-svn: 95077 
							
						 
						
							2010-02-02 08:02:49 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								75b1f959da 
								
							 
						 
						
							
							
								
								Check in a test case and a nasty workaround for PR6199.  
							
							 
							
							... 
							
							
							
							llvm-svn: 95076 
							
						 
						
							2010-02-02 07:10:35 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								e8bfe412ec 
								
							 
						 
						
							
							
								
								Improve handling of emitting 'null' pointers to data members.  
							
							 
							
							... 
							
							
							
							llvm-svn: 95066 
							
						 
						
							2010-02-02 05:17:25 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								259688ce29 
								
							 
						 
						
							
							
								
								Move pointer to data member emission to CodeGenModule and use it in CGExprConstant. Fixes PR5674.  
							
							 
							
							... 
							
							
							
							llvm-svn: 95063 
							
						 
						
							2010-02-02 03:37:46 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								96ebba5770 
								
							 
						 
						
							
							
								
								ARM/APCS: Fix classification of small complex integer types as "integer like".  
							
							 
							
							... 
							
							
							
							llvm-svn: 95030 
							
						 
						
							2010-02-01 23:31:26 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								eedf151cb1 
								
							 
						 
						
							
							
								
								ARM/APCS: Pass Complex types following llvm-gcc.  
							
							 
							
							... 
							
							
							
							llvm-svn: 95029 
							
						 
						
							2010-02-01 23:31:19 +00:00  
						
					 
				
					
						
							
							
								 
								Devang Patel
							
						 
						
							 
							
							
							
							
								
							
							
								ab793231c1 
								
							 
						 
						
							
							
								
								Fix FIXME and surrounding comment.  
							
							 
							
							... 
							
							
							
							llvm-svn: 95023 
							
						 
						
							2010-02-01 22:51:29 +00:00  
						
					 
				
					
						
							
							
								 
								Devang Patel
							
						 
						
							 
							
							
							
							
								
							
							
								e8fb4b7fd6 
								
							 
						 
						
							
							
								
								Use appropriate context descriptor in RecordDecl's debug info.  
							
							 
							
							... 
							
							
							
							llvm-svn: 95016 
							
						 
						
							2010-02-01 22:40:08 +00:00  
						
					 
				
					
						
							
							
								 
								Devang Patel
							
						 
						
							 
							
							
							
							
								
							
							
								3efd1470c9 
								
							 
						 
						
							
							
								
								Do not use clang type name to name a local variable, e.g. Decl.  
							
							 
							
							... 
							
							
							
							llvm-svn: 95010 
							
						 
						
							2010-02-01 21:52:22 +00:00  
						
					 
				
					
						
							
							
								 
								Devang Patel
							
						 
						
							 
							
							
							
							
								
							
							
								1c0954cca7 
								
							 
						 
						
							
							
								
								Do not use clang type name to name a local variable, e.g. Decl.  
							
							 
							
							... 
							
							
							
							llvm-svn: 95009 
							
						 
						
							2010-02-01 21:39:52 +00:00  
						
					 
				
					
						
							
							
								 
								Devang Patel
							
						 
						
							 
							
							
							
							
								
							
							
								7b7f46f5a6 
								
							 
						 
						
							
							
								
								Use DeclContext as getContextDescriptor() argument.  
							
							 
							
							... 
							
							
							
							llvm-svn: 95008 
							
						 
						
							2010-02-01 21:34:11 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								ca5e3eb7f7 
								
							 
						 
						
							
							
								
								NeXT: Add support for -fobjc-legacy-dispatch.  
							
							 
							
							... 
							
							
							
							llvm-svn: 95005 
							
						 
						
							2010-02-01 21:07:33 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								5b5d2db3f6 
								
							 
						 
						
							
							
								
								Don't explicitly force utf strings into the __TEXT,__ustring  
							
							 
							
							... 
							
							
							
							by setting the section of the generated global.  This is an
optimization done by the code generator, and the code being
removed didn't handle the case when the string contained an
embedded nul (which the code generator does correctly 
handle).  This is rdar://7589850
llvm-svn: 95003 
							
						 
						
							2010-02-01 20:59:08 +00:00  
						
					 
				
					
						
							
							
								 
								Sebastian Redl
							
						 
						
							 
							
							
							
							
								
							
							
								5ca7984bb4 
								
							 
						 
						
							
							
								
								In C++, an initializer on a variable doesn't necessarily mean it's the definition. With that in mind, rename getDefinition to getAnyInitializer (to distinguish it from getInit) and reimplement it in terms of isThisDeclarationADefinition. Update all code to use this new function.  
							
							 
							
							... 
							
							
							
							llvm-svn: 94999 
							
						 
						
							2010-02-01 20:16:42 +00:00  
						
					 
				
					
						
							
							
								 
								Devang Patel
							
						 
						
							 
							
							
							
							
								
							
							
								973f2eb0cd 
								
							 
						 
						
							
							
								
								Emit debug info for namespaces.  
							
							 
							
							... 
							
							
							
							llvm-svn: 94991 
							
						 
						
							2010-02-01 19:16:32 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								a682427e42 
								
							 
						 
						
							
							
								
								Switch expressions like T() and T(1,2) over to new-style initialization.  I'm  
							
							 
							
							... 
							
							
							
							not quite sure what we want to do about the AST representation; comments
welcome.
llvm-svn: 94967 
							
						 
						
							2010-01-31 20:58:15 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								604179775a 
								
							 
						 
						
							
							
								
								Simplify EmitMemberInitializer; no intended functionality change.  
							
							 
							
							... 
							
							
							
							llvm-svn: 94965 
							
						 
						
							2010-01-31 19:07:50 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								ab0ddb57b1 
								
							 
						 
						
							
							
								
								Start creating CXXBindReferenceExpr nodes when binding complex types to references.  
							
							 
							
							... 
							
							
							
							llvm-svn: 94964 
							
						 
						
							2010-01-31 18:34:51 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								7ae2d7758f 
								
							 
						 
						
							
							
								
								Rework base and member initialization in constructors, with several  
							
							 
							
							... 
							
							
							
							(necessarily simultaneous) changes:
  - CXXBaseOrMemberInitializer now contains only a single initializer
    rather than a set of initialiation arguments + a constructor. The
    single initializer covers all aspects of initialization, including
    constructor calls as necessary but also cleanup of temporaries
    created by the initializer (which we never handled
    before!).
  - Rework + simplify code generation for CXXBaseOrMemberInitializers,
    since we can now just emit the initializer as an initializer.
  - Switched base and member initialization over to the new
    initialization code (InitializationSequence), so that it
  - Improved diagnostics for the new initialization code when
    initializing bases and members, to match the diagnostics produced
    by the previous (special-purpose) code.
  - Simplify the representation of type-checked constructor initializers in
    templates; instead of keeping the fully-type-checked AST, which is
    rather hard to undo at template instantiation time, throw away the
    type-checked AST and store the raw expressions in the AST. This
    simplifies instantiation, but loses a little but of information in
    the AST.
  - When type-checking implicit base or member initializers within a
    dependent context, don't add the generated initializers into the
    AST, because they'll look like they were explicit.
  - Record in CXXConstructExpr when the constructor call is to
  initialize a base class, so that CodeGen does not have to infer it
  from context. This ensures that we call the right kind of
  constructor.
There are also a few "opportunity" fixes here that were needed to not
regress, for example:
  - Diagnose default-initialization of a const-qualified class that
    does not have a user-declared default constructor. We had this
    diagnostic specifically for bases and members, but missed it for
    variables. That's fixed now.
  - When defining the implicit constructors, destructor, and
    copy-assignment operator, set the CurContext to that constructor
    when we're defining the body.
llvm-svn: 94952 
							
						 
						
							2010-01-31 09:12:51 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								6276b2506d 
								
							 
						 
						
							
							
								
								When performing a derived-to-base cast that we know will not change the offset, we don't need to null check the input pointer. Fixes PR5965.  
							
							 
							
							... 
							
							
							
							llvm-svn: 94942 
							
						 
						
							2010-01-31 02:39:02 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								600f737b95 
								
							 
						 
						
							
							
								
								When doing a base-to-derived cast we don't need to null check the derived value if the class offset is 0.  
							
							 
							
							... 
							
							
							
							llvm-svn: 94939 
							
						 
						
							2010-01-31 01:43:37 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								84673e200f 
								
							 
						 
						
							
							
								
								Some class related cleanup.  
							
							 
							
							... 
							
							
							
							llvm-svn: 94938 
							
						 
						
							2010-01-31 01:36:53 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								087bc13d96 
								
							 
						 
						
							
							
								
								More asm cleanup.  
							
							 
							
							... 
							
							
							
							llvm-svn: 94920 
							
						 
						
							2010-01-30 20:05:21 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								c7c5baa482 
								
							 
						 
						
							
							
								
								Yay for more StringRefs.  
							
							 
							
							... 
							
							
							
							llvm-svn: 94917 
							
						 
						
							2010-01-30 19:12:25 +00:00  
						
					 
				
					
						
							
							
								 
								Devang Patel
							
						 
						
							 
							
							
							
							
								
							
							
								bb4820dc8e 
								
							 
						 
						
							
							
								
								Use appropriate context for typedefs.  
							
							 
							
							... 
							
							
							
							llvm-svn: 94849 
							
						 
						
							2010-01-29 22:29:31 +00:00  
						
					 
				
					
						
							
							
								 
								Devang Patel
							
						 
						
							 
							
							
							
							
								
							
							
								92e2541599 
								
							 
						 
						
							
							
								
								Maintain a map of regions (lexical scopes) and use it to find context for a global variable.  
							
							 
							
							... 
							
							
							
							llvm-svn: 94817 
							
						 
						
							2010-01-29 18:11:03 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								16810ca647 
								
							 
						 
						
							
							
								
								Name mangling for cast expressions, from Matthias Schiffer! Fixes PR5876.  
							
							 
							
							... 
							
							
							
							llvm-svn: 94811 
							
						 
						
							2010-01-29 16:37:09 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								42c876dff2 
								
							 
						 
						
							
							
								
								Use EmitLValueForFieldInitialization when synthesizing the copy ctor as well.  
							
							 
							
							... 
							
							
							
							llvm-svn: 94800 
							
						 
						
							2010-01-29 05:41:25 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								db78f0ad04 
								
							 
						 
						
							
							
								
								Add a new EmitLValueForFieldInitialization that will be used for initializing fields (and reference type fields in particular).  
							
							 
							
							... 
							
							
							
							llvm-svn: 94799 
							
						 
						
							2010-01-29 05:24:29 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								5d8645b150 
								
							 
						 
						
							
							
								
								Simplify EmitLValueForField - we can get whether the field is part of a union or not from the FieldDecl (through its DeclContext).  
							
							 
							
							... 
							
							
							
							llvm-svn: 94798 
							
						 
						
							2010-01-29 05:05:36 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								45c7ff1d79 
								
							 
						 
						
							
							
								
								ARM/APCS ABI: Fix some problems with bit-fields in structures. After rereading  
							
							 
							
							... 
							
							
							
							the ABI spec, this turns out to simplify the code. We still have some annoying
code which mismatches the spec with regard to empty structures.
llvm-svn: 94796 
							
						 
						
							2010-01-29 03:22:29 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								ba6c437d52 
								
							 
						 
						
							
							
								
								Add an CXXBindReferenceExpr (not used just yet).  
							
							 
							
							... 
							
							
							
							llvm-svn: 94791 
							
						 
						
							2010-01-29 02:39:32 +00:00  
						
					 
				
					
						
							
							
								 
								Devang Patel
							
						 
						
							 
							
							
							
							
								
							
							
								7bfc596fcf 
								
							 
						 
						
							
							
								
								s/CGDebugInfo::getContext/CGDebugInfo::getContextDescriptor/g to avoid confusion.  
							
							 
							
							... 
							
							
							
							llvm-svn: 94760 
							
						 
						
							2010-01-28 23:15:27 +00:00  
						
					 
				
					
						
							
							
								 
								Devang Patel
							
						 
						
							 
							
							
							
							
								
							
							
								128aa9d176 
								
							 
						 
						
							
							
								
								Fix indentation.  
							
							 
							
							... 
							
							
							
							llvm-svn: 94758 
							
						 
						
							2010-01-28 21:54:15 +00:00  
						
					 
				
					
						
							
							
								 
								Devang Patel
							
						 
						
							 
							
							
							
							
								
							
							
								4c3e7e99ca 
								
							 
						 
						
							
							
								
								Static methods do not need "this" pointer argument.  
							
							 
							
							... 
							
							
							
							llvm-svn: 94756 
							
						 
						
							2010-01-28 21:43:50 +00:00  
						
					 
				
					
						
							
							
								 
								Devang Patel
							
						 
						
							 
							
							
							
							
								
							
							
								946edc1aa6 
								
							 
						 
						
							
							
								
								Emit base classes info first, as expected by the debugger.  
							
							 
							
							... 
							
							
							
							llvm-svn: 94755 
							
						 
						
							2010-01-28 21:41:35 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								b1ef991097 
								
							 
						 
						
							
							
								
								Fix an incorrect union layout assert. Fixes PR6164.  
							
							 
							
							... 
							
							
							
							llvm-svn: 94754 
							
						 
						
							2010-01-28 18:22:03 +00:00  
						
					 
				
					
						
							
							
								 
								Devang Patel
							
						 
						
							 
							
							
							
							
								
							
							
								0d61eebd81 
								
							 
						 
						
							
							
								
								s/FunctionNames/DebugInfoNames/g  
							
							 
							
							... 
							
							
							
							llvm-svn: 94753 
							
						 
						
							2010-01-28 18:21:00 +00:00  
						
					 
				
					
						
							
							
								 
								Devang Patel
							
						 
						
							 
							
							
							
							
								
							
							
								84033fb240 
								
							 
						 
						
							
							
								
								Emit vtable info.  
							
							 
							
							... 
							
							
							
							llvm-svn: 94751 
							
						 
						
							2010-01-28 18:11:52 +00:00  
						
					 
				
					
						
							
							
								 
								Devang Patel
							
						 
						
							 
							
							
							
							
								
							
							
								abb4413728 
								
							 
						 
						
							
							
								
								While emitting debugging infor for a C++ class, identify the holder of class's vtable, if any.  
							
							 
							
							... 
							
							
							
							llvm-svn: 94712 
							
						 
						
							2010-01-28 00:54:21 +00:00  
						
					 
				
					
						
							
							
								 
								Devang Patel
							
						 
						
							 
							
							
							
							
								
							
							
								3d4e6d9dd0 
								
							 
						 
						
							
							
								
								Include "this" pointer argument while emitting debug info for a C++ method.  
							
							 
							
							... 
							
							
							
							llvm-svn: 94710 
							
						 
						
							2010-01-28 00:28:01 +00:00  
						
					 
				
					
						
							
							
								 
								Ken Dyck
							
						 
						
							 
							
							
							
							
								
							
							
								160146eba2 
								
							 
						 
						
							
							
								
								Change the return type of ASTContext::getDeclAlignInBytes() to CharUnits and,  
							
							 
							
							... 
							
							
							
							now that the "InBytes" part of the name is implied by the return type, rename
it to getDeclAlign().
llvm-svn: 94681 
							
						 
						
							2010-01-27 17:10:57 +00:00  
						
					 
				
					
						
							
							
								 
								David Chisnall
							
						 
						
							 
							
							
							
							
								
							
							
								358e751a7b 
								
							 
						 
						
							
							
								
								Unique ObjC strings (GNU Runtime); fix for PR6142.  Note: Doing this in the runtime-specific code is a bit ugly.  It would be a good idea to hoist all of the string / protocol uniqueing code up into CGObjCRuntime or CodeGenModule and only handle emitting the original versions in the runtime-specific code.  
							
							 
							
							... 
							
							
							
							llvm-svn: 94676 
							
						 
						
							2010-01-27 12:49:23 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								40446e8a0a 
								
							 
						 
						
							
							
								
								Structs and classes with non-trivial destructors or copy constructors should be passed indirectly in the 32-bit ABI. Fixes PR6094.  
							
							 
							
							... 
							
							
							
							llvm-svn: 94656 
							
						 
						
							2010-01-27 03:25:19 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								ded0a406b4 
								
							 
						 
						
							
							
								
								Refine the non-virtual this adjustments for thunks by using the offset  
							
							 
							
							... 
							
							
							
							to the declaring class from the nearest virtual base class.  WIP.
llvm-svn: 94606 
							
						 
						
							2010-01-26 22:44:01 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								a04ecfb701 
								
							 
						 
						
							
							
								
								Refine the non-virtual this adjustments for thunks by using the offset  
							
							 
							
							... 
							
							
							
							to the declaring class from the nearest virtual base class.  WIP.
This fixes 40% of all the problems remaining in one of my testcases.
llvm-svn: 94592 
							
						 
						
							2010-01-26 21:35:27 +00:00  
						
					 
				
					
						
							
							
								 
								Ken Dyck
							
						 
						
							 
							
							
							
							
								
							
							
								7df3cbeb01 
								
							 
						 
						
							
							
								
								Convert one last size variable to CharUnits (follow-on to 94577).  
							
							 
							
							... 
							
							
							
							llvm-svn: 94579 
							
						 
						
							2010-01-26 19:59:28 +00:00  
						
					 
				
					
						
							
							
								 
								Ken Dyck
							
						 
						
							 
							
							
							
							
								
							
							
								3eb55cfe8a 
								
							 
						 
						
							
							
								
								Use CharUnits for sizes, offsets, alignments, and padding amounts for values  
							
							 
							
							... 
							
							
							
							that are in character units.
llvm-svn: 94577 
							
						 
						
							2010-01-26 19:44:24 +00:00  
						
					 
				
					
						
							
							
								 
								Ken Dyck
							
						 
						
							 
							
							
							
							
								
							
							
								5262b11962 
								
							 
						 
						
							
							
								
								Use CharUnits for alignments in character units.  
							
							 
							
							... 
							
							
							
							llvm-svn: 94571 
							
						 
						
							2010-01-26 19:13:33 +00:00  
						
					 
				
					
						
							
							
								 
								Ken Dyck
							
						 
						
							 
							
							
							
							
								
							
							
								a0f99ff230 
								
							 
						 
						
							
							
								
								Use CharUnits for alignment of UTF16 string in GetAddrOfConstantCFString().  
							
							 
							
							... 
							
							
							
							llvm-svn: 94564 
							
						 
						
							2010-01-26 18:46:23 +00:00  
						
					 
				
					
						
							
							
								 
								Ken Dyck
							
						 
						
							 
							
							
							
							
								
							
							
								e5402e4749 
								
							 
						 
						
							
							
								
								Use CharUnits for alignment in EmitNullInitializationLValue().  
							
							 
							
							... 
							
							
							
							llvm-svn: 94563 
							
						 
						
							2010-01-26 18:35:11 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								ca4a5459d8 
								
							 
						 
						
							
							
								
								Use the right definition when emitting a global variable. Fixes PR5564.  
							
							 
							
							... 
							
							
							
							llvm-svn: 94555 
							
						 
						
							2010-01-26 17:43:42 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								7228117108 
								
							 
						 
						
							
							
								
								Change getUnique to return a GlobalDecl. Fixes PR6147.  
							
							 
							
							... 
							
							
							
							llvm-svn: 94554 
							
						 
						
							2010-01-26 17:36:47 +00:00  
						
					 
				
					
						
							
							
								 
								Ken Dyck
							
						 
						
							 
							
							
							
							
								
							
							
								98ca79435a 
								
							 
						 
						
							
							
								
								Introduce CodeGenModule::GetTargetTypeStoreSize() to calculate the store size  
							
							 
							
							... 
							
							
							
							of LLVM types in character units.
llvm-svn: 94542 
							
						 
						
							2010-01-26 13:48:07 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								d6b21e4842 
								
							 
						 
						
							
							
								
								If a global variable has an initializer with side effects, it can never be deferred (even if it's in an anonymous namespace).  
							
							 
							
							... 
							
							
							
							llvm-svn: 94525 
							
						 
						
							2010-01-26 06:15:16 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								0b5f1ddf0a 
								
							 
						 
						
							
							
								
								Fix another debug info crash with virtual bases.  
							
							 
							
							... 
							
							
							
							llvm-svn: 94520 
							
						 
						
							2010-01-26 05:26:39 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								17ed0496c5 
								
							 
						 
						
							
							
								
								Fix the test I broke, and also fix a crash when declaring a virtual destructor. Add debug info support for pure virtual member functions.  
							
							 
							
							... 
							
							
							
							llvm-svn: 94519 
							
						 
						
							2010-01-26 05:19:50 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								b85f0ab976 
								
							 
						 
						
							
							
								
								Factor creating the DISubprogram for a member function out into a separate function.  
							
							 
							
							... 
							
							
							
							llvm-svn: 94513 
							
						 
						
							2010-01-26 04:49:33 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								c1821155bf 
								
							 
						 
						
							
							
								
								Simplify CGDebugInfo::CollectCXXMemberFunctions a little. More to come.  
							
							 
							
							... 
							
							
							
							llvm-svn: 94511 
							
						 
						
							2010-01-26 04:40:11 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								20bbbd489b 
								
							 
						 
						
							
							
								
								Make sure to always mark a global variable as not being constant if it has a C++ initializer.  
							
							 
							
							... 
							
							
							
							llvm-svn: 94504 
							
						 
						
							2010-01-26 04:02:23 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								77537b136e 
								
							 
						 
						
							
							
								
								Be sure to track the non-virtual part of the vcall offset in complex  
							
							 
							
							... 
							
							
							
							multiple inheritance cases.  WIP.
This fixes 20% of the outstanding problems found by the randomized
tester.
llvm-svn: 94499 
							
						 
						
							2010-01-26 03:42:22 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								90181eb294 
								
							 
						 
						
							
							
								
								Fixup a missing vcall entry.  WIP.  
							
							 
							
							... 
							
							
							
							llvm-svn: 94478 
							
						 
						
							2010-01-26 00:05:04 +00:00  
						
					 
				
					
						
							
							
								 
								Devang Patel
							
						 
						
							 
							
							
							
							
								
							
							
								c54353d935 
								
							 
						 
						
							
							
								
								First cut at emitting inheritance info.  
							
							 
							
							... 
							
							
							
							llvm-svn: 94473 
							
						 
						
							2010-01-25 23:32:18 +00:00  
						
					 
				
					
						
							
							
								 
								Devang Patel
							
						 
						
							 
							
							
							
							
								
							
							
								7af03fb4f0 
								
							 
						 
						
							
							
								
								Emit debug info for virtual functions.  
							
							 
							
							... 
							
							
							
							llvm-svn: 94467 
							
						 
						
							2010-01-25 23:17:15 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								5cda92820f 
								
							 
						 
						
							
							
								
								global variable that binds reference to a non-lvalue reproted  
							
							 
							
							... 
							
							
							
							as NYI now.
llvm-svn: 94453 
							
						 
						
							2010-01-25 21:40:39 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								210031b79c 
								
							 
						 
						
							
							
								
								Fix a code gen. bug involving compiling global references.  
							
							 
							
							... 
							
							
							
							(fixes radar 7574896).
llvm-svn: 94434 
							
						 
						
							2010-01-25 18:30:26 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								83b0dd16c3 
								
							 
						 
						
							
							
								
								fix rdar://7556129 a crash in blocks debug info codegen.  
							
							 
							
							... 
							
							
							
							llvm-svn: 94402 
							
						 
						
							2010-01-25 03:34:56 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								bf78478d35 
								
							 
						 
						
							
							
								
								simplify code.  
							
							 
							
							... 
							
							
							
							llvm-svn: 94401 
							
						 
						
							2010-01-25 03:29:35 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								0bcc858a2b 
								
							 
						 
						
							
							
								
								-fno-rtti is now the default.  
							
							 
							
							... 
							
							
							
							llvm-svn: 94379 
							
						 
						
							2010-01-24 20:43:31 +00:00  
						
					 
				
					
						
							
							
								 
								Alexis Hunt
							
						 
						
							 
							
							
							
							
								
							
							
								aecc45cb3c 
								
							 
						 
						
							
							
								
								Mangle static variables with an extra name to distinguish them from non-static variables in the same TU.  
							
							 
							
							... 
							
							
							
							Fixes PR5966 for real this time; also reverts r92911, which had a incorrect fix.
llvm-svn: 94352 
							
						 
						
							2010-01-24 03:04:27 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								60ddba67a8 
								
							 
						 
						
							
							
								
								Fix a nasty bug where temporaries weren't marked as being conditional in some cases.  
							
							 
							
							... 
							
							
							
							llvm-svn: 94341 
							
						 
						
							2010-01-24 00:20:05 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								d6ef69a7db 
								
							 
						 
						
							
							
								
								Add bzero builtin; this should help codegen quality for code using this  
							
							 
							
							... 
							
							
							
							function.
llvm-svn: 94320 
							
						 
						
							2010-01-23 19:00:10 +00:00  
						
					 
				
					
						
							
							
								 
								Benjamin Kramer
							
						 
						
							 
							
							
							
							
								
							
							
								8f8f405c71 
								
							 
						 
						
							
							
								
								No need to terminate this buffer.  
							
							 
							
							... 
							
							
							
							llvm-svn: 94313 
							
						 
						
							2010-01-23 18:16:07 +00:00  
						
					 
				
					
						
							
							
								 
								David Chisnall
							
						 
						
							 
							
							
							
							
								
							
							
								481e3a87fe 
								
							 
						 
						
							
							
								
								Created __builtin___NSStringMakeConstantString() builtin, which generates constant Objective-C strings.  
							
							 
							
							... 
							
							
							
							llvm-svn: 94274 
							
						 
						
							2010-01-23 02:40:42 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								1f49d65235 
								
							 
						 
						
							
							
								
								Finish off fixing up debug information.  
							
							 
							
							... 
							
							
							
							llvm-svn: 94193 
							
						 
						
							2010-01-22 18:48:47 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								0599df16a6 
								
							 
						 
						
							
							
								
								Eliminate some Clang warnings  
							
							 
							
							... 
							
							
							
							llvm-svn: 94177 
							
						 
						
							2010-01-22 15:41:14 +00:00  
						
					 
				
					
						
							
							
								 
								Benjamin Kramer
							
						 
						
							 
							
							
							
							
								
							
							
								d6b28fc6ad 
								
							 
						 
						
							
							
								
								Simplify code.  
							
							 
							
							... 
							
							
							
							llvm-svn: 94175 
							
						 
						
							2010-01-22 13:59:13 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								9eb76d47f2 
								
							 
						 
						
							
							
								
								Ensure we output all non-virtual base vtables.  Fixes PR5890.  
							
							 
							
							... 
							
							
							
							llvm-svn: 94163 
							
						 
						
							2010-01-22 06:45:05 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								d2808449e4 
								
							 
						 
						
							
							
								
								Update debugging code.  
							
							 
							
							... 
							
							
							
							llvm-svn: 94145 
							
						 
						
							2010-01-22 02:51:26 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								f768db7775 
								
							 
						 
						
							
							
								
								Move the VTT related code into its own file, CGVTT.cpp  
							
							 
							
							... 
							
							
							
							llvm-svn: 94079 
							
						 
						
							2010-01-21 16:50:45 +00:00  
						
					 
				
					
						
							
							
								 
								Devang Patel
							
						 
						
							 
							
							
							
							
								
							
							
								3f4a77e082 
								
							 
						 
						
							
							
								
								A Decl->getName() is not unique. However, the debug info descriptors  
							
							 
							
							... 
							
							
							
							are uniqued. The debug info descriptor describing record's context is
necessary to keep two Decl's descriptor unique if their name match.
There is more work to do to create descriptors for DeclContext. 
As a temp. step use type's name in FwdDecl.
llvm-svn: 94050 
							
						 
						
							2010-01-20 23:56:40 +00:00  
						
					 
				
					
						
							
							
								 
								Devang Patel
							
						 
						
							 
							
							
							
							
								
							
							
								5e1a83c196 
								
							 
						 
						
							
							
								
								Emit human readable names for operators.  
							
							 
							
							... 
							
							
							
							llvm-svn: 93837 
							
						 
						
							2010-01-19 02:02:11 +00:00  
						
					 
				
					
						
							
							
								 
								Devang Patel
							
						 
						
							 
							
							
							
							
								
							
							
								7a12ad0dc1 
								
							 
						 
						
							
							
								
								First cut at emitting debugging information for C++ member functions.  
							
							 
							
							... 
							
							
							
							There is lot more work to do in this area.
llvm-svn: 93836 
							
						 
						
							2010-01-19 01:54:44 +00:00  
						
					 
				
					
						
							
							
								 
								Devang Patel
							
						 
						
							 
							
							
							
							
								
							
							
								757daca99c 
								
							 
						 
						
							
							
								
								Use llvm::Function name as the linkage name, but strip off leading '01' from display name.  
							
							 
							
							... 
							
							
							
							llvm-svn: 93822 
							
						 
						
							2010-01-19 00:25:12 +00:00  
						
					 
				
					
						
							
							
								 
								Devang Patel
							
						 
						
							 
							
							
							
							
								
							
							
								889ce76f41 
								
							 
						 
						
							
							
								
								Refactor.  
							
							 
							
							... 
							
							
							
							llvm-svn: 93814 
							
						 
						
							2010-01-19 00:00:59 +00:00  
						
					 
				
					
						
							
							
								 
								Devang Patel
							
						 
						
							 
							
							
							
							
								
							
							
								ddf6a57f3e 
								
							 
						 
						
							
							
								
								llvm::Function name is the linkage name. If it has a '01' as a prefix then probably there is a reason.  
							
							 
							
							... 
							
							
							
							llvm-svn: 93808 
							
						 
						
							2010-01-18 23:27:28 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								07894e8a0e 
								
							 
						 
						
							
							
								
								More VTT builder fixes. With these fixes we now correctly handle the very complex VTT example from the Itanium ABI spec.  
							
							 
							
							... 
							
							
							
							llvm-svn: 93725 
							
						 
						
							2010-01-18 17:13:59 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								3d1a09552c 
								
							 
						 
						
							
							
								
								Move some common code into BuildVTT.  
							
							 
							
							... 
							
							
							
							llvm-svn: 93710 
							
						 
						
							2010-01-18 04:45:46 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								1af3df854f 
								
							 
						 
						
							
							
								
								Fix a bunch of VTT layout bugs, add simple tests for VTT layout.  
							
							 
							
							... 
							
							
							
							llvm-svn: 93709 
							
						 
						
							2010-01-18 04:25:18 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								827b245fd6 
								
							 
						 
						
							
							
								
								Minor VTT builder cleanup, no functionality change.  
							
							 
							
							... 
							
							
							
							llvm-svn: 93696 
							
						 
						
							2010-01-17 23:53:20 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								42f1376f35 
								
							 
						 
						
							
							
								
								Get the ctor vtable address points directly from the VTT builder.  
							
							 
							
							... 
							
							
							
							llvm-svn: 93681 
							
						 
						
							2010-01-17 17:10:44 +00:00  
						
					 
				
					
						
							
							
								 
								Tanya Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								dbfd16014a 
								
							 
						 
						
							
							
								
								Add codgen for BI__builtin_llvm_memory_barrier.  
							
							 
							
							... 
							
							
							
							llvm-svn: 93611 
							
						 
						
							2010-01-16 01:21:14 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								8fdc2cb46a 
								
							 
						 
						
							
							
								
								Fix crash generating debug info for constructor for anonymous struct.  
							
							 
							
							... 
							
							
							
							llvm-svn: 93601 
							
						 
						
							2010-01-16 00:43:13 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								cab014721b 
								
							 
						 
						
							
							
								
								Fix a couple bugs in copy assignment operator synthesis.  
							
							 
							
							... 
							
							
							
							llvm-svn: 93546 
							
						 
						
							2010-01-15 20:06:11 +00:00  
						
					 
				
					
						
							
							
								 
								Ken Dyck
							
						 
						
							 
							
							
							
							
								
							
							
								02990837ad 
								
							 
						 
						
							
							
								
								Convert the type of the LValue offset variable in APValue to CharUnits, moving  
							
							 
							
							... 
							
							
							
							the LValue-related methods of APValue out of line to avoid header file leaching.
llvm-svn: 93512 
							
						 
						
							2010-01-15 12:37:54 +00:00  
						
					 
				
					
						
							
							
								 
								Devang Patel
							
						 
						
							 
							
							
							
							
								
							
							
								2d63010a9c 
								
							 
						 
						
							
							
								
								Emit linkage name even if it matches regular name. The code generator uses linkage name to find subprogram entry for the current function.  
							
							 
							
							... 
							
							
							
							llvm-svn: 93461 
							
						 
						
							2010-01-14 21:46:57 +00:00  
						
					 
				
					
						
							
							
								 
								Devang Patel
							
						 
						
							 
							
							
							
							
								
							
							
								ea84f59f5c 
								
							 
						 
						
							
							
								
								Add comment.  
							
							 
							
							... 
							
							
							
							llvm-svn: 93434 
							
						 
						
							2010-01-14 18:06:13 +00:00  
						
					 
				
					
						
							
							
								 
								David Chisnall
							
						 
						
							 
							
							
							
							
								
							
							
								035ead209f 
								
							 
						 
						
							
							
								
								Made ObjC method name mangling match GCC (which does it in a stupid and broken way that can give conflicts on method names containing underscores, but is needed for gdb to work because gdb does not know how to read ObjC class tables and relies on the mangling).  
							
							 
							
							... 
							
							
							
							llvm-svn: 93427 
							
						 
						
							2010-01-14 14:08:19 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								5f9a881e1e 
								
							 
						 
						
							
							
								
								Store the address points for constructor vtables directly in the VTT builder, because that's the only time they're needed.  
							
							 
							
							... 
							
							
							
							llvm-svn: 93412 
							
						 
						
							2010-01-14 02:29:07 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								2a4adbea96 
								
							 
						 
						
							
							
								
								Add a DenseMapInfo specialization for BaseSubobject.  
							
							 
							
							... 
							
							
							
							llvm-svn: 93399 
							
						 
						
							2010-01-14 01:39:42 +00:00  
						
					 
				
					
						
							
							
								 
								Devang Patel
							
						 
						
							 
							
							
							
							
								
							
							
								4274a326be 
								
							 
						 
						
							
							
								
								Because CurLoc is the current source location as far as CGDebugInfo is concerned. It is expected that this is set (usually left bracket location of function body compound statement) before EmitfunctionStart() is used.  
							
							 
							
							... 
							
							
							
							llvm-svn: 93389 
							
						 
						
							2010-01-14 00:48:09 +00:00  
						
					 
				
					
						
							
							
								 
								Devang Patel
							
						 
						
							 
							
							
							
							
								
							
							
								934661ed73 
								
							 
						 
						
							
							
								
								Emit human readable names for c/c++ functions. Avoid emitting linkage name if it matches regular name.  
							
							 
							
							... 
							
							
							
							llvm-svn: 93383 
							
						 
						
							2010-01-14 00:36:21 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								20871481d2 
								
							 
						 
						
							
							
								
								Add a BaseSubobject class to uniquely identify a base class subobject. Not yet used.  
							
							 
							
							... 
							
							
							
							llvm-svn: 93345 
							
						 
						
							2010-01-13 20:11:15 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								e3e76e2a69 
								
							 
						 
						
							
							
								
								Use the new isInteger() method in a couple places, some random cleanup, and  
							
							 
							
							... 
							
							
							
							add a fixme.
llvm-svn: 93179 
							
						 
						
							2010-01-11 19:58:10 +00:00  
						
					 
				
					
						
							
							
								 
								David Chisnall
							
						 
						
							 
							
							
							
							
								
							
							
								c8fc573ea0 
								
							 
						 
						
							
							
								
								Fix type mismatch on 64-bit platforms (GNU ObjC).  
							
							 
							
							... 
							
							
							
							llvm-svn: 93169 
							
						 
						
							2010-01-11 19:02:35 +00:00  
						
					 
				
					
						
							
							
								 
								Ken Dyck
							
						 
						
							 
							
							
							
							
								
							
							
								40775003e6 
								
							 
						 
						
							
							
								
								Roll out ASTContext::getTypeSizeInChars(), replacing instances of  
							
							 
							
							... 
							
							
							
							"ASTContext::getTypeSize() / 8". Replace [u]int64_t variables with CharUnits
ones as appropriate. 
Also rename RawType, fromRaw(), and getRaw() in CharUnits to QuantityType, 
fromQuantity(), and getQuantity() for clarity.
llvm-svn: 93153 
							
						 
						
							2010-01-11 17:06:35 +00:00  
						
					 
				
					
						
							
							
								 
								Anton Korobeynikov
							
						 
						
							 
							
							
							
							
								
							
							
								b322c3a34b 
								
							 
						 
						
							
							
								
								Try to make cmake happy  
							
							 
							
							... 
							
							
							
							llvm-svn: 93119 
							
						 
						
							2010-01-10 13:06:34 +00:00  
						
					 
				
					
						
							
							
								 
								Anton Korobeynikov
							
						 
						
							 
							
							
							
							
								
							
							
								55bcea1e65 
								
							 
						 
						
							
							
								
								Generalize target weirdness handling having proper layering in mind:  
							
							 
							
							... 
							
							
							
							1. Add helper class for sema checks for target attributes
 2. Add helper class for codegen of target attributes
As a proof-of-concept - implement msp430's 'interrupt' attribute.
llvm-svn: 93118 
							
						 
						
							2010-01-10 12:58:08 +00:00  
						
					 
				
					
						
							
							
								 
								Anton Korobeynikov
							
						 
						
							 
							
							
							
							
								
							
							
								89b14a4309 
								
							 
						 
						
							
							
								
								Rename file to generalization in next commits  
							
							 
							
							... 
							
							
							
							llvm-svn: 93117 
							
						 
						
							2010-01-10 12:57:30 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								bb8976e36e 
								
							 
						 
						
							
							
								
								implement codegen support for preinc as an lvalue, PR5514.  
							
							 
							
							... 
							
							
							
							llvm-svn: 93076 
							
						 
						
							2010-01-09 21:44:40 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								116ce8f172 
								
							 
						 
						
							
							
								
								refactor pre/postinc logic into CGF and require the caller to pass in the  
							
							 
							
							... 
							
							
							
							lvalue to poke, no functionality change.
llvm-svn: 93075 
							
						 
						
							2010-01-09 21:40:03 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								34c72dd683 
								
							 
						 
						
							
							
								
								revert r92749, which is just dead code.  
							
							 
							
							... 
							
							
							
							llvm-svn: 93074 
							
						 
						
							2010-01-09 21:14:47 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								5866fe306d 
								
							 
						 
						
							
							
								
								Fix for PR5967: Make const-marking for LLVM globals correct for cases requiring  
							
							 
							
							... 
							
							
							
							run-time initialization, and emit run-time initializers aggresively to avoid
ordering issues with deferred globals.
llvm-svn: 92976 
							
						 
						
							2010-01-08 00:50:11 +00:00  
						
					 
				
					
						
							
							
								 
								David Chisnall
							
						 
						
							 
							
							
							
							
								
							
							
								df34917a38 
								
							 
						 
						
							
							
								
								Export a public symbol for classes with the GNU runtime.  
							
							 
							
							... 
							
							
							
							llvm-svn: 92973 
							
						 
						
							2010-01-08 00:14:31 +00:00  
						
					 
				
					
						
							
							
								 
								Nuno Lopes
							
						 
						
							 
							
							
							
							
								
							
							
								950d5b2cd3 
								
							 
						 
						
							
							
								
								fix PR5869: mangle static symbols like gcc does to make it easier to diff symbol tables  
							
							 
							
							... 
							
							
							
							llvm-svn: 92911 
							
						 
						
							2010-01-07 09:36:51 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								2a34df3264 
								
							 
						 
						
							
							
								
								Fix linkage for RTTI names by re-using the logic for computing the  
							
							 
							
							... 
							
							
							
							linkage of vtables. Before this, we were emitting RTTI names for
template instantiations with strong external linkage rather than with
weak ODR linkage.
llvm-svn: 92857 
							
						 
						
							2010-01-06 22:00:56 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								ccecc1bb43 
								
							 
						 
						
							
							
								
								Fix marking of virtual members for nested classes whose first non-pure virtual function has a body inlined in the class  
							
							 
							
							... 
							
							
							
							llvm-svn: 92855 
							
						 
						
							2010-01-06 20:27:16 +00:00  
						
					 
				
					
						
							
							
								 
								David Chisnall
							
						 
						
							 
							
							
							
							
								
							
							
								9a2073c035 
								
							 
						 
						
							
							
								
								Fix for PR5691  
							
							 
							
							... 
							
							
							
							llvm-svn: 92846 
							
						 
						
							2010-01-06 18:02:59 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								a671c2a9fe 
								
							 
						 
						
							
							
								
								Fix (invalid) may-be-uninitialized warning.  
							
							 
							
							... 
							
							
							
							llvm-svn: 92828 
							
						 
						
							2010-01-06 07:13:04 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								d01472beee 
								
							 
						 
						
							
							
								
								Revert my available_externally vtables experiment. It's breaking the LLVM-with-Clang build with linker errors that I have yet to investigate.  
							
							 
							
							... 
							
							
							
							llvm-svn: 92822 
							
						 
						
							2010-01-06 04:50:56 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								81478719a7 
								
							 
						 
						
							
							
								
								Reorder to avoid invalidating idx which is an accessor into VCall.  
							
							 
							
							... 
							
							
							
							llvm-svn: 92819 
							
						 
						
							2010-01-06 03:09:19 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								26751ffc53 
								
							 
						 
						
							
							
								
								Silence bogus GCC warning  
							
							 
							
							... 
							
							
							
							llvm-svn: 92787 
							
						 
						
							2010-01-05 21:55:26 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								1a68ab6c83 
								
							 
						 
						
							
							
								
								Make use of available_externally linkage for vtables when the  
							
							 
							
							... 
							
							
							
							non-inline key function of a class template instantiation, when no key
function is present, the class template instantiation itself was
instantiated with an explicit instantiation declaration (aka extern
template). I'm fairly certain that the C++0x specification gives us
this lattitude, although GCC doesn't take advantage of it.
llvm-svn: 92779 
							
						 
						
							2010-01-05 21:40:05 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								a318efd1f2 
								
							 
						 
						
							
							
								
								Improve key-function computation for templates. In particular:  
							
							 
							
							... 
							
							
							
							- All classes can have a key function; templates don't change that.
  non-template classes when computing the key function.
  - We always mark all of the virtual member functions of class
  template instantiations. 
  - The vtable for an instantiation of a class template has weak
  linkage. 
We could probably use available_externally linkage for vtables of
classes instantiated by explicit instantiation declarations (extern
templates), but GCC doesn't do this and I'm not 100% that the ABI
permits it.
llvm-svn: 92753 
							
						 
						
							2010-01-05 19:06:31 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								79ed590c85 
								
							 
						 
						
							
							
								
								Add code to skip the emission of available externally functions at -O0.  WIP.  
							
							 
							
							... 
							
							
							
							llvm-svn: 92749 
							
						 
						
							2010-01-05 18:48:04 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								a0b025e40f 
								
							 
						 
						
							
							
								
								When emitting member function pointers, use the canonical decl if the member function is virtual. Fixes PR5940.  
							
							 
							
							... 
							
							
							
							llvm-svn: 92680 
							
						 
						
							2010-01-05 05:04:05 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								d443c0a02a 
								
							 
						 
						
							
							
								
								Revert r92431, this code isn't dead and broke the ntfs build.  
							
							 
							
							... 
							
							
							
							llvm-svn: 92493 
							
						 
						
							2010-01-04 18:47:06 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								5b9019515a 
								
							 
						 
						
							
							
								
								Fix -Asserts warning.  
							
							 
							
							... 
							
							
							
							llvm-svn: 92491 
							
						 
						
							2010-01-04 18:02:28 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								6257e08a3d 
								
							 
						 
						
							
							
								
								Get rid of more dead code.  
							
							 
							
							... 
							
							
							
							llvm-svn: 92439 
							
						 
						
							2010-01-03 01:11:47 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								c52a9367b3 
								
							 
						 
						
							
							
								
								Get rid of some unnecessary code.  
							
							 
							
							... 
							
							
							
							llvm-svn: 92432 
							
						 
						
							2010-01-02 23:43:59 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								14e4005851 
								
							 
						 
						
							
							
								
								Delete impossible case.  
							
							 
							
							... 
							
							
							
							llvm-svn: 92431 
							
						 
						
							2010-01-02 23:28:56 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								c92a37e917 
								
							 
						 
						
							
							
								
								Speculative MSVC fix.  
							
							 
							
							... 
							
							
							
							llvm-svn: 92421 
							
						 
						
							2010-01-02 18:46:23 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								93a1884fde 
								
							 
						 
						
							
							
								
								Move address points to CGVtableInfo, no functionality change.  
							
							 
							
							... 
							
							
							
							llvm-svn: 92420 
							
						 
						
							2010-01-02 18:02:32 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								e36a6b3e44 
								
							 
						 
						
							
							
								
								Correctly pass VTT parameters to constructors and destructors. The VTTs aren't yet used in the ctors/dtors, but that will follow.  
							
							 
							
							... 
							
							
							
							llvm-svn: 92409 
							
						 
						
							2010-01-02 01:01:18 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								27da15ba8e 
								
							 
						 
						
							
							
								
								Move a few more functions away from CGCXX and to CGClass and CGExprCXX.  
							
							 
							
							... 
							
							
							
							llvm-svn: 92399 
							
						 
						
							2010-01-01 20:29:01 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								9d44fdb397 
								
							 
						 
						
							
							
								
								Fix last patch, catch of reference to non-pointer.  
							
							 
							
							... 
							
							
							
							llvm-svn: 92386 
							
						 
						
							2010-01-01 03:20:32 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								5ee041873b 
								
							 
						 
						
							
							
								
								Fix catching a reference to a pointer.  
							
							 
							
							... 
							
							
							
							llvm-svn: 92385 
							
						 
						
							2010-01-01 02:51:52 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								2d21394190 
								
							 
						 
						
							
							
								
								If the key function of a record is inline, then the RTTI data should have weak_odr linkage.  
							
							 
							
							... 
							
							
							
							llvm-svn: 92371 
							
						 
						
							2009-12-31 19:36:25 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								7ae81bb711 
								
							 
						 
						
							
							
								
								More RTTI builder cleanup.  
							
							 
							
							... 
							
							
							
							llvm-svn: 92360 
							
						 
						
							2009-12-31 17:43:53 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								a442499072 
								
							 
						 
						
							
							
								
								Fix a bunch of bugs with VMI RTTI building, and add a whole bunch of tests.  
							
							 
							
							... 
							
							
							
							llvm-svn: 92319 
							
						 
						
							2009-12-30 23:47:56 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								ac2f681777 
								
							 
						 
						
							
							
								
								More RTTI cleanup, test that RTTI classes have the correct vtables.  
							
							 
							
							... 
							
							
							
							llvm-svn: 92284 
							
						 
						
							2009-12-30 01:00:12 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								79c184e975 
								
							 
						 
						
							
							
								
								Match gcc and treat vector types as fundamental types.  
							
							 
							
							... 
							
							
							
							llvm-svn: 92278 
							
						 
						
							2009-12-29 22:30:11 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								ef88695860 
								
							 
						 
						
							
							
								
								Handle enum types as well.  
							
							 
							
							... 
							
							
							
							llvm-svn: 92276 
							
						 
						
							2009-12-29 22:13:01 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								0e4151c685 
								
							 
						 
						
							
							
								
								Test linkage of RTTI descriptors of array types.  
							
							 
							
							... 
							
							
							
							llvm-svn: 92274 
							
						 
						
							2009-12-29 21:58:32 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								26cf4ab8e2 
								
							 
						 
						
							
							
								
								Fix function type RTTI linkage and add tests.  
							
							 
							
							... 
							
							
							
							llvm-svn: 92266 
							
						 
						
							2009-12-29 20:20:19 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								3f8e5dd898 
								
							 
						 
						
							
							
								
								strength reduce this call away.  
							
							 
							
							... 
							
							
							
							llvm-svn: 92253 
							
						 
						
							2009-12-29 07:49:13 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								88ea2455f8 
								
							 
						 
						
							
							
								
								Get rid of FixedWidthIntType, as suggested by Chris and Eli.  
							
							 
							
							... 
							
							
							
							llvm-svn: 92246 
							
						 
						
							2009-12-29 07:07:36 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								9f021fd05d 
								
							 
						 
						
							
							
								
								adjust for llvm api changes.  
							
							 
							
							... 
							
							
							
							llvm-svn: 92236 
							
						 
						
							2009-12-28 23:41:39 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								5e124bf913 
								
							 
						 
						
							
							
								
								this form of SetDebugLocation is about to go away, add some #includes that  
							
							 
							
							... 
							
							
							
							are about to not come in implicitly.
llvm-svn: 92228 
							
						 
						
							2009-12-28 21:44:41 +00:00  
						
					 
				
					
						
							
							
								 
								Anton Korobeynikov
							
						 
						
							 
							
							
							
							
								
							
							
								73d50b9141 
								
							 
						 
						
							
							
								
								Promote arguments of frameaddr / returnaddr builtins to i32 type, when needed.  
							
							 
							
							... 
							
							
							
							This is needed for the platforms, where bitwidth of "int" is not 32 bits
(e.g. 16 on msp430).
llvm-svn: 92176 
							
						 
						
							2009-12-27 14:27:22 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								1e26278b3b 
								
							 
						 
						
							
							
								
								Add a sanity assertion so that we don't silently generate bad code; I'll file  
							
							 
							
							... 
							
							
							
							a bug with a testcase hitting this assertion in a moment.
llvm-svn: 92175 
							
						 
						
							2009-12-27 07:02:50 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								af76ad73ed 
								
							 
						 
						
							
							
								
								Fix obvious mistake.  
							
							 
							
							... 
							
							
							
							llvm-svn: 92172 
							
						 
						
							2009-12-27 03:44:17 +00:00  
						
					 
				
					
						
							
							
								 
								Benjamin Kramer
							
						 
						
							 
							
							
							
							
								
							
							
								d20ef75b91 
								
							 
						 
						
							
							
								
								Remove some dead variables clang-analyzer found.  
							
							 
							
							... 
							
							
							
							llvm-svn: 92162 
							
						 
						
							2009-12-25 15:43:36 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								b8841af8bd 
								
							 
						 
						
							
							
								
								Minor optimization; emit proper unsupported messages for a couple of cases.  
							
							 
							
							... 
							
							
							
							llvm-svn: 92153 
							
						 
						
							2009-12-25 06:17:05 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								2e06e8bbcc 
								
							 
						 
						
							
							
								
								Some small improvements to dead code elimination; helps a bit on  
							
							 
							
							... 
							
							
							
							LLVM-Code-Symbols test.
llvm-svn: 92152 
							
						 
						
							2009-12-25 05:29:40 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								fddc26cc64 
								
							 
						 
						
							
							
								
								Make copy constructor elimination work in more cases; the case in question  
							
							 
							
							... 
							
							
							
							here affects clang-on-clang.
llvm-svn: 92151 
							
						 
						
							2009-12-24 23:33:34 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								fb404888af 
								
							 
						 
						
							
							
								
								Move a bunch of class related functions to CGClass.cpp, no functionality change.  
							
							 
							
							... 
							
							
							
							llvm-svn: 92148 
							
						 
						
							2009-12-24 22:46:43 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								bfb3671b25 
								
							 
						 
						
							
							
								
								Pass the return value slot to all call exprs.  
							
							 
							
							... 
							
							
							
							llvm-svn: 92145 
							
						 
						
							2009-12-24 21:13:40 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								1749083e2e 
								
							 
						 
						
							
							
								
								Fill in the return value slot in CGExprAgg::VisitCallExpr. This takes us halfway towards fixing PR5824.  
							
							 
							
							... 
							
							
							
							llvm-svn: 92142 
							
						 
						
							2009-12-24 20:40:36 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								61a401caec 
								
							 
						 
						
							
							
								
								Pass ReturnValueSlot to EmitCall. No functionality change yet.  
							
							 
							
							... 
							
							
							
							llvm-svn: 92138 
							
						 
						
							2009-12-24 19:25:24 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								0435ed5875 
								
							 
						 
						
							
							
								
								Add a ReturnValueSlot class. Change the argument order in EmitCall to match the other overload better.  
							
							 
							
							... 
							
							
							
							llvm-svn: 92136 
							
						 
						
							2009-12-24 19:08:58 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								5c13090bd4 
								
							 
						 
						
							
							
								
								Fix double-destruction assertion to account for temporaries in conditionals  
							
							 
							
							... 
							
							
							
							llvm-svn: 92134 
							
						 
						
							2009-12-24 18:16:21 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								4cd5d53ebf 
								
							 
						 
						
							
							
								
								Assert that we aren't trying to push the same C++ temporary onto the live temporary stack twice. A little insurance against PR5867 surprising us again  
							
							 
							
							... 
							
							
							
							llvm-svn: 92132 
							
						 
						
							2009-12-24 17:48:05 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								d538a6d364 
								
							 
						 
						
							
							
								
								Remove some dead code.  
							
							 
							
							... 
							
							
							
							llvm-svn: 92123 
							
						 
						
							2009-12-24 07:29:41 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								4a779b93e4 
								
							 
						 
						
							
							
								
								Cleanup some dead code.  
							
							 
							
							... 
							
							
							
							llvm-svn: 92122 
							
						 
						
							2009-12-24 06:52:05 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								bb2f57dd39 
								
							 
						 
						
							
							
								
								Don't set hidden for a non-external symbol as that would make it extenal.  
							
							 
							
							... 
							
							
							
							Refine codegen for visibility and hidden.  WIP.
llvm-svn: 92118 
							
						 
						
							2009-12-24 02:33:48 +00:00  
						
					 
				
					
						
							
							
								 
								David Chisnall
							
						 
						
							 
							
							
							
							
								
							
							
								3a509cd8cc 
								
							 
						 
						
							
							
								
								Fix for bug 5691.  
							
							 
							
							... 
							
							
							
							This fixes throwing exceptions inside @catch  blocks nested inside outer @try  blocks and also fixes jumping from an inner @finally  to an outer @finally  (via any relevant @catch  blocks).
The code exhibiting this bug was based on code from CGObjCMac.  I believe that this bug may still be present on the Mac runtimes, although the test case in the bug contains a few GNUisms and won't compile without some minor tweaks with Apple's libobjc.
llvm-svn: 92117 
							
						 
						
							2009-12-24 02:26:34 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								a8a2a33af9 
								
							 
						 
						
							
							
								
								Fix recent regression caught by g++.old-deja/g++.mike/eh19.C.  
							
							 
							
							... 
							
							
							
							llvm-svn: 92109 
							
						 
						
							2009-12-24 01:10:27 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								f3c23c0cd4 
								
							 
						 
						
							
							
								
								Fix regression found by g++.dg/eh/alias1.C.  
							
							 
							
							... 
							
							
							
							llvm-svn: 92072 
							
						 
						
							2009-12-23 22:48:20 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								a88d197284 
								
							 
						 
						
							
							
								
								Mangle block pointer types. Fixes PR5858.  
							
							 
							
							... 
							
							
							
							llvm-svn: 92069 
							
						 
						
							2009-12-23 22:31:44 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								247894b361 
								
							 
						 
						
							
							
								
								There is no such thing as typeinfo for a cv-qualified type. Assert  
							
							 
							
							... 
							
							
							
							that this is true when mangling, then fix up the various places in
Sema and/or CodeGen that need to remove qualifiers. Addresses a
linking issue when building LLVM with Clang.
llvm-svn: 92064 
							
						 
						
							2009-12-23 22:04:40 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								f0a9ba37d4 
								
							 
						 
						
							
							
								
								simplify my previous patch.  
							
							 
							
							... 
							
							
							
							llvm-svn: 92057 
							
						 
						
							2009-12-23 21:33:41 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								4e1a323b85 
								
							 
						 
						
							
							
								
								fix opencl extvector element extraction on rvalues.  We previously  
							
							 
							
							... 
							
							
							
							error_unsupported on test10 and crashed on test11.
llvm-svn: 92056 
							
						 
						
							2009-12-23 21:31:11 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								910847c149 
								
							 
						 
						
							
							
								
								Mangle template template parameters. Fixes PR5861.  
							
							 
							
							... 
							
							
							
							llvm-svn: 92030 
							
						 
						
							2009-12-23 19:30:55 +00:00  
						
					 
				
					
						
							
							
								 
								Eric Christopher
							
						 
						
							 
							
							
							
							
								
							
							
								c87915629b 
								
							 
						 
						
							
							
								
								Update for the intrinsic changes in llvm: the object size intrinsic  
							
							 
							
							... 
							
							
							
							only takes a boolean second argument now. Update tests accordingly.
Currently the builtin still accepts the full range for compatibility.
llvm-svn: 91983 
							
						 
						
							2009-12-23 03:49:37 +00:00  
						
					 
				
					
						
							
							
								 
								Ken Dyck
							
						 
						
							 
							
							
							
							
								
							
							
								8c89d59c82 
								
							 
						 
						
							
							
								
								Move the implementation of ASTContext::getTypeSizeInChars() to the .cpp file to  
							
							 
							
							... 
							
							
							
							avoid #including CharUnits.h in ASTContext.h.
llvm-svn: 91903 
							
						 
						
							2009-12-22 14:23:30 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								8a35c7982c 
								
							 
						 
						
							
							
								
								Make sure that we mangle overloaded operators that are member functions correctly, giving them the correct arity.  
							
							 
							
							... 
							
							
							
							With this seemingly insignificant fix, we are now able to build and link clang using clang itself! (LLVM still has to be built with gcc for the time being).
llvm-svn: 91893 
							
						 
						
							2009-12-22 06:36:32 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								3780f0b680 
								
							 
						 
						
							
							
								
								x86_64: Structures with no fields but which have padding should be classified as  
							
							 
							
							... 
							
							
							
							integer.
 - This is consistent, but may not be correct. I will revisit x86_64 ABI handling for C++ as a whole at some point.
 - PR5831.
llvm-svn: 91874 
							
						 
						
							2009-12-22 01:19:25 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								507eb87f05 
								
							 
						 
						
							
							
								
								Eliminate the ASTContext argument to CXXConstructorDecl::isCopyConstructor, since the context is available in the Decl  
							
							 
							
							... 
							
							
							
							llvm-svn: 91862 
							
						 
						
							2009-12-22 00:34:07 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								0f139a1df1 
								
							 
						 
						
							
							
								
								Improve on my previous fix for debug information. Rather than  
							
							 
							
							... 
							
							
							
							recursing in CGDebugInfo::CreateTypeNode, teach
CanonicalizeTypeForDebugInfo---now called UnwrapTypeForDebugInfo---to
keep unwrapping the type until we hit something that can be
represented by debug information. Thanks to Anders for pointing this out!
llvm-svn: 91840 
							
						 
						
							2009-12-21 20:18:30 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								0915b43ac2 
								
							 
						 
						
							
							
								
								Teach debug info generation to handle TemplateSpecializationType,  
							
							 
							
							... 
							
							
							
							ElaboratedType, QualifiedNameType, and SubstTemplateTypeParmType type
nodes. Also, produce an "unsupported" diagnostic for C++0x type nodes
and "typeof" nodes, rather than asserting nondescriptly.
llvm-svn: 91837 
							
						 
						
							2009-12-21 19:57:21 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								2b7f444366 
								
							 
						 
						
							
							
								
								Incomplete structs should also have internal linkage.  
							
							 
							
							... 
							
							
							
							llvm-svn: 91805 
							
						 
						
							2009-12-21 00:41:42 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								18e6ee1b20 
								
							 
						 
						
							
							
								
								Correcly handle pointers to member pointer types where the class or the pointee is incomplete.  
							
							 
							
							... 
							
							
							
							llvm-svn: 91804 
							
						 
						
							2009-12-20 23:37:55 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								d008129f34 
								
							 
						 
						
							
							
								
								Rework the way pointer types are handled by the RTTI builder. We now get the right linkage for indirect pointers to incomplete structs.  
							
							 
							
							... 
							
							
							
							llvm-svn: 91799 
							
						 
						
							2009-12-20 22:30:54 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								e017ecc9e2 
								
							 
						 
						
							
							
								
								Remove ';' after method definition. Noticed by clang++, which one would think  
							
							 
							
							... 
							
							
							
							would have a higher respect for its own code. This is getting old, is this
warning really adding value?
llvm-svn: 91779 
							
						 
						
							2009-12-19 17:50:07 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								357e8c94d6 
								
							 
						 
						
							
							
								
								Fix for PR5524: make reference binding in default argument work correctly.  
							
							 
							
							... 
							
							
							
							llvm-svn: 91733 
							
						 
						
							2009-12-19 00:20:10 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								70724ad2ff 
								
							 
						 
						
							
							
								
								Work in progress for setting the vtable pointers for all bases correctly in  
							
							 
							
							... 
							
							
							
							the constructor.  This doesn't handle cases requiring the VTT at the moment,
and generates unnecessary stores, but I think it's essentially correct.
llvm-svn: 91731 
							
						 
						
							2009-12-18 23:47:41 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								2b677cd4ff 
								
							 
						 
						
							
							
								
								Cleanup switch so it doesn't have a default case.  
							
							 
							
							... 
							
							
							
							llvm-svn: 91725 
							
						 
						
							2009-12-18 23:28:34 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								303e45750e 
								
							 
						 
						
							
							
								
								Fix for PR5830: fix the computation of the offset to a virtual base.  
							
							 
							
							... 
							
							
							
							llvm-svn: 91724 
							
						 
						
							2009-12-18 23:27:44 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								91b640abfc 
								
							 
						 
						
							
							
								
								Fix a few MSVC warnings.  
							
							 
							
							... 
							
							
							
							llvm-svn: 91714 
							
						 
						
							2009-12-18 20:58:47 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								28a133d602 
								
							 
						 
						
							
							
								
								CK_UserDefinedConversion is a valid kind when doing copy ctor elision.  
							
							 
							
							... 
							
							
							
							llvm-svn: 91695 
							
						 
						
							2009-12-18 17:29:21 +00:00  
						
					 
				
					
						
							
							
								 
								Ken Dyck
							
						 
						
							 
							
							
							
							
								
							
							
								01e620efaa 
								
							 
						 
						
							
							
								
								Change the return type of ASTContext::getTypeSizeInChars() from uint64_t to the  
							
							 
							
							... 
							
							
							
							new opaque value type, CharUnits. This will help us avoid accidentally mixing 
quantities that are in bit and character units.
llvm-svn: 91689 
							
						 
						
							2009-12-18 15:55:54 +00:00  
						
					 
				
					
						
							
							
								 
								Ken Dyck
							
						 
						
							 
							
							
							
							
								
							
							
								acfe6aa83a 
								
							 
						 
						
							
							
								
								Rename getByteSize() and getTypeSizeInBytes() in ASTContext to getCharWidth()  
							
							 
							
							... 
							
							
							
							and getTypeSizeInChars() to reflect their basis in character type units, not
that of a possibly independent architecture-specific byte.
llvm-svn: 91688 
							
						 
						
							2009-12-18 15:24:05 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								0087bc851c 
								
							 
						 
						
							
							
								
								Fix regression I introduced when dynamic_cast-ing to a reference type.  
							
							 
							
							... 
							
							
							
							llvm-svn: 91687 
							
						 
						
							2009-12-18 14:55:04 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								b396f43520 
								
							 
						 
						
							
							
								
								It's perfectly fine to see UserDefinedConversion casts when emitting scalar expressions.  
							
							 
							
							... 
							
							
							
							llvm-svn: 91686 
							
						 
						
							2009-12-18 14:42:03 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								357b6fd3e5 
								
							 
						 
						
							
							
								
								Address some of Anders comments  
							
							 
							
							... 
							
							
							
							llvm-svn: 91670 
							
						 
						
							2009-12-18 05:19:44 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								e1314a64b8 
								
							 
						 
						
							
							
								
								Switch the initialization required by return statements over to the  
							
							 
							
							... 
							
							
							
							new InitializationSequence. This fixes some bugs (e.g., PR5808),
changed some diagnostics, and caused more churn than expected. What's
new:
  - InitializationSequence now has a "C conversion sequence" category
    and step kind, which falls back to
  - Changed the diagnostics for returns to always have the result type
    of the function first and the type of the expression second.
    CheckSingleAssignmentConstraints to peform checking in C. 
  - Improved ASTs for initialization of return values. The ASTs now
    capture all of the temporaries we need to create, but
    intentionally do not bind the tempoary that is actually returned,
    so that it won't get destroyed twice.
  - Make sure to perform an (elidable!) copy of the class object that
    is returned from a class.
  - Fix copy elision in CodeGen to properly see through the
    subexpressions that occur with elidable copies.
  - Give "new" its own entity kind; as with return values and thrown
    objects, we don't bind the expression so we don't call a
    destructor for it.
Note that, with this patch, I've broken returning move-only types in
C++0x. We'll fix it later, when we tackle NRVO.
llvm-svn: 91669 
							
						 
						
							2009-12-18 05:02:21 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								24c7f5efc5 
								
							 
						 
						
							
							
								
								Add -dwarf-debug-flags, which provides a way to embed the cc1 level options used  
							
							 
							
							... 
							
							
							
							to compile a translation unit into the debug info for that file.
 - Used by parts of Darwin build process to check compiler flags, etc.
 - <rdar://problem/7256886> clang does not emit AT_APPLE_flags
llvm-svn: 91661 
							
						 
						
							2009-12-18 02:43:17 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								0da53228e6 
								
							 
						 
						
							
							
								
								Handle case when DestPtr is 0.  
							
							 
							
							... 
							
							
							
							llvm-svn: 91658 
							
						 
						
							2009-12-18 02:14:27 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								3f4336cb1f 
								
							 
						 
						
							
							
								
								Rename GetAddrOfRTTI to GetAddrOfRTTIDescriptor. Remove the overload that takes a CXXRecordDecl since we were just creating a QualType from it anyway.  
							
							 
							
							... 
							
							
							
							llvm-svn: 91590 
							
						 
						
							2009-12-17 07:09:17 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								cd8faeb0b1 
								
							 
						 
						
							
							
								
								Ensure we run cleanups for CXXTemporaries on the exceptional edge.  WIP.  
							
							 
							
							... 
							
							
							
							llvm-svn: 91588 
							
						 
						
							2009-12-17 06:08:47 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								1fd734276d 
								
							 
						 
						
							
							
								
								Simplify RTTIBuilder::finish.  
							
							 
							
							... 
							
							
							
							llvm-svn: 91585 
							
						 
						
							2009-12-17 05:10:59 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								e5a94105eb 
								
							 
						 
						
							
							
								
								Move the Info vector into the RTTIBuilder struct. No functionality change.  
							
							 
							
							... 
							
							
							
							llvm-svn: 91583 
							
						 
						
							2009-12-17 05:06:03 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								7f4933f6c7 
								
							 
						 
						
							
							
								
								Fix for PR5801: codegen memcpy, memmove, memset directly to LLVM intrinsics.  
							
							 
							
							... 
							
							
							
							llvm-svn: 91573 
							
						 
						
							2009-12-17 00:14:28 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								4f4b186215 
								
							 
						 
						
							
							
								
								When value-initializing a class with no user-defined constructors but  
							
							 
							
							... 
							
							
							
							with a non-trivial default constructor, zero-initialize the storage
and then call the default constructor. Fixes PR5800.
llvm-svn: 91548 
							
						 
						
							2009-12-16 18:50:27 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								d681a29ac0 
								
							 
						 
						
							
							
								
								Baby steps towards fixing PR5589. If a class needs a vtable pointer, add one.  
							
							 
							
							... 
							
							
							
							llvm-svn: 91545 
							
						 
						
							2009-12-16 17:27:20 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								07863b8b6e 
								
							 
						 
						
							
							
								
								Use GetAddrOfRTTI everywhere and remove GenerateRTTI and GenerateRTTIRef. With this change, we can now compile and link TableGen.  
							
							 
							
							... 
							
							
							
							llvm-svn: 91520 
							
						 
						
							2009-12-16 07:05:41 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								18ada9856f 
								
							 
						 
						
							
							
								
								Handle ImplicitValueInitExpr in AggExprEmitter.  
							
							 
							
							... 
							
							
							
							llvm-svn: 91519 
							
						 
						
							2009-12-16 06:57:54 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								b7e93e268f 
								
							 
						 
						
							
							
								
								Mangle CXXOperatorCallExprs, fixes PR5796.  
							
							 
							
							... 
							
							
							
							llvm-svn: 91507 
							
						 
						
							2009-12-16 05:48:46 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								b85ffb689e 
								
							 
						 
						
							
							
								
								Add an addition check for undefined behavior for when we hit a  
							
							 
							
							... 
							
							
							
							__builtin_unreachable.  WIP.
llvm-svn: 91499 
							
						 
						
							2009-12-16 03:07:12 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								3f6f9febad 
								
							 
						 
						
							
							
								
								Implement additional undefined checks for additional loads and stores.  WIP.  
							
							 
							
							... 
							
							
							
							llvm-svn: 91498 
							
						 
						
							2009-12-16 02:57:00 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								2b9fc83db5 
								
							 
						 
						
							
							
								
								Fixes a code gen bug related to accessing a now  
							
							 
							
							... 
							
							
							
							non-existing 'isa' field of a non-existing struct type
all related to legacy type definition for 'id' which we have
dropped in clang in favor of a built-in type.
(fixes radar 7470820).
llvm-svn: 91455 
							
						 
						
							2009-12-15 21:34:52 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								6e997b2993 
								
							 
						 
						
							
							
								
								ShouldDestroyTemporaries? I don't think so.  
							
							 
							
							... 
							
							
							
							llvm-svn: 91450 
							
						 
						
							2009-12-15 20:51:39 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								2f3da9b205 
								
							 
						 
						
							
							
								
								update to match LLVM API change:  
							
							 
							
							... 
							
							
							
							Remove isPod() from DenseMapInfo, splitting it out to its own
isPodLike type trait.  This is a generally useful type trait for
more than just DenseMap, and we really care about whether something
acts like a pod, not whether it really is a pod.
llvm-svn: 91422 
							
						 
						
							2009-12-15 07:26:51 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								2151725325 
								
							 
						 
						
							
							
								
								Fix a small bug in ComputeMethodVtableIndices.  
							
							 
							
							... 
							
							
							
							llvm-svn: 91411 
							
						 
						
							2009-12-15 03:31:17 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								d777cccb47 
								
							 
						 
						
							
							
								
								Don't force the emission of destructor definitions.  
							
							 
							
							... 
							
							
							
							llvm-svn: 91394 
							
						 
						
							2009-12-15 02:06:15 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								cf16d2cc42 
								
							 
						 
						
							
							
								
								Fix spacing.  
							
							 
							
							... 
							
							
							
							llvm-svn: 91386 
							
						 
						
							2009-12-15 01:22:35 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								9a4e0128a8 
								
							 
						 
						
							
							
								
								Ensure we preserve line information for each  trap for  
							
							 
							
							... 
							
							
							
							-fcatch-undefined-behavior if we aren't optimizing.  WIP.
llvm-svn: 91382 
							
						 
						
							2009-12-15 00:59:40 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								e8c3b3eca4 
								
							 
						 
						
							
							
								
								Switch codegen for -fcatch-undefined-bahavior over to __builtin_trap  
							
							 
							
							... 
							
							
							
							instead of abort to improve codesize and codegen.
llvm-svn: 91374 
							
						 
						
							2009-12-15 00:35:12 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								590d18f103 
								
							 
						 
						
							
							
								
								We have to allow one to form an address for one past the end.  WIP.  
							
							 
							
							... 
							
							
							
							llvm-svn: 91347 
							
						 
						
							2009-12-14 22:14:31 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								ba6a0c40c4 
								
							 
						 
						
							
							
								
								Add support for detecting undefined shift behavior.  WIP.  
							
							 
							
							... 
							
							
							
							llvm-svn: 91341 
							
						 
						
							2009-12-14 21:58:14 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								9ac0a04b29 
								
							 
						 
						
							
							
								
								Patch to fix 32-bit  @try  failure with internal assertion when compiling  
							
							 
							
							... 
							
							
							
							an Objective-C rethrow nested inside another try/catch block. (fixes radar 7466728).
llvm-svn: 91335 
							
						 
						
							2009-12-14 21:35:01 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								f8858af909 
								
							 
						 
						
							
							
								
								Simplifiy.  
							
							 
							
							... 
							
							
							
							llvm-svn: 91324 
							
						 
						
							2009-12-14 20:52:00 +00:00  
						
					 
				
					
						
							
							
								 
								Nate Begeman
							
						 
						
							 
							
							
							
							
								
							
							
								67dfd4236a 
								
							 
						 
						
							
							
								
								Revert mmx palignr to use an intrinsic, since mmx shuffle patterns are missing.  
							
							 
							
							... 
							
							
							
							llvm-svn: 91269 
							
						 
						
							2009-12-14 05:15:02 +00:00  
						
					 
				
					
						
							
							
								 
								Nate Begeman
							
						 
						
							 
							
							
							
							
								
							
							
								72ec6bc6f4 
								
							 
						 
						
							
							
								
								Support x86's PALIGNR instruction without the use of a palignr intrinsic.  
							
							 
							
							... 
							
							
							
							llvm-svn: 91264 
							
						 
						
							2009-12-14 04:57:03 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								e66e2942fc 
								
							 
						 
						
							
							
								
								Mangle unary, binary and ternary expressions correctly.  
							
							 
							
							... 
							
							
							
							llvm-svn: 91257 
							
						 
						
							2009-12-14 01:45:37 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								c67974ccb1 
								
							 
						 
						
							
							
								
								Simplify BuildSimpleType in the RTTBuilder to avoid using an std::vector.  
							
							 
							
							... 
							
							
							
							llvm-svn: 91255 
							
						 
						
							2009-12-13 23:47:29 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								399f499f0c 
								
							 
						 
						
							
							
								
								Don't use a cookie if the global placement new function is used.  
							
							 
							
							... 
							
							
							
							llvm-svn: 91251 
							
						 
						
							2009-12-13 20:34:34 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								adbe4249d6 
								
							 
						 
						
							
							
								
								Fix regression in my last commit - if a struct has a trivial destructor but no usual deallocation function we don't need a cookie.  
							
							 
							
							... 
							
							
							
							llvm-svn: 91249 
							
						 
						
							2009-12-13 20:10:12 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								21122cf657 
								
							 
						 
						
							
							
								
								More array cookie improvements.  
							
							 
							
							... 
							
							
							
							llvm-svn: 91247 
							
						 
						
							2009-12-13 20:04:38 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								f5af8dead7 
								
							 
						 
						
							
							
								
								If the usual array deallocation function of a class takes two arguments, we need to pass the number of bytes allocated to the deallocation function, just not the number of bytes in a single element.  
							
							 
							
							... 
							
							
							
							llvm-svn: 91246 
							
						 
						
							2009-12-13 18:48:07 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								e7025c55a4 
								
							 
						 
						
							
							
								
								Change the RTTIBuilder's finish member function to take a pointer to the constants array + the length of the array.  
							
							 
							
							... 
							
							
							
							llvm-svn: 91241 
							
						 
						
							2009-12-13 16:38:01 +00:00  
						
					 
				
					
						
							
							
								 
								Chandler Carruth
							
						 
						
							 
							
							
							
							
								
							
							
								8abbc657a9 
								
							 
						 
						
							
							
								
								Silence some release build warnings.  
							
							 
							
							... 
							
							
							
							llvm-svn: 91234 
							
						 
						
							2009-12-13 01:37:04 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								751c1e7b24 
								
							 
						 
						
							
							
								
								patch to add a property from a protocol to a class that adopts the protocol.  
							
							 
							
							... 
							
							
							
							(fixes radar 7466494).
llvm-svn: 91227 
							
						 
						
							2009-12-12 21:26:21 +00:00  
						
					 
				
					
						
							
							
								 
								Jeffrey Yasskin
							
						 
						
							 
							
							
							
							
								
							
							
								1615d45daa 
								
							 
						 
						
							
							
								
								Un-namespace-qualify llvm_unreachable. It's a macro, so the qualification gave  
							
							 
							
							... 
							
							
							
							no extra safety anyway.
llvm-svn: 91207 
							
						 
						
							2009-12-12 05:05:38 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								d954638f02 
								
							 
						 
						
							
							
								
								Implement runtime checks for undefined behavior.  WIP.  
							
							 
							
							... 
							
							
							
							This implements a new flag -fcatch-undefined-behavior.  The flag turns
on additional runtime checks for:
  T a[I];
  a[i]    abort when i < 0 or i >= I.
Future stuff includes shifts by >= bitwidth amounts.
llvm-svn: 91198 
							
						 
						
							2009-12-12 01:27:46 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								ffe912c647 
								
							 
						 
						
							
							
								
								Patch to allow C-style cast from 'void *' to block pointer type.  
							
							 
							
							... 
							
							
							
							(fixes radar 7465023).
llvm-svn: 91171 
							
						 
						
							2009-12-11 22:40:48 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								b095e15af4 
								
							 
						 
						
							
							
								
								Fix for PR5714: make sure globals that will be modified aren't marked const.  
							
							 
							
							... 
							
							
							
							llvm-svn: 91156 
							
						 
						
							2009-12-11 21:23:03 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								3ace52b3a7 
								
							 
						 
						
							
							
								
								Fix linkage of type info and vtable for classes without linkage.  
							
							 
							
							... 
							
							
							
							llvm-svn: 91152 
							
						 
						
							2009-12-11 20:48:18 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								75c9b97123 
								
							 
						 
						
							
							
								
								Make sure mangling doesn't crash in another case.  Add some more tests.  
							
							 
							
							... 
							
							
							
							llvm-svn: 91149 
							
						 
						
							2009-12-11 20:21:38 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								30e94d047e 
								
							 
						 
						
							
							
								
								Fix for PR5706: let mangleName deal with mangling names without identifiers  
							
							 
							
							... 
							
							
							
							correctly.
llvm-svn: 91136 
							
						 
						
							2009-12-11 18:00:57 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								1d6ad50826 
								
							 
						 
						
							
							
								
								Move info vectors and add assertions in preparation of moving the vector directly into RTTIBuilder.  
							
							 
							
							... 
							
							
							
							llvm-svn: 91129 
							
						 
						
							2009-12-11 16:41:51 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								a0b98f083a 
								
							 
						 
						
							
							
								
								Use GetAddrOfRTTI when getting the RTTI pointer for a base class.  
							
							 
							
							... 
							
							
							
							llvm-svn: 91127 
							
						 
						
							2009-12-11 16:37:06 +00:00  
						
					 
				
					
						
							
							
								 
								Benjamin Kramer
							
						 
						
							 
							
							
							
							
								
							
							
								b11118bd0b 
								
							 
						 
						
							
							
								
								Random string-related cleanups.  
							
							 
							
							... 
							
							
							
							llvm-svn: 91119 
							
						 
						
							2009-12-11 13:33:18 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								68396b16f6 
								
							 
						 
						
							
							
								
								Move the code for converting a member pointer to a bool so that it is usable  
							
							 
							
							... 
							
							
							
							for logical not.
llvm-svn: 91112 
							
						 
						
							2009-12-11 09:26:29 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								1762cf2ad0 
								
							 
						 
						
							
							
								
								Fix for PR5718: implement equality comparisons for member function pointers.  
							
							 
							
							... 
							
							
							
							llvm-svn: 91108 
							
						 
						
							2009-12-11 07:36:43 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								fd7dfeb779 
								
							 
						 
						
							
							
								
								Improve linkage of RTTI data structures. Introduce CodeGenModule::GetAddrOfRTTI which figures out the right linkage of the RTTI information for the given type and whether it should be defined or not. I will migrate clients over to GetAddrOfRTTI in subsequent commits (with tests).  
							
							 
							
							... 
							
							
							
							llvm-svn: 91098 
							
						 
						
							2009-12-11 02:46:30 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								c988201417 
								
							 
						 
						
							
							
								
								Use named flags in RTTIBuilder::BuildPointerType.  
							
							 
							
							... 
							
							
							
							llvm-svn: 91088 
							
						 
						
							2009-12-11 01:27:37 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								0c6a7d8f42 
								
							 
						 
						
							
							
								
								When extending the lifetime of a temporary, make sure to emit a branch to the cleanup exit block. This fixes a broken module error in LLVMCConfigurationEmitter.cpp.  
							
							 
							
							... 
							
							
							
							llvm-svn: 91086 
							
						 
						
							2009-12-11 01:00:09 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								afd1edb52e 
								
							 
						 
						
							
							
								
								When an exception needs to be freed by calling __cxa_exception_free, make sure to stash away the exception pointer somewhere.  
							
							 
							
							... 
							
							
							
							This fixes an "Instruction does not dominate all uses!" verification error when compiling TableGen.
llvm-svn: 91084 
							
						 
						
							2009-12-11 00:32:37 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								37077bf651 
								
							 
						 
						
							
							
								
								Fix spacing.  
							
							 
							
							... 
							
							
							
							llvm-svn: 91078 
							
						 
						
							2009-12-11 00:02:10 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								d70bbfd7d8 
								
							 
						 
						
							
							
								
								Support unary type traits in a scalar context.  Not that I've actually seen  
							
							 
							
							... 
							
							
							
							this construct, but might as well for completeness.
llvm-svn: 91071 
							
						 
						
							2009-12-10 22:40:32 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								781161dc55 
								
							 
						 
						
							
							
								
								Make sure that explicitly instantiated functions get the right linkage.  
							
							 
							
							... 
							
							
							
							llvm-svn: 91069 
							
						 
						
							2009-12-10 22:25:34 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								bf56946073 
								
							 
						 
						
							
							
								
								Mangle static variables inside Objective-C methods in Objective-C++. We currently mangle them the same way as gcc does.  
							
							 
							
							... 
							
							
							
							llvm-svn: 91042 
							
						 
						
							2009-12-10 03:14:39 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								d5bc94e2eb 
								
							 
						 
						
							
							
								
								Get rid of static variable.  
							
							 
							
							... 
							
							
							
							llvm-svn: 91041 
							
						 
						
							2009-12-10 02:21:21 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								fefc7b8e7b 
								
							 
						 
						
							
							
								
								Actually store the pointer into the global variable, spotted by Eli.  
							
							 
							
							... 
							
							
							
							llvm-svn: 91036 
							
						 
						
							2009-12-10 01:58:33 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								3c6a12ca65 
								
							 
						 
						
							
							
								
								Setup cleanup on eh edge out of the construction of the cleanup object  
							
							 
							
							... 
							
							
							
							during throw to deallocate the exception object.  WIP.
llvm-svn: 91035 
							
						 
						
							2009-12-10 01:52:30 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								a72ddd4609 
								
							 
						 
						
							
							
								
								Handle emitting static variables that have reference type.  
							
							 
							
							... 
							
							
							
							llvm-svn: 91027 
							
						 
						
							2009-12-10 01:05:11 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								364051c6a6 
								
							 
						 
						
							
							
								
								Separate generating code for static variables and global variables.  
							
							 
							
							... 
							
							
							
							llvm-svn: 91026 
							
						 
						
							2009-12-10 00:57:45 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								633c6f6f36 
								
							 
						 
						
							
							
								
								Move more decl related functions to CGDeclCXX.cpp  
							
							 
							
							... 
							
							
							
							llvm-svn: 91012 
							
						 
						
							2009-12-10 00:30:05 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								bc49cfed84 
								
							 
						 
						
							
							
								
								Add CGDeclCXX.cpp and move EmitCXXGlobalVarDeclInit there.  
							
							 
							
							... 
							
							
							
							llvm-svn: 91006 
							
						 
						
							2009-12-10 00:16:00 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								75546b8c88 
								
							 
						 
						
							
							
								
								Fixup spacing.  
							
							 
							
							... 
							
							
							
							llvm-svn: 91001 
							
						 
						
							2009-12-10 00:06:18 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								2600491817 
								
							 
						 
						
							
							
								
								Fix spacing.  
							
							 
							
							... 
							
							
							
							llvm-svn: 91000 
							
						 
						
							2009-12-10 00:05:14 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								f5cbb08c4b 
								
							 
						 
						
							
							
								
								Ensure we only generate one terminate handler.  
							
							 
							
							... 
							
							
							
							llvm-svn: 90998 
							
						 
						
							2009-12-10 00:02:42 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								3b60f034f9 
								
							 
						 
						
							
							
								
								Remove obsolete FIXME and some dead fallback code.  
							
							 
							
							... 
							
							
							
							llvm-svn: 90997 
							
						 
						
							2009-12-09 23:52:09 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								102530719f 
								
							 
						 
						
							
							
								
								Add terminate handler to cleanups on exceptional edges.  
							
							 
							
							... 
							
							
							
							llvm-svn: 90996 
							
						 
						
							2009-12-09 23:49:53 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								531c16f9fb 
								
							 
						 
						
							
							
								
								Code gen for ObjCIsaExpr AST used as lvalue.  
							
							 
							
							... 
							
							
							
							(fixes radar 7457534).
llvm-svn: 90995 
							
						 
						
							2009-12-09 23:35:29 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								25b20fc2ae 
								
							 
						 
						
							
							
								
								Add terminate handler for copy constructors for thrown objects.  WIP.  
							
							 
							
							... 
							
							
							
							llvm-svn: 90994 
							
						 
						
							2009-12-09 23:31:35 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								2b488873bf 
								
							 
						 
						
							
							
								
								Break out code for reuse.  WIP.  
							
							 
							
							... 
							
							
							
							llvm-svn: 90991 
							
						 
						
							2009-12-09 22:59:31 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								f16b8c30d9 
								
							 
						 
						
							
							
								
								Add throw support.  WIP.  
							
							 
							
							... 
							
							
							
							llvm-svn: 90982 
							
						 
						
							2009-12-09 19:24:08 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								a5fee26d28 
								
							 
						 
						
							
							
								
								Codegen. support for ObjCIsaExpr AST which until now  
							
							 
							
							... 
							
							
							
							was not needed (fixes radar 7453430).
llvm-svn: 90981 
							
						 
						
							2009-12-09 19:05:56 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								aff69af918 
								
							 
						 
						
							
							
								
								Add cleanups for exceptional edges.  WIP.  
							
							 
							
							... 
							
							
							
							llvm-svn: 90940 
							
						 
						
							2009-12-09 03:35:49 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								4f678f3de1 
								
							 
						 
						
							
							
								
								Fix for PR5709: use the computed type of the declaration instead of the  
							
							 
							
							... 
							
							
							
							type of the builtin when generating the function declaration for a builtin
library call.
llvm-svn: 90936 
							
						 
						
							2009-12-09 03:05:59 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								859c415567 
								
							 
						 
						
							
							
								
								More detailed analysis of typecast to an objective-c pointer  
							
							 
							
							... 
							
							
							
							in objective-c++ mode without being too lenient.
llvm-svn: 90895 
							
						 
						
							2009-12-08 23:09:15 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								4a6b337cfd 
								
							 
						 
						
							
							
								
								Add fixme.  
							
							 
							
							... 
							
							
							
							llvm-svn: 90884 
							
						 
						
							2009-12-08 22:12:48 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								e6d54ca553 
								
							 
						 
						
							
							
								
								Remove some old code.  WIP.  
							
							 
							
							... 
							
							
							
							llvm-svn: 90882 
							
						 
						
							2009-12-08 21:46:41 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								17c4f8d746 
								
							 
						 
						
							
							
								
								Update CGExprConstant for change to emit padding values as undef.  
							
							 
							
							... 
							
							
							
							- This fixes 2003-05-21-BitfieldHandling.
llvm-svn: 90876 
							
						 
						
							2009-12-08 21:12:32 +00:00  
						
					 
				
					
						
							
							
								 
								Benjamin Kramer
							
						 
						
							 
							
							
							
							
								
							
							
								ba8451b243 
								
							 
						 
						
							
							
								
								Use StringRef in CGDebugInfo::EmitFunctionStart.  
							
							 
							
							... 
							
							
							
							llvm-svn: 90856 
							
						 
						
							2009-12-08 14:04:35 +00:00  
						
					 
				
					
						
							
							
								 
								Benjamin Kramer
							
						 
						
							 
							
							
							
							
								
							
							
								43c7c5befd 
								
							 
						 
						
							
							
								
								Use a Twine to concatenate the name instead of going through std::string.  
							
							 
							
							... 
							
							
							
							llvm-svn: 90854 
							
						 
						
							2009-12-08 13:07:37 +00:00  
						
					 
				
					
						
							
							
								 
								Benjamin Kramer
							
						 
						
							 
							
							
							
							
								
							
							
								1d20564b8d 
								
							 
						 
						
							
							
								
								Use Path.makeAbsolute() and make a constant std::string a const char*.  
							
							 
							
							... 
							
							
							
							llvm-svn: 90851 
							
						 
						
							2009-12-08 11:02:29 +00:00  
						
					 
				
					
						
							
							
								 
								John McCall
							
						 
						
							 
							
							
							
							
								
							
							
								ce54657e95 
								
							 
						 
						
							
							
								
								DeclRefExpr stores a ValueDecl internally.  
							
							 
							
							... 
							
							
							
							Template instantiation can re-use DeclRefExprs.
llvm-svn: 90848 
							
						 
						
							2009-12-08 09:08:17 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								80888c7b38 
								
							 
						 
						
							
							
								
								Build fix.  
							
							 
							
							... 
							
							
							
							llvm-svn: 90841 
							
						 
						
							2009-12-08 06:54:20 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								bb5008a32a 
								
							 
						 
						
							
							
								
								Fix for PR5707: make sure implicit copy constructors initialize the vtable  
							
							 
							
							... 
							
							
							
							pointer.
llvm-svn: 90840 
							
						 
						
							2009-12-08 06:46:18 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								48c6b0d14f 
								
							 
						 
						
							
							
								
								Slight tweak to vtable linkage.  
							
							 
							
							... 
							
							
							
							llvm-svn: 90832 
							
						 
						
							2009-12-08 04:09:14 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								f2c79b6b9c 
								
							 
						 
						
							
							
								
								Misc key function fixes.  
							
							 
							
							... 
							
							
							
							llvm-svn: 90831 
							
						 
						
							2009-12-08 03:56:49 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								8aaff69e86 
								
							 
						 
						
							
							
								
								Fix some direct checks of expressions which might be surrounded by parentheses.  
							
							 
							
							... 
							
							
							
							llvm-svn: 90825 
							
						 
						
							2009-12-08 02:09:46 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								cd6a50f3e5 
								
							 
						 
						
							
							
								
								Make copy assignment operator synthesis not explode for classes with complex  
							
							 
							
							... 
							
							
							
							or non-record aggregate members.
It might be worth spending some time to optimize this code (and the parallel
code for copy constructors) to memcpy in larger chunks, rather than copying
one member at a time.  Not sure exactly how beneficial that would be, but
it seems like could help for large classes with, for example, a vtable pointer
forcing the generation of a copy constructor.
llvm-svn: 90823 
							
						 
						
							2009-12-08 01:57:53 +00:00  
						
					 
				
					
						
							
							
								 
								Jeffrey Yasskin
							
						 
						
							 
							
							
							
							
								
							
							
								567ae47b4a 
								
							 
						 
						
							
							
								
								Remove several .c_str() to be forward-compatible with StringRef.  
							
							 
							
							... 
							
							
							
							llvm-svn: 90822 
							
						 
						
							2009-12-08 01:46:24 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								02c23d68cb 
								
							 
						 
						
							
							
								
								Fixup catch parameters with class reference type.  WIP.  
							
							 
							
							... 
							
							
							
							llvm-svn: 90821 
							
						 
						
							2009-12-08 01:29:31 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								220bf4fc5a 
								
							 
						 
						
							
							
								
								No need to add tail padding if the resulting LLVM struct type will have the same size as the final record size.  
							
							 
							
							... 
							
							
							
							llvm-svn: 90820 
							
						 
						
							2009-12-08 01:24:23 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								31bc3ad275 
								
							 
						 
						
							
							
								
								A bunch more thunk fixes from misc testing.  
							
							 
							
							... 
							
							
							
							(Yes, I do intend to commit some tests for this.)
llvm-svn: 90818 
							
						 
						
							2009-12-07 23:56:34 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								1d849219a5 
								
							 
						 
						
							
							
								
								Add codegen support for exception specifications.  WIP.  
							
							 
							
							... 
							
							
							
							llvm-svn: 90817 
							
						 
						
							2009-12-07 23:38:24 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								f6c175b745 
								
							 
						 
						
							
							
								
								Correctly handle conditional operators involving throw.  
							
							 
							
							... 
							
							
							
							llvm-svn: 90800 
							
						 
						
							2009-12-07 20:25:53 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								5445f6e5b6 
								
							 
						 
						
							
							
								
								Make the comma operator consistently call EnsureInsertPoint.  
							
							 
							
							... 
							
							
							
							llvm-svn: 90799 
							
						 
						
							2009-12-07 20:18:11 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								62afe99814 
								
							 
						 
						
							
							
								
								Work around emitters that can't deal with dead code contexts yet.  
							
							 
							
							... 
							
							
							
							llvm-svn: 90796 
							
						 
						
							2009-12-07 20:12:14 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								1aaecfa02d 
								
							 
						 
						
							
							
								
								Mangle basic_ostream and basic_iostream specializations.  
							
							 
							
							... 
							
							
							
							llvm-svn: 90794 
							
						 
						
							2009-12-07 19:56:42 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								52d7141186 
								
							 
						 
						
							
							
								
								Remove obsolete fallback code for objectsize.  
							
							 
							
							... 
							
							
							
							llvm-svn: 90780 
							
						 
						
							2009-12-07 18:58:11 +00:00  
						
					 
				
					
						
							
							
								 
								Nuno Lopes
							
						 
						
							 
							
							
							
							
								
							
							
								7251327d75 
								
							 
						 
						
							
							
								
								implement PR5274: mark 'restrict' parameters as noalias  
							
							 
							
							... 
							
							
							
							llvm-svn: 90778 
							
						 
						
							2009-12-07 18:30:06 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								e1b3e6292a 
								
							 
						 
						
							
							
								
								It's OK to try to emit a vtable definition more than once. Fixes PR5697.  
							
							 
							
							... 
							
							
							
							llvm-svn: 90751 
							
						 
						
							2009-12-07 07:59:52 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								c0dacee1e0 
								
							 
						 
						
							
							
								
								Erm, revert for the moment; I didn't test this as thoroughly as I should have  
							
							 
							
							... 
							
							
							
							(although it does pass regression tests).
llvm-svn: 90747 
							
						 
						
							2009-12-07 04:45:50 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								c5d3a6ae3d 
								
							 
						 
						
							
							
								
								Tweak the formula for non-virtual offsets to something which appears a bit  
							
							 
							
							... 
							
							
							
							more accurate.
llvm-svn: 90746 
							
						 
						
							2009-12-07 04:38:34 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								5ebf8b44e9 
								
							 
						 
						
							
							
								
								Move key functions to a separate map.  
							
							 
							
							... 
							
							
							
							llvm-svn: 90745 
							
						 
						
							2009-12-07 04:35:11 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								f2eda5efd2 
								
							 
						 
						
							
							
								
								Be a bit more complete about accumulating SavedThisAdjustments.  
							
							 
							
							... 
							
							
							
							llvm-svn: 90723 
							
						 
						
							2009-12-06 22:33:51 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								8174f2c23c 
								
							 
						 
						
							
							
								
								Work-in-progess rewrite of thunks: move thunk generation outside of vtable  
							
							 
							
							... 
							
							
							
							generation, and make sure we generate thunks when the function is defined
rather than when the vtable is defined.
llvm-svn: 90722 
							
						 
						
							2009-12-06 22:01:30 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								3efc6e6f46 
								
							 
						 
						
							
							
								
								Add rudimentary support for member pointers to CGDebugInfo.  
							
							 
							
							... 
							
							
							
							llvm-svn: 90711 
							
						 
						
							2009-12-06 18:00:51 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								72ecc68e11 
								
							 
						 
						
							
							
								
								use new helpers to simplify code.  
							
							 
							
							... 
							
							
							
							llvm-svn: 90709 
							
						 
						
							2009-12-06 17:22:42 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								fe5f7d916f 
								
							 
						 
						
							
							
								
								Set the correct linkage for VTTs as well.  
							
							 
							
							... 
							
							
							
							llvm-svn: 90689 
							
						 
						
							2009-12-06 01:09:21 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								232324c5c0 
								
							 
						 
						
							
							
								
								More linkage improvements.  
							
							 
							
							... 
							
							
							
							llvm-svn: 90687 
							
						 
						
							2009-12-06 00:53:22 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								0911ae8ef2 
								
							 
						 
						
							
							
								
								Pass the desired vtable linkage to GenerateVtable directly. Only call MaybeMarkVirtualImplicitMembersReferenced for non-inline functions.  
							
							 
							
							... 
							
							
							
							llvm-svn: 90686 
							
						 
						
							2009-12-06 00:23:49 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								7e28c5f2e2 
								
							 
						 
						
							
							
								
								Make GenerateVtable a private member function of CGVtableInfo.  
							
							 
							
							... 
							
							
							
							llvm-svn: 90684 
							
						 
						
							2009-12-06 00:01:05 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								4ed44eb7d9 
								
							 
						 
						
							
							
								
								Only emit the vtable definition if the class has a key function and we're emitting it, or if the class doesn't have a key function and we are emitting the complete constructor.  
							
							 
							
							... 
							
							
							
							llvm-svn: 90681 
							
						 
						
							2009-12-05 22:42:54 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								0ab79e22ab 
								
							 
						 
						
							
							
								
								If a class does not have a key function, its linkage should be weak_odr.  
							
							 
							
							... 
							
							
							
							llvm-svn: 90680 
							
						 
						
							2009-12-05 22:24:38 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								58b271d450 
								
							 
						 
						
							
							
								
								Use createGlobalVariable for creating vtable variables too.  
							
							 
							
							... 
							
							
							
							llvm-svn: 90679 
							
						 
						
							2009-12-05 22:19:10 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								b3f54b748d 
								
							 
						 
						
							
							
								
								CodeGenModule::GenerateVtable now returns a pointer directly to the vtable and not to the address point.  
							
							 
							
							... 
							
							
							
							llvm-svn: 90676 
							
						 
						
							2009-12-05 21:28:12 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								a95d4c51dc 
								
							 
						 
						
							
							
								
								Make sure that hte vtable always has an i8* array type.  
							
							 
							
							... 
							
							
							
							llvm-svn: 90675 
							
						 
						
							2009-12-05 21:09:05 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								c8e39ec79f 
								
							 
						 
						
							
							
								
								Add a function for getting the vtable address point of a class.  
							
							 
							
							... 
							
							
							
							llvm-svn: 90674 
							
						 
						
							2009-12-05 21:03:56 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								b694f05ffb 
								
							 
						 
						
							
							
								
								Simplify BuildVTT.  
							
							 
							
							... 
							
							
							
							llvm-svn: 90673 
							
						 
						
							2009-12-05 21:02:25 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								b78d093fcc 
								
							 
						 
						
							
							
								
								Let the VTT builder pretend that getVtable returns a pointer to the vtable and not to the vtable address point.  
							
							 
							
							... 
							
							
							
							llvm-svn: 90672 
							
						 
						
							2009-12-05 20:58:49 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								78c2898e02 
								
							 
						 
						
							
							
								
								Change getCtorVtable to not return the address point offset, but the global variable.  
							
							 
							
							... 
							
							
							
							llvm-svn: 90671 
							
						 
						
							2009-12-05 20:42:53 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								5a1a84f9fa 
								
							 
						 
						
							
							
								
								Simplify some code.  
							
							 
							
							... 
							
							
							
							llvm-svn: 90670 
							
						 
						
							2009-12-05 18:38:15 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								21bbc1e705 
								
							 
						 
						
							
							
								
								Factor vtable related GlobalVariable creation out into a separate function. Add vtable linkage test.  
							
							 
							
							... 
							
							
							
							llvm-svn: 90667 
							
						 
						
							2009-12-05 17:04:47 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								e99c110d06 
								
							 
						 
						
							
							
								
								implement rdar://7346691 by codegen'ing struct/array initializers  
							
							 
							
							... 
							
							
							
							to a memset or a memcpy from a global when possible.
llvm-svn: 90658 
							
						 
						
							2009-12-05 08:22:11 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								e08ea7874a 
								
							 
						 
						
							
							
								
								various cleanups.  
							
							 
							
							... 
							
							
							
							llvm-svn: 90657 
							
						 
						
							2009-12-05 08:21:30 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								ffcd06ea7c 
								
							 
						 
						
							
							
								
								simplify a condition and add a testcase.  
							
							 
							
							... 
							
							
							
							llvm-svn: 90652 
							
						 
						
							2009-12-05 06:49:57 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								6c08ce7706 
								
							 
						 
						
							
							
								
								Skip actually generating the vtable unless we are defining it.  This avoids  
							
							 
							
							... 
							
							
							
							the side-effects of generating the methods in the vtable (including PR5676).
llvm-svn: 90635 
							
						 
						
							2009-12-05 01:05:03 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								a30e1750cd 
								
							 
						 
						
							
							
								
								Don't emit explicit specializations of static member variable declarations.  
							
							 
							
							... 
							
							
							
							llvm-svn: 90624 
							
						 
						
							2009-12-04 23:50:01 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								bee78dd31b 
								
							 
						 
						
							
							
								
								Add support for function try blocks.  
							
							 
							
							... 
							
							
							
							llvm-svn: 90622 
							
						 
						
							2009-12-04 23:26:17 +00:00  
						
					 
				
					
						
							
							
								 
								John McCall
							
						 
						
							 
							
							
							
							
								
							
							
								b96ec56871 
								
							 
						 
						
							
							
								
								Fix "using typename" and the instantiation of non-dependent using declarations.  
							
							 
							
							... 
							
							
							
							llvm-svn: 90614 
							
						 
						
							2009-12-04 22:46:56 +00:00  
						
					 
				
					
						
							
							
								 
								Benjamin Kramer
							
						 
						
							 
							
							
							
							
								
							
							
								62ab616666 
								
							 
						 
						
							
							
								
								Return bool as a bool instead of a uint64_t.  
							
							 
							
							... 
							
							
							
							llvm-svn: 90610 
							
						 
						
							2009-12-04 22:45:27 +00:00  
						
					 
				
					
						
							
							
								 
								Alexis Hunt
							
						 
						
							 
							
							
							
							
								
							
							
								9b3a395bf3 
								
							 
						 
						
							
							
								
								Put in FIXME that this mangling is not official in.  
							
							 
							
							... 
							
							
							
							llvm-svn: 90594 
							
						 
						
							2009-12-04 21:11:13 +00:00  
						
					 
				
					
						
							
							
								 
								Alexis Hunt
							
						 
						
							 
							
							
							
							
								
							
							
								bf2f0c2e34 
								
							 
						 
						
							
							
								
								Switch mangling of literal operator names to a string that's  
							
							 
							
							... 
							
							
							
							a) legal
 b) likely to be chosen as the official mangling
This will break ABI compatibility with all literal operator names,
so you may need to recompile any such code. Sorry.
llvm-svn: 90587 
							
						 
						
							2009-12-04 21:01:37 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								afe4764fa5 
								
							 
						 
						
							
							
								
								Be sure to instantiate rtti for non-polymorphic bases.  
							
							 
							
							... 
							
							
							
							llvm-svn: 90586 
							
						 
						
							2009-12-04 20:55:13 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								ce460529c0 
								
							 
						 
						
							
							
								
								When generating a virtual destructor, don't try to make a virtual call to the base class destructor because then we'll just re-enter the same destructor!  
							
							 
							
							... 
							
							
							
							This was done to fix PR5619, so I went ahead and passed a dummy VTT pointer for now.
llvm-svn: 90578 
							
						 
						
							2009-12-04 19:33:17 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								875912ac13 
								
							 
						 
						
							
							
								
								Fixup nested try blocks.  
							
							 
							
							... 
							
							
							
							llvm-svn: 90576 
							
						 
						
							2009-12-04 19:21:57 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								5c820758f5 
								
							 
						 
						
							
							
								
								Fix warning and be sure to set up the rethrow pointer if we fall off  
							
							 
							
							... 
							
							
							
							the end of all the catches.
llvm-svn: 90574 
							
						 
						
							2009-12-04 19:03:47 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								bad80eb792 
								
							 
						 
						
							
							
								
								Rename 'Class' to 'MostDerivedClass'  
							
							 
							
							... 
							
							
							
							llvm-svn: 90573 
							
						 
						
							2009-12-04 18:36:22 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								19462d681a 
								
							 
						 
						
							
							
								
								Store the vtable components in a SmallVector.  
							
							 
							
							... 
							
							
							
							llvm-svn: 90571 
							
						 
						
							2009-12-04 16:24:46 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								4e1d75f3ed 
								
							 
						 
						
							
							
								
								Use a different ConstantArray::get.  
							
							 
							
							... 
							
							
							
							llvm-svn: 90570 
							
						 
						
							2009-12-04 16:22:27 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								472404f8a6 
								
							 
						 
						
							
							
								
								Move the vtable vector directly into the Vtable builder.  
							
							 
							
							... 
							
							
							
							llvm-svn: 90569 
							
						 
						
							2009-12-04 16:19:30 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								7bb7076b51 
								
							 
						 
						
							
							
								
								Change getIndex to return false if the index wasn't found. Avoids an extra hash lookup.  
							
							 
							
							... 
							
							
							
							llvm-svn: 90568 
							
						 
						
							2009-12-04 15:49:02 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								65d87222b2 
								
							 
						 
						
							
							
								
								Minor cleanup; no functionality change.  
							
							 
							
							... 
							
							
							
							llvm-svn: 90565 
							
						 
						
							2009-12-04 08:52:11 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								81fb0d2656 
								
							 
						 
						
							
							
								
								Remove unused argument.  
							
							 
							
							... 
							
							
							
							llvm-svn: 90563 
							
						 
						
							2009-12-04 08:40:51 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								c07aebee90 
								
							 
						 
						
							
							
								
								Eliminate submethods vector.  
							
							 
							
							... 
							
							
							
							llvm-svn: 90562 
							
						 
						
							2009-12-04 08:36:58 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								3d2e9de337 
								
							 
						 
						
							
							
								
								Eliminate the inner loop in VtableBuilder::OverrideMethod.  
							
							 
							
							... 
							
							
							
							llvm-svn: 90561 
							
						 
						
							2009-12-04 08:34:14 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								5c9e7b16a5 
								
							 
						 
						
							
							
								
								Correctly mangle the 'std' namespace inside extern "C++" blocks.  
							
							 
							
							... 
							
							
							
							llvm-svn: 90544 
							
						 
						
							2009-12-04 06:23:23 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								f3935b4d4b 
								
							 
						 
						
							
							
								
								Make sure that overridden method decls are always canonical.  
							
							 
							
							... 
							
							
							
							llvm-svn: 90542 
							
						 
						
							2009-12-04 05:51:56 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								94bc2dade6 
								
							 
						 
						
							
							
								
								Fix regression in vtable improvements.  
							
							 
							
							... 
							
							
							
							llvm-svn: 90540 
							
						 
						
							2009-12-04 04:30:03 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								8c1253b4c2 
								
							 
						 
						
							
							
								
								Try/catch statements seem to be working well enough to turn on.  
							
							 
							
							... 
							
							
							
							llvm-svn: 90538 
							
						 
						
							2009-12-04 03:57:07 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								2ab55765f7 
								
							 
						 
						
							
							
								
								Disable for now, doesn't play nice with the temporary code.  
							
							 
							
							... 
							
							
							
							llvm-svn: 90537 
							
						 
						
							2009-12-04 03:55:53 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								b05eb963e0 
								
							 
						 
						
							
							
								
								Rename method to something easier to search for.  
							
							 
							
							... 
							
							
							
							llvm-svn: 90536 
							
						 
						
							2009-12-04 03:54:56 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								a93e980fbc 
								
							 
						 
						
							
							
								
								More work in preparation of getting rid of the submethods loop.  
							
							 
							
							... 
							
							
							
							llvm-svn: 90535 
							
						 
						
							2009-12-04 03:52:52 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								f2f31f4371 
								
							 
						 
						
							
							
								
								Remove an unused member variable.  
							
							 
							
							... 
							
							
							
							llvm-svn: 90534 
							
						 
						
							2009-12-04 03:46:21 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								e609636e0d 
								
							 
						 
						
							
							
								
								Add a way to get the index of a method. Assert that we have the same index for now.  
							
							 
							
							... 
							
							
							
							llvm-svn: 90533 
							
						 
						
							2009-12-04 03:41:37 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								b07567c315 
								
							 
						 
						
							
							
								
								Add a premature optimization.  
							
							 
							
							... 
							
							
							
							llvm-svn: 90532 
							
						 
						
							2009-12-04 03:07:26 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								50f147460a 
								
							 
						 
						
							
							
								
								Add the method directly to the vtable.  
							
							 
							
							... 
							
							
							
							llvm-svn: 90531 
							
						 
						
							2009-12-04 03:06:03 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								79bce40365 
								
							 
						 
						
							
							
								
								Get rid of the PureVirtualMethods map.  
							
							 
							
							... 
							
							
							
							llvm-svn: 90530 
							
						 
						
							2009-12-04 02:58:12 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								ddf42c8d80 
								
							 
						 
						
							
							
								
								Move handling of pure virtual methods to AppendMethods (and rename it to AppendMethodsToVtable).  
							
							 
							
							... 
							
							
							
							llvm-svn: 90529 
							
						 
						
							2009-12-04 02:56:03 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								5b3ea9bf1c 
								
							 
						 
						
							
							
								
								Move covariant thunk handling to AppendMethods too.  
							
							 
							
							... 
							
							
							
							llvm-svn: 90528 
							
						 
						
							2009-12-04 02:52:22 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								86809cd8ab 
								
							 
						 
						
							
							
								
								Move 'this' pointer adjustment thunks to AppendMethods.  
							
							 
							
							... 
							
							
							
							llvm-svn: 90527 
							
						 
						
							2009-12-04 02:43:50 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								4b1942cb8b 
								
							 
						 
						
							
							
								
								Make functions returning a struct indirectly evaluate the returned struct  
							
							 
							
							... 
							
							
							
							directly into the sret pointer. This is an optimization in C, but is required
for correctness in C++ for classes with a non-trivial copy constructor.
llvm-svn: 90526 
							
						 
						
							2009-12-04 02:43:40 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								495634e5ac 
								
							 
						 
						
							
							
								
								Factor appending methods to a vtable out into a separate function.  
							
							 
							
							... 
							
							
							
							llvm-svn: 90525 
							
						 
						
							2009-12-04 02:39:04 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								4c837d258f 
								
							 
						 
						
							
							
								
								Get rid of the Thunks struct too.  
							
							 
							
							... 
							
							
							
							llvm-svn: 90524 
							
						 
						
							2009-12-04 02:26:15 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								c521f952d6 
								
							 
						 
						
							
							
								
								Remove the CovariantThunk struct.  
							
							 
							
							... 
							
							
							
							llvm-svn: 90523 
							
						 
						
							2009-12-04 02:22:02 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								597c776c41 
								
							 
						 
						
							
							
								
								Remove the GlobalDecl from the Thunk as well.  
							
							 
							
							... 
							
							
							
							llvm-svn: 90522 
							
						 
						
							2009-12-04 02:14:12 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								8c889abc1a 
								
							 
						 
						
							
							
								
								Remove the GlobalDecl from the CovariantThunk struct, we can just look it up in the Methods table now.  
							
							 
							
							... 
							
							
							
							llvm-svn: 90519 
							
						 
						
							2009-12-04 02:11:21 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								cdf1898086 
								
							 
						 
						
							
							
								
								Start populating the VtableMembers structure.  
							
							 
							
							... 
							
							
							
							llvm-svn: 90517 
							
						 
						
							2009-12-04 02:08:24 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								a84b6e85f0 
								
							 
						 
						
							
							
								
								Add a data structure for efficient storing of vtable methods. Not used yet.  
							
							 
							
							... 
							
							
							
							llvm-svn: 90515 
							
						 
						
							2009-12-04 02:01:07 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								114ab9f695 
								
							 
						 
						
							
							
								
								Fixup reference binding for catch parameters.  
							
							 
							
							... 
							
							
							
							Fixup throws and rethrows to use invoke as appropriate.
llvm-svn: 90513 
							
						 
						
							2009-12-04 01:51:45 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								6d11ec8cb8 
								
							 
						 
						
							
							
								
								Update chunk of #if 0'ed code to remove fixed FIXME and make it compile.  We  
							
							 
							
							... 
							
							
							
							probably want to do some sort of performance assessment before enabling it,
though.
llvm-svn: 90510 
							
						 
						
							2009-12-04 01:30:56 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								5f141b75f9 
								
							 
						 
						
							
							
								
								These are done.  
							
							 
							
							... 
							
							
							
							llvm-svn: 90494 
							
						 
						
							2009-12-03 22:55:42 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								7398ff0f07 
								
							 
						 
						
							
							
								
								Improve catch parameter bindings for scalar non-pointers.  WIP.  
							
							 
							
							... 
							
							
							
							llvm-svn: 90492 
							
						 
						
							2009-12-03 22:38:15 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								ce2cd01647 
								
							 
						 
						
							
							
								
								Handle static_assert inside functions.  
							
							 
							
							... 
							
							
							
							llvm-svn: 90461 
							
						 
						
							2009-12-03 17:26:31 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								cdeb800152 
								
							 
						 
						
							
							
								
								Eli, I copied my code from this code...  Let's fix the souce of the bad idea!  
							
							 
							
							... 
							
							
							
							Thanks.
llvm-svn: 90458 
							
						 
						
							2009-12-03 16:55:20 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								c339081c24 
								
							 
						 
						
							
							
								
								Fix for PR5659: correct a rather nasty oversight in the type conversion for  
							
							 
							
							... 
							
							
							
							member pointer types.
llvm-svn: 90450 
							
						 
						
							2009-12-03 12:44:31 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								7230fa5630 
								
							 
						 
						
							
							
								
								Convert ABIArgInfo::dump to raw_ostream.  
							
							 
							
							... 
							
							
							
							llvm-svn: 90440 
							
						 
						
							2009-12-03 09:13:49 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								c6089fda20 
								
							 
						 
						
							
							
								
								Attempt to fix the MSVC build.  
							
							 
							
							... 
							
							
							
							llvm-svn: 90427 
							
						 
						
							2009-12-03 07:30:40 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								4039f35344 
								
							 
						 
						
							
							
								
								Fix thunk generation for thunks with a parameter with reference type.  
							
							 
							
							... 
							
							
							
							llvm-svn: 90412 
							
						 
						
							2009-12-03 04:49:52 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								551fe84d0e 
								
							 
						 
						
							
							
								
								Minor cleanup.  
							
							 
							
							... 
							
							
							
							llvm-svn: 90411 
							
						 
						
							2009-12-03 04:27:05 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								e2d4a2c3a8 
								
							 
						 
						
							
							
								
								Add support for thunking dtors.  Oh why does this make my head hurt?  
							
							 
							
							... 
							
							
							
							llvm-svn: 90409 
							
						 
						
							2009-12-03 03:47:56 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								2842b4cf86 
								
							 
						 
						
							
							
								
								Reflow.  
							
							 
							
							... 
							
							
							
							llvm-svn: 90407 
							
						 
						
							2009-12-03 03:40:14 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								dabfa3cd8b 
								
							 
						 
						
							
							
								
								Revert r90402 for now, virt.cpp is failing.  
							
							 
							
							... 
							
							
							
							llvm-svn: 90406 
							
						 
						
							2009-12-03 03:28:24 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								e692f7c309 
								
							 
						 
						
							
							
								
								Use Eli's ComputeThunkAdjustment for calculating the return adjustment.  
							
							 
							
							... 
							
							
							
							llvm-svn: 90402 
							
						 
						
							2009-12-03 03:15:31 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								5f91fd64b6 
								
							 
						 
						
							
							
								
								Add CodeGenModule::ComputeThunkAdjustment, which Eli wrote.  
							
							 
							
							... 
							
							
							
							llvm-svn: 90401 
							
						 
						
							2009-12-03 03:06:55 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								80bc5d5d04 
								
							 
						 
						
							
							
								
								Remove the index from the Thunk struct.  
							
							 
							
							... 
							
							
							
							llvm-svn: 90400 
							
						 
						
							2009-12-03 02:41:55 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								29a1f751b3 
								
							 
						 
						
							
							
								
								Change the Thunks map to use the vtable index as the key.  
							
							 
							
							... 
							
							
							
							llvm-svn: 90399 
							
						 
						
							2009-12-03 02:39:59 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								0e1e7632bc 
								
							 
						 
						
							
							
								
								Add the global decl to the Thunk struct.  
							
							 
							
							... 
							
							
							
							llvm-svn: 90398 
							
						 
						
							2009-12-03 02:36:40 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								9f98f7a9e5 
								
							 
						 
						
							
							
								
								Remove unused struct fields.  
							
							 
							
							... 
							
							
							
							llvm-svn: 90397 
							
						 
						
							2009-12-03 02:34:59 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								657f139abe 
								
							 
						 
						
							
							
								
								Delay computing the return adjustments for covariant thunks until when they are added to the vtable.  
							
							 
							
							... 
							
							
							
							llvm-svn: 90396 
							
						 
						
							2009-12-03 02:32:59 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								2ca285fc5c 
								
							 
						 
						
							
							
								
								No need to create the covariant thunk in both places now.  
							
							 
							
							... 
							
							
							
							llvm-svn: 90394 
							
						 
						
							2009-12-03 02:22:59 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								1157e8fc68 
								
							 
						 
						
							
							
								
								Whoops, forgot to save :)  
							
							 
							
							... 
							
							
							
							llvm-svn: 90393 
							
						 
						
							2009-12-03 02:20:26 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								06c14b6f65 
								
							 
						 
						
							
							
								
								Remove the index field from the CovariantThunk structure.  
							
							 
							
							... 
							
							
							
							llvm-svn: 90392 
							
						 
						
							2009-12-03 02:16:14 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								73295f96c5 
								
							 
						 
						
							
							
								
								Change the CovariantThunk map to use the vtable index as its key.  
							
							 
							
							... 
							
							
							
							llvm-svn: 90391 
							
						 
						
							2009-12-03 02:12:03 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								c38b40a709 
								
							 
						 
						
							
							
								
								Store a GlobalDecl in the return adjustment.  
							
							 
							
							... 
							
							
							
							llvm-svn: 90387 
							
						 
						
							2009-12-03 02:03:29 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								2bd3c0fa34 
								
							 
						 
						
							
							
								
								Do not include the 'this' pointer adjustment in the covariant return type. Instead, store it in the (now oddly named) Thunks map.  
							
							 
							
							... 
							
							
							
							llvm-svn: 90386 
							
						 
						
							2009-12-03 01:58:20 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								ca1bf68cfb 
								
							 
						 
						
							
							
								
								Move VtableBuilder::OverrideMethod out of line in preparation of other changes to it. No functionality change.  
							
							 
							
							... 
							
							
							
							llvm-svn: 90382 
							
						 
						
							2009-12-03 01:54:02 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								26ada867ba 
								
							 
						 
						
							
							
								
								Remove untrue statement.  
							
							 
							
							... 
							
							
							
							llvm-svn: 90377 
							
						 
						
							2009-12-03 01:34:13 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								59daccda08 
								
							 
						 
						
							
							
								
								Note a failure I saw from the g++ testsuite:  
							
							 
							
							... 
							
							
							
							FAIL: g++.old-deja/g++.mike/eh23.C (test for excess errors)
llvm-svn: 90374 
							
						 
						
							2009-12-03 01:22:05 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								37e4c41283 
								
							 
						 
						
							
							
								
								Work-in-progress: teach mangler how to mangle thunks for destructors.  
							
							 
							
							... 
							
							
							
							llvm-svn: 90360 
							
						 
						
							2009-12-03 00:03:05 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								2d52ce5f94 
								
							 
						 
						
							
							
								
								Cleanups on exceptional edges don't work at all, yet.  This doesn't  
							
							 
							
							... 
							
							
							
							catch very many of them and if we caught all of them, the errors would
be annoying.  I'm working on this next.  WIP.
llvm-svn: 90358 
							
						 
						
							2009-12-02 23:46:02 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								90990965e0 
								
							 
						 
						
							
							
								
								Add a cleanup scope for each catch clause.  
							
							 
							
							... 
							
							
							
							llvm-svn: 90357 
							
						 
						
							2009-12-02 23:37:16 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								a68e2a2967 
								
							 
						 
						
							
							
								
								Add missing branch to exit.  Seemingly obvious when I look at the  
							
							 
							
							... 
							
							
							
							code, but to track this down was laborious.
llvm-svn: 90356 
							
						 
						
							2009-12-02 23:28:08 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								d4df7753d2 
								
							 
						 
						
							
							
								
								Fix for PR5522 and PR5666: fix a bunch of mangling issues with extern variables  
							
							 
							
							... 
							
							
							
							and funcctions declared locally within a function.
llvm-svn: 90344 
							
						 
						
							2009-12-02 20:32:49 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								9732915bf9 
								
							 
						 
						
							
							
								
								Pull the terminate handler up so that we can use it for the catch  
							
							 
							
							... 
							
							
							
							parameter setup code and set up the catch parameter setup code to
protect that code with terminate.
llvm-svn: 90340 
							
						 
						
							2009-12-02 19:53:57 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								8a96d3a355 
								
							 
						 
						
							
							
								
								Turn off for now.  
							
							 
							
							... 
							
							
							
							llvm-svn: 90339 
							
						 
						
							2009-12-02 19:50:41 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								ae1b85d984 
								
							 
						 
						
							
							
								
								Put the Builder classes into the anonymous namespace.  
							
							 
							
							... 
							
							
							
							llvm-svn: 90335 
							
						 
						
							2009-12-02 19:07:44 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								c01c2b87e8 
								
							 
						 
						
							
							
								
								Change rtti/Rtti to RTTI, as it is an acronym.  
							
							 
							
							... 
							
							
							
							llvm-svn: 90334 
							
						 
						
							2009-12-02 18:57:08 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								d6eb364b31 
								
							 
						 
						
							
							
								
								Rename CGRtti.cpp to CGRTTI.cpp.  
							
							 
							
							... 
							
							
							
							llvm-svn: 90331 
							
						 
						
							2009-12-02 18:32:08 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								a9a590cd12 
								
							 
						 
						
							
							
								
								Avoid warning for getTerminateFn defined but not used.  
							
							 
							
							... 
							
							
							
							llvm-svn: 90330 
							
						 
						
							2009-12-02 18:20:18 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								a510597ef9 
								
							 
						 
						
							
							
								
								terminate doesn't throw.  
							
							 
							
							... 
							
							
							
							llvm-svn: 90308 
							
						 
						
							2009-12-02 08:18:09 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								33270211a0 
								
							 
						 
						
							
							
								
								More exception handling improvements...  WIP.  
							
							 
							
							... 
							
							
							
							Highlights include:
  Add a helper to generate __cxa_free_exception and _ZSt9terminatev.
  Add a region to handle EH object deallocation for ctor failures for throw.
  Add a terminate handler for __cxa_end_catch.
  A framework for adding cleanup actions for the exceptional edges only.
llvm-svn: 90305 
							
						 
						
							2009-12-02 07:41:41 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								037bcb5be3 
								
							 
						 
						
							
							
								
								Added an assert.  
							
							 
							
							... 
							
							
							
							llvm-svn: 90285 
							
						 
						
							2009-12-01 23:35:33 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								b2b120f664 
								
							 
						 
						
							
							
								
								Make EmitStoreOfScalar generate a more sane representation of boolean stores.  
							
							 
							
							... 
							
							
							
							"Fixes" PR5645.
llvm-svn: 90272 
							
						 
						
							2009-12-01 22:31:51 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								a6227fd896 
								
							 
						 
						
							
							
								
								(objc2 nonfragile-abi specific). If the translation unit includes an implementation  
							
							 
							
							... 
							
							
							
							of a subclass (direct or indirect) of a weak_import root class, emit a weak reference 
for the root class's metaclass (should complete radar 6815425).
llvm-svn: 90249 
							
						 
						
							2009-12-01 18:25:24 +00:00  
						
					 
				
					
						
							
							
								 
								Eric Christopher
							
						 
						
							 
							
							
							
							
								
							
							
								c377c81dcf 
								
							 
						 
						
							
							
								
								Update for llvm intrinsics change.  
							
							 
							
							... 
							
							
							
							llvm-svn: 90208 
							
						 
						
							2009-12-01 05:00:51 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								5406614be9 
								
							 
						 
						
							
							
								
								Much work on try/catch statement.  WIP.  
							
							 
							
							... 
							
							
							
							Highlights include:
  Fix __cxa_begin_catch so it now returns a value.
  Added getUnwindResumeOrRethrowFn helper to build up calls to
  _Unwind_Resume_or_Rethrow.
  Broke out object copying code into CopyObject from EmitCXXThrowExpr.
  Built up another version of CopyObject that can copy from memory for
  use in the catch parameter code.
  RTTI generation for type matching for catch.
  Code to check for the type match for catch.
  Code to generate the catch parameter, WIP, need make sure references
  and pointers and copy ctors work.
llvm-svn: 90205 
							
						 
						
							2009-12-01 03:41:18 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								b1d3f7c909 
								
							 
						 
						
							
							
								
								Have ASTRecordLayout keep track of the key function, in preparation of fixing a synthetic ctor/dtor bug.  
							
							 
							
							... 
							
							
							
							llvm-svn: 90168 
							
						 
						
							2009-11-30 23:41:22 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								be64149749 
								
							 
						 
						
							
							
								
								More support for virtual destructor calls.  
							
							 
							
							... 
							
							
							
							Fixes pr5619
llvm-svn: 90158 
							
						 
						
							2009-11-30 22:07:18 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								e5311b0d79 
								
							 
						 
						
							
							
								
								Reflow comments and fix 80-col violation.  
							
							 
							
							... 
							
							
							
							llvm-svn: 90152 
							
						 
						
							2009-11-30 20:08:49 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								c920fa2a74 
								
							 
						 
						
							
							
								
								Fix an assert.  
							
							 
							
							... 
							
							
							
							llvm-svn: 90149 
							
						 
						
							2009-11-30 19:43:26 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								2c11cd156e 
								
							 
						 
						
							
							
								
								Don't try to generate common globals for C++ files, instead of depending on the FE to set NoCommon, and simplify CodeGenOptions initialization.  
							
							 
							
							... 
							
							
							
							llvm-svn: 90119 
							
						 
						
							2009-11-30 08:40:34 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								03aa2f1262 
								
							 
						 
						
							
							
								
								Minor cleanup (no functionality change).  
							
							 
							
							... 
							
							
							
							llvm-svn: 90105 
							
						 
						
							2009-11-30 01:19:33 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								c76493a65d 
								
							 
						 
						
							
							
								
								Don't pass false (default) for isVolatile parameter to CreateLoad.  
							
							 
							
							... 
							
							
							
							llvm-svn: 90098 
							
						 
						
							2009-11-29 21:23:36 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								1dd0164bbe 
								
							 
						 
						
							
							
								
								Explicitly use setVolatile instead of extra IRBuilder argument.  
							
							 
							
							... 
							
							
							
							llvm-svn: 90095 
							
						 
						
							2009-11-29 21:11:47 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								dacbe6bdcd 
								
							 
						 
						
							
							
								
								Don't pass false (default) for isVolatile parameter to CreateStore.  
							
							 
							
							... 
							
							
							
							llvm-svn: 90094 
							
						 
						
							2009-11-29 21:11:41 +00:00  
						
					 
				
					
						
							
							
								 
								Benjamin Kramer
							
						 
						
							 
							
							
							
							
								
							
							
								ba9fd986eb 
								
							 
						 
						
							
							
								
								Simplify code. No functionality change.  
							
							 
							
							... 
							
							
							
							llvm-svn: 90087 
							
						 
						
							2009-11-29 19:51:45 +00:00  
						
					 
				
					
						
							
							
								 
								Alexis Hunt
							
						 
						
							 
							
							
							
							
								
							
							
								3d221f2fce 
								
							 
						 
						
							
							
								
								Add DeclarationName support for C++0x operator literals. They should now work as  
							
							 
							
							... 
							
							
							
							function names outside of templates - they'll probably cause some damage there as
they're largely untested.
llvm-svn: 90064 
							
						 
						
							2009-11-29 07:34:05 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								75fa84ebc6 
								
							 
						 
						
							
							
								
								Change LangOptions::ObjCConstantStringClass to an std::string to avoid worrying about the lifetime.  
							
							 
							
							... 
							
							
							
							llvm-svn: 90052 
							
						 
						
							2009-11-29 02:38:47 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								9eac065e67 
								
							 
						 
						
							
							
								
								Move MainFileName option variable into CodeGenOptions instead of LangOptions.  
							
							 
							
							... 
							
							
							
							llvm-svn: 90051 
							
						 
						
							2009-11-29 02:38:34 +00:00  
						
					 
				
					
						
							
							
								 
								Benjamin Kramer
							
						 
						
							 
							
							
							
							
								
							
							
								337e3a5fea 
								
							 
						 
						
							
							
								
								Remove remaining VISIBILITY_HIDDEN from anonymous namespaces.  
							
							 
							
							... 
							
							
							
							llvm-svn: 90044 
							
						 
						
							2009-11-28 19:45:26 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								c9e3e6ff29 
								
							 
						 
						
							
							
								
								Tests now pass with the assertion.  
							
							 
							
							... 
							
							
							
							llvm-svn: 90026 
							
						 
						
							2009-11-28 03:35:45 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								78910a508a 
								
							 
						 
						
							
							
								
								Add a much more thorough test of casts to virtual bases, and fix  
							
							 
							
							... 
							
							
							
							GetCXXBaseClassOffset to actually pass the test.
llvm-svn: 90025 
							
						 
						
							2009-11-28 03:31:34 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								548cc9d143 
								
							 
						 
						
							
							
								
								We always want to create a virtual function pointer entry if the path from the derived return value to the base overridden return value contains a virtual base class.  
							
							 
							
							... 
							
							
							
							llvm-svn: 90024 
							
						 
						
							2009-11-28 03:03:52 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								d598850203 
								
							 
						 
						
							
							
								
								Move the vtable builder to an anonymous namespace.  
							
							 
							
							... 
							
							
							
							llvm-svn: 90021 
							
						 
						
							2009-11-27 22:21:51 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								f942ee0297 
								
							 
						 
						
							
							
								
								Don't build the entire vtable when all we want is the index of a virtual method.  
							
							 
							
							... 
							
							
							
							llvm-svn: 90017 
							
						 
						
							2009-11-27 20:47:55 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								7eb0ccaa58 
								
							 
						 
						
							
							
								
								Add case for CK_DerivedToBaseMemberPointer cast kind to  
							
							 
							
							... 
							
							
							
							AggExprEmitter::VisitCastExpr.
llvm-svn: 89988 
							
						 
						
							2009-11-27 04:46:20 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								e96f1d3b2f 
								
							 
						 
						
							
							
								
								More work on ScalarExprEmitter::EmitCastExpr: for every cast kind, either  
							
							 
							
							... 
							
							
							
							implement it explicitly or assert that it doesn't make sense for a scalar.
This caught a couple interesting issues: one, CK_BaseToDerivedMemberPointer
casts were getting silently miscompiled, and two, Sema was constructing some
strange implicit casts of type CK_UserDefinedConversion.
The change in SemaExprCXX makes sure the cast kinds are getting set correctly.
llvm-svn: 89987 
							
						 
						
							2009-11-27 04:41:50 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								0dfc6804ff 
								
							 
						 
						
							
							
								
								Cleanup for ScalarExprEmitter::EmitCastExpr; no functional changes.  
							
							 
							
							... 
							
							
							
							llvm-svn: 89986 
							
						 
						
							2009-11-27 02:07:44 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								250534cf9a 
								
							 
						 
						
							
							
								
								Fix for PR5594: use EmitGlobalDefinition instead of EmitCXXDestructor so that  
							
							 
							
							... 
							
							
							
							we check whether the vtable needs to be generated.
llvm-svn: 89984 
							
						 
						
							2009-11-27 01:42:12 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								323bb04ef4 
								
							 
						 
						
							
							
								
								Lazily create the __cxa_pure_virtual reference.  
							
							 
							
							... 
							
							
							
							llvm-svn: 89965 
							
						 
						
							2009-11-26 19:54:33 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								d420a31fe9 
								
							 
						 
						
							
							
								
								Use the new CovariantThunkAdjustment in the vtable builder.  
							
							 
							
							... 
							
							
							
							Make the pure virtual methods map a set instead.
llvm-svn: 89961 
							
						 
						
							2009-11-26 19:32:45 +00:00  
						
					 
				
					
						
							
							
								 
								Benjamin Kramer
							
						 
						
							 
							
							
							
							
								
							
							
								334af99964 
								
							 
						 
						
							
							
								
								Remove dead forward declaration. Fix struct/class mismatch. Remove trailing whitespace.  
							
							 
							
							... 
							
							
							
							llvm-svn: 89947 
							
						 
						
							2009-11-26 13:09:03 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								4907c6f2ed 
								
							 
						 
						
							
							
								
								Remove unused variable.  
							
							 
							
							... 
							
							
							
							llvm-svn: 89945 
							
						 
						
							2009-11-26 07:48:44 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								ffc066f4b9 
								
							 
						 
						
							
							
								
								Shortcut explicit calls to a trivial copy assignment operator.  
							
							 
							
							... 
							
							
							
							llvm-svn: 89944 
							
						 
						
							2009-11-26 07:45:48 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								84a7e347bf 
								
							 
						 
						
							
							
								
								Simplify and fix up the handling of implicit constructors, copy assignment  
							
							 
							
							... 
							
							
							
							operators, and destructors.  Avoids generating declarations/definitions of
trivial constructors/destructors, and makes sure the trivial copy assignment
operator is generated when necessary.
llvm-svn: 89943 
							
						 
						
							2009-11-26 07:40:08 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								d15eb34d4b 
								
							 
						 
						
							
							
								
								Implement IRGen for MemberExpr referring to static member function.  
							
							 
							
							... 
							
							
							
							llvm-svn: 89938 
							
						 
						
							2009-11-26 06:08:14 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								6d771bcd09 
								
							 
						 
						
							
							
								
								Add a Thunk struct to the vtable builder.  
							
							 
							
							... 
							
							
							
							llvm-svn: 89935 
							
						 
						
							2009-11-26 03:25:13 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								cb422f1dbe 
								
							 
						 
						
							
							
								
								Use the more general Evaluate infrastructure for folding constant DeclRefs  
							
							 
							
							... 
							
							
							
							instead of checking explicitly for an EnumConstantDecl.  This folds references
to constant integer VarDecls, which has two benefits:
1. Slightly smaller emitted code from emitting a constant instead of a load,
and skipping emitting some constant globals.
2. Some code forgets to define static constant member variables; emitting a
load instead of the value in that case leads to a link error. (Such programs
are technically not well-formed, but in practice build with g++.)
llvm-svn: 89934 
							
						 
						
							2009-11-26 03:22:21 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								2f87c4f1a5 
								
							 
						 
						
							
							
								
								Add a CovariantThunkAdjustment struct that represents the adjustments needed for a covariant thunk.  
							
							 
							
							... 
							
							
							
							llvm-svn: 89933 
							
						 
						
							2009-11-26 03:09:37 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								8a5f75ed5d 
								
							 
						 
						
							
							
								
								Use new getLinkage() method to correctly compute whether a variable has  
							
							 
							
							... 
							
							
							
							internal linkage.  Fixes PR5433.
llvm-svn: 89931 
							
						 
						
							2009-11-26 02:52:12 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								abe274a8b0 
								
							 
						 
						
							
							
								
								Move the mangler into the CodeGen namespace. Change mangleThunk to take a ThunkAdjustment.  
							
							 
							
							... 
							
							
							
							llvm-svn: 89930 
							
						 
						
							2009-11-26 02:49:32 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								c778540f9a 
								
							 
						 
						
							
							
								
								Add a ThunkAdjustment struct which holds a non-virtual and a virtual adjustment offset. Start using it. General cleanup in Mangle.cpp.  
							
							 
							
							... 
							
							
							
							llvm-svn: 89925 
							
						 
						
							2009-11-26 02:32:05 +00:00  
						
					 
				
					
						
							
							
								 
								Devang Patel
							
						 
						
							 
							
							
							
							
								
							
							
								58bf6e1885 
								
							 
						 
						
							
							
								
								Use StringRef (again) in DebugInfo interface.  
							
							 
							
							... 
							
							
							
							llvm-svn: 89867 
							
						 
						
							2009-11-25 17:37:31 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								82ba57c8f0 
								
							 
						 
						
							
							
								
								Add VTT parameter to base ctors/dtors with virtual bases. (They aren't used yet).  
							
							 
							
							... 
							
							
							
							llvm-svn: 89835 
							
						 
						
							2009-11-25 03:15:49 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								3d9e90ae3e 
								
							 
						 
						
							
							
								
								Implement proper cleanup semantics for condition variables in for  
							
							 
							
							... 
							
							
							
							statements, e.g., 
  for(; X x = X(); ) { ... }  
Daniel or Anders, please review!
llvm-svn: 89832 
							
						 
						
							2009-11-25 01:51:31 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								7bab5ff8e7 
								
							 
						 
						
							
							
								
								Eliminate CXXConditionDeclExpr with extreme prejudice.  
							
							 
							
							... 
							
							
							
							All statements that involve conditions can now hold on to a separate
condition declaration (a VarDecl), and will use a DeclRefExpr
referring to that VarDecl for the condition expression. ForStmts now
have such a VarDecl (I'd missed those in previous commits).
Also, since this change reworks the Action interface for
if/while/switch/for, use FullExprArg for the full expressions in those
expressions, to ensure that we're emitting
Note that we are (still) not generating the right cleanups for
condition variables in for statements. That will be a follow-on
commit.
llvm-svn: 89817 
							
						 
						
							2009-11-25 00:27:52 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								680f861d74 
								
							 
						 
						
							
							
								
								Clean up the AST for while loops and fix several problems with  
							
							 
							
							... 
							
							
							
							cleanups for while loops: 
1) Make sure that we destroy the condition variable of a while statement each time through the loop for, e.g.,
   while (shared_ptr<WorkInt> p = getWorkItem()) {
         // ...
         }
2) Make sure that we always enter a new cleanup scope for the body of the while loop, even when there is no compound expression, e.g.,
   while (blah)
     RAIIObject raii(blah+1);
llvm-svn: 89800 
							
						 
						
							2009-11-24 21:15:44 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								3c9beab48a 
								
							 
						 
						
							
							
								
								Handle references correctly when synthesizing copy constructors.  
							
							 
							
							... 
							
							
							
							With this change, the clang-on-clang test result is now
Expected Passes    : 224
Unexpected Failures: 37
Which means that we can compile over 80% of clang with clang! :)
llvm-svn: 89799 
							
						 
						
							2009-11-24 21:08:10 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								3a202f601e 
								
							 
						 
						
							
							
								
								Handle cases where we're constructing an array of objects and the constructor has default arguments.  
							
							 
							
							... 
							
							
							
							llvm-svn: 89783 
							
						 
						
							2009-11-24 18:43:52 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								dcf1962405 
								
							 
						 
						
							
							
								
								Explicitly store the condition variable within switch statements, and  
							
							 
							
							... 
							
							
							
							make sure that this variable is destroyed when we exit the switch
statement.
llvm-svn: 89776 
							
						 
						
							2009-11-24 17:07:59 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								b9f96a3286 
								
							 
						 
						
							
							
								
								We always need to emit the base expression of a member expression, even when the member decl refers to an enum. Thanks to Eli for pointing this out!  
							
							 
							
							... 
							
							
							
							llvm-svn: 89775 
							
						 
						
							2009-11-24 16:57:33 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								965f450d42 
								
							 
						 
						
							
							
								
								Introduce cleanup scopes for "if" statements in two places:  
							
							 
							
							... 
							
							
							
							- Outside the "if", to ensure that we destroy the condition variable
    at the end of the "if" statement rather than at the end of the
    block containing the "if" statement.
  - Inside the "then" and "else" branches, so that we emit then- or
    else-local cleanups at the end of the corresponding block when the
    block is not a compound statement.
To make adding these new cleanup scopes easier (and since
switch/do/while will all need the same treatment), added the
CleanupScope RAII object to introduce a new cleanup scope and make
sure it gets cleaned up.
llvm-svn: 89773 
							
						 
						
							2009-11-24 16:43:22 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								48a409eb39 
								
							 
						 
						
							
							
								
								Rename CleanupScope -> DelayedCleanupBlock. No functionality change.  
							
							 
							
							... 
							
							
							
							llvm-svn: 89769 
							
						 
						
							2009-11-24 16:21:10 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								59486a2ddb 
								
							 
						 
						
							
							
								
								Get rid of the ugly CGCXX names and replace them with CGClass, CGExprCXX and CGTemporaries.  
							
							 
							
							... 
							
							
							
							llvm-svn: 89742 
							
						 
						
							2009-11-24 05:51:11 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								bd97548f35 
								
							 
						 
						
							
							
								
								When mangling a ctor/dtor we need to take into consideration whether it's a member template.  
							
							 
							
							... 
							
							
							
							llvm-svn: 89741 
							
						 
						
							2009-11-24 05:36:32 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								0ade9715f2 
								
							 
						 
						
							
							
								
								Ignore constructor member templates in CodeGenModule::EmitTopLevelDecl.  
							
							 
							
							... 
							
							
							
							llvm-svn: 89737 
							
						 
						
							2009-11-24 05:16:24 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								6445773279 
								
							 
						 
						
							
							
								
								It is common for vtables to contain pointers to functions that have either incomplete return types or incomplete argument types.  
							
							 
							
							... 
							
							
							
							Handle this by returning the llvm::OpaqueType for those cases, which CodeGenModule::GetOrCreateLLVMFunction knows about, and treats as being an "incomplete function".
llvm-svn: 89736 
							
						 
						
							2009-11-24 05:08:52 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								633caca353 
								
							 
						 
						
							
							
								
								Explicitly track the condition variable within an "if" statement,  
							
							 
							
							... 
							
							
							
							rather than burying it in a CXXConditionDeclExpr (that occassionally
hides behind implicit conversions). Similar changes for
switch, while, and do-while will follow, then the removal of
CXXConditionDeclExpr. This commit is the canary.
llvm-svn: 89717 
							
						 
						
							2009-11-23 23:44:04 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								f2e4f72f03 
								
							 
						 
						
							
							
								
								Don't try to treat an enum constant as an lvalue.  
							
							 
							
							... 
							
							
							
							llvm-svn: 89705 
							
						 
						
							2009-11-23 21:56:41 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								7fa434c2b8 
								
							 
						 
						
							
							
								
								Handle converting member pointers to bool.  
							
							 
							
							... 
							
							
							
							llvm-svn: 89692 
							
						 
						
							2009-11-23 20:04:44 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								8c793172c2 
								
							 
						 
						
							
							
								
								Handle base-to-derived casts. Will land test case shortly.  
							
							 
							
							... 
							
							
							
							llvm-svn: 89678 
							
						 
						
							2009-11-23 17:57:54 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								ed6c744091 
								
							 
						 
						
							
							
								
								Centralize and complete the computation of value- and type-dependence for DeclRefExprs  
							
							 
							
							... 
							
							
							
							llvm-svn: 89649 
							
						 
						
							2009-11-23 11:41:28 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								785406bd19 
								
							 
						 
						
							
							
								
								Teach CodeGenFunction::EmitDecl to ignore Using and UsingShadow decls.  
							
							 
							
							... 
							
							
							
							llvm-svn: 89633 
							
						 
						
							2009-11-23 00:07:06 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								e1cd0152a9 
								
							 
						 
						
							
							
								
								x86_64, PR5582: Layout bases for C++ records.  
							
							 
							
							... 
							
							
							
							- Ideally we would have an single iteration interface for this, but this works
   for now.
llvm-svn: 89632 
							
						 
						
							2009-11-22 23:01:23 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								5838108317 
								
							 
						 
						
							
							
								
								Use EmitStoreOfScalar when copying the scalar to the space allocated by 'new'.  
							
							 
							
							... 
							
							
							
							llvm-svn: 89613 
							
						 
						
							2009-11-22 19:25:33 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								e18e29eeb9 
								
							 
						 
						
							
							
								
								Support emitting aggregate class initializers. Fixes PR5581.  
							
							 
							
							... 
							
							
							
							llvm-svn: 89569 
							
						 
						
							2009-11-21 23:56:04 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								252ba5fb6f 
								
							 
						 
						
							
							
								
								This patch implements objective-c's 'SEL' type as a built-in  
							
							 
							
							... 
							
							
							
							type and fixes a long-standing code gen. crash reported in
at least two PRs and a radar. (radar 7405040 and pr5025). 
There are couple of remaining issues that I would like for
Ted. and Doug to look at:
Ted, please look at failure in Analysis/MissingDealloc.m.
I have temporarily added an expected-warning to make the
test pass. This tests has a declaration of 'SEL' type which
may not co-exist with the new changes.
Doug, please look at a FIXME in PCHWriter.cpp/PCHReader.cpp.
I think the changes which I have ifdef'ed out are correct. They
need be considered for in a few Indexer/PCH test cases.
llvm-svn: 89561 
							
						 
						
							2009-11-21 19:53:08 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								88ad4c5d02 
								
							 
						 
						
							
							
								
								Mangler: Sketch mangling for TemplateArgument::Declaration kind.  
							
							 
							
							... 
							
							
							
							- Several important FIXMEs related to whether arguments are expressions or external names, and the mangling of extern "C" names (c.f., PR5522).
llvm-svn: 89556 
							
						 
						
							2009-11-21 09:17:15 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								e949e6cced 
								
							 
						 
						
							
							
								
								Mangler: Lift shouldMangleDeclName predicate out of CXXNameMangler::mangle.  
							
							 
							
							... 
							
							
							
							- Sometimes we have to mangle things we wouldn't normally (e.g., because they appear in a template expression).
 - This also tidies up the predicate to be more obvious what is getting mangled.
llvm-svn: 89555 
							
						 
						
							2009-11-21 09:14:52 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								161ade4455 
								
							 
						 
						
							
							
								
								Mangler: Strengthen invariants, MangleContext::mangleName should only be called on var or function decls.  
							
							 
							
							... 
							
							
							
							llvm-svn: 89554 
							
						 
						
							2009-11-21 09:14:44 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								8483d211bd 
								
							 
						 
						
							
							
								
								Mangler: Inline a bunch of functions into their sole caller, not that I don't love typing for typings sake, but...  
							
							 
							
							... 
							
							
							
							llvm-svn: 89553 
							
						 
						
							2009-11-21 09:12:13 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								1110dc06a8 
								
							 
						 
						
							
							
								
								Remove dead variable.  
							
							 
							
							... 
							
							
							
							llvm-svn: 89551 
							
						 
						
							2009-11-21 09:11:59 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								fdae6f7cd3 
								
							 
						 
						
							
							
								
								Mangler: Split isStdNamespace for when the caller already has a NamespaceDecl.  
							
							 
							
							... 
							
							
							
							llvm-svn: 89550 
							
						 
						
							2009-11-21 09:11:45 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								4118ec5571 
								
							 
						 
						
							
							
								
								IRgen: Eliminate CXXNameMangler::mangleCXX{C,D}tor.  
							
							 
							
							... 
							
							
							
							llvm-svn: 89549 
							
						 
						
							2009-11-21 09:06:31 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								e128dd18ab 
								
							 
						 
						
							
							
								
								IRgen: Switch the C++ mangler interfaces to take the SmallVector to write into,  
							
							 
							
							... 
							
							
							
							instead of requiring clients to make a raw_svector_ostream, which is just an
implementation detail.
llvm-svn: 89548 
							
						 
						
							2009-11-21 09:06:22 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								ef5d75afeb 
								
							 
						 
						
							
							
								
								Sink free mangle* methods into MangleContext.  
							
							 
							
							... 
							
							
							
							llvm-svn: 89547 
							
						 
						
							2009-11-21 09:06:10 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								d614e326db 
								
							 
						 
						
							
							
								
								Delete trailing space.  
							
							 
							
							... 
							
							
							
							llvm-svn: 89545 
							
						 
						
							2009-11-21 09:05:47 +00:00  
						
					 
				
					
						
							
							
								 
								Alexis Hunt
							
						 
						
							 
							
							
							
							
								
							
							
								96d5c76498 
								
							 
						 
						
							
							
								
								Added rudimentary C++0x attribute support.  
							
							 
							
							... 
							
							
							
							The following attributes are currently supported in C++0x attribute
lists (and in GNU ones as well):
 - align() - semantics believed to be conformant to n3000, except for
   redeclarations and what entities it may apply to
 - final - semantics believed to be conformant to CWG issue 817's proposed
   wording, except for redeclarations
 - noreturn - semantics believed to be conformant to n3000, except for
   redeclarations
 - carries_dependency - currently ignored (this is an optimization hint)
llvm-svn: 89543 
							
						 
						
							2009-11-21 08:43:09 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								58ef18b38c 
								
							 
						 
						
							
							
								
								Checkpoint current work.  WIP.  
							
							 
							
							... 
							
							
							
							llvm-svn: 89513 
							
						 
						
							2009-11-20 23:44:51 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								0a66c26191 
								
							 
						 
						
							
							
								
								Fix lifetime of conditional temporaries. Patch by Victor Zverovich!  
							
							 
							
							... 
							
							
							
							llvm-svn: 89467 
							
						 
						
							2009-11-20 17:27:56 +00:00  
						
					 
				
					
						
							
							
								 
								David Chisnall
							
						 
						
							 
							
							
							
							
								
							
							
								bc8bdea183 
								
							 
						 
						
							
							
								
								Fixed crash when using undefined protocols (GNU runtime).  
							
							 
							
							... 
							
							
							
							llvm-svn: 89457 
							
						 
						
							2009-11-20 14:50:59 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								564048e692 
								
							 
						 
						
							
							
								
								Fix a couple minor memory leaks.  
							
							 
							
							... 
							
							
							
							llvm-svn: 89450 
							
						 
						
							2009-11-20 05:53:06 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								d8d26d06a5 
								
							 
						 
						
							
							
								
								Implement throw d, where d is a class type that requires copy  
							
							 
							
							... 
							
							
							
							construction.  WIP.
llvm-svn: 89442 
							
						 
						
							2009-11-20 02:31:07 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								4d7a07bdaf 
								
							 
						 
						
							
							
								
								Handle throw d, where d is a class type but only has a trivial copy  
							
							 
							
							... 
							
							
							
							constructor.  WIP.
llvm-svn: 89438 
							
						 
						
							2009-11-20 01:57:39 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								d1782cc478 
								
							 
						 
						
							
							
								
								Add suport for throw;.  WIP.  
							
							 
							
							... 
							
							
							
							llvm-svn: 89424 
							
						 
						
							2009-11-20 00:56:31 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								18fc44dfd3 
								
							 
						 
						
							
							
								
								Fix rtti generation for throws.  WIP.  
							
							 
							
							... 
							
							
							
							llvm-svn: 89420 
							
						 
						
							2009-11-20 00:43:57 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								101f052faf 
								
							 
						 
						
							
							
								
								Simplify rtti building code a little.  Prep for reuse for throw rtti  
							
							 
							
							... 
							
							
							
							generation.
llvm-svn: 89416 
							
						 
						
							2009-11-20 00:31:50 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								a7a1b7e780 
								
							 
						 
						
							
							
								
								Fixup key function calculations.  
							
							 
							
							... 
							
							
							
							llvm-svn: 89412 
							
						 
						
							2009-11-20 00:02:19 +00:00  
						
					 
				
					
						
							
							
								 
								John McCall
							
						 
						
							 
							
							
							
							
								
							
							
								8cd7813ca3 
								
							 
						 
						
							
							
								
								Draw a brighter line between "unresolved" expressions, where we have done the  
							
							 
							
							... 
							
							
							
							appropriate lookup and simply can't resolve the referrent yet, and
"dependent scope" expressions, where we can't do the lookup yet because the
entity we need to look into is a dependent type.
llvm-svn: 89402 
							
						 
						
							2009-11-19 22:55:06 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								cd2b821241 
								
							 
						 
						
							
							
								
								Fixup address point computations.  WIP.  
							
							 
							
							... 
							
							
							
							llvm-svn: 89386 
							
						 
						
							2009-11-19 20:52:19 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								aa51ad6815 
								
							 
						 
						
							
							
								
								Refine vtable, rtti and rtti name instantiation so that they follow  
							
							 
							
							... 
							
							
							
							the key function.  All the code is wired up, but won't work yet, as I
had to turn off key function calculation as it doesn't work yet.
Also, we refine visibility of the vtable, rtti and rtti name to match
the class, as well as as arrange for all the symbols to be internal
for anonymous namespace entities.
llvm-svn: 89309 
							
						 
						
							2009-11-19 04:04:36 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								beab381d2d 
								
							 
						 
						
							
							
								
								This doesn't work yet.  
							
							 
							
							... 
							
							
							
							llvm-svn: 89307 
							
						 
						
							2009-11-19 03:53:54 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								1a139f8fb5 
								
							 
						 
						
							
							
								
								Improve instantiation control for rtti data and allow key functions to  
							
							 
							
							... 
							
							
							
							instantiate a class.  WIP.
llvm-svn: 89289 
							
						 
						
							2009-11-19 01:08:19 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								1960b20403 
								
							 
						 
						
							
							
								
								Refine linkage on thunks.  WIP.  
							
							 
							
							... 
							
							
							
							llvm-svn: 89287 
							
						 
						
							2009-11-19 00:49:05 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								ea950e249f 
								
							 
						 
						
							
							
								
								Reflow to fit 80-col.  
							
							 
							
							... 
							
							
							
							llvm-svn: 89222 
							
						 
						
							2009-11-18 18:57:56 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								643818bdd8 
								
							 
						 
						
							
							
								
								Trim whitespace.  
							
							 
							
							... 
							
							
							
							llvm-svn: 89219 
							
						 
						
							2009-11-18 18:52:31 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								acfb1dfa4d 
								
							 
						 
						
							
							
								
								Minor cleanup to member pointer handling.  
							
							 
							
							... 
							
							
							
							llvm-svn: 89201 
							
						 
						
							2009-11-18 09:41:26 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								928a567af1 
								
							 
						 
						
							
							
								
								Clean up EmitPointerToDataMemberBinaryExpr a bit.  
							
							 
							
							... 
							
							
							
							llvm-svn: 89197 
							
						 
						
							2009-11-18 05:01:17 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								c0f632d6b2 
								
							 
						 
						
							
							
								
								Set up vtable visibility appropriately.  
							
							 
							
							... 
							
							
							
							llvm-svn: 89193 
							
						 
						
							2009-11-18 04:00:48 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								83d5e00a96 
								
							 
						 
						
							
							
								
								Propagate hidden to the _ZTS symbols appropriately.  WIP.  
							
							 
							
							... 
							
							
							
							llvm-svn: 89191 
							
						 
						
							2009-11-18 03:46:51 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								794290ca29 
								
							 
						 
						
							
							
								
								Add an assertion to catch bad calls to EmitCallArgs.  
							
							 
							
							... 
							
							
							
							llvm-svn: 89190 
							
						 
						
							2009-11-18 03:42:04 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								c5d2ed73ff 
								
							 
						 
						
							
							
								
								Be sure to set visibility for ZTI symbols for classes from the class.  
							
							 
							
							... 
							
							
							
							llvm-svn: 89186 
							
						 
						
							2009-11-18 03:21:29 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								f77aaa0089 
								
							 
						 
						
							
							
								
								Make _ZTI symbols hidden.  This speeds up the dynamic linker.  
							
							 
							
							... 
							
							
							
							llvm-svn: 89185 
							
						 
						
							2009-11-18 02:53:28 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								24f55430c8 
								
							 
						 
						
							
							
								
								Missing piece of r89173.  
							
							 
							
							... 
							
							
							
							llvm-svn: 89174 
							
						 
						
							2009-11-18 00:57:03 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								fe81e3fb3c 
								
							 
						 
						
							
							
								
								Refactor emitting call to delete operator into common function EmitDeleteCall.  
							
							 
							
							... 
							
							
							
							llvm-svn: 89173 
							
						 
						
							2009-11-18 00:50:08 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								5bbbb13765 
								
							 
						 
						
							
							
								
								Fix one last gotcha with typeid.  
							
							 
							
							... 
							
							
							
							llvm-svn: 89172 
							
						 
						
							2009-11-18 00:40:12 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								4aaf79a942 
								
							 
						 
						
							
							
								
								Cleanup.  
							
							 
							
							... 
							
							
							
							llvm-svn: 89166 
							
						 
						
							2009-11-17 23:51:10 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								103a084cbe 
								
							 
						 
						
							
							
								
								Add rtti support for arrays, functiond without prototypes, vectors and  
							
							 
							
							... 
							
							
							
							enums.
llvm-svn: 89165 
							
						 
						
							2009-11-17 23:45:57 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								96b96d5f2e 
								
							 
						 
						
							
							
								
								Add rtti info for function prototypes and refactor.  This allows  
							
							 
							
							... 
							
							
							
							pointer to member functions to work.  WIP.
llvm-svn: 89161 
							
						 
						
							2009-11-17 23:11:22 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								95ace55701 
								
							 
						 
						
							
							
								
								This patch finalizes implementatin of weak_import  
							
							 
							
							... 
							
							
							
							objective-c2 classes (radar 6815425).
llvm-svn: 89157 
							
						 
						
							2009-11-17 22:42:00 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								6fdfea67ad 
								
							 
						 
						
							
							
								
								Add rtti support for pointer to data members.  
							
							 
							
							... 
							
							
							
							llvm-svn: 89155 
							
						 
						
							2009-11-17 22:33:00 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								3ad8dcfd55 
								
							 
						 
						
							
							
								
								More cases for weak_import objective-c2 classes.  
							
							 
							
							... 
							
							
							
							(still radar 6815425).
llvm-svn: 89152 
							
						 
						
							2009-11-17 22:02:21 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								db72c89eb1 
								
							 
						 
						
							
							
								
								Add rtti support for non-member pointers.  WIP.  
							
							 
							
							... 
							
							
							
							llvm-svn: 89148 
							
						 
						
							2009-11-17 21:44:24 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								6726055375 
								
							 
						 
						
							
							
								
								More support for weak_import objective-c2 class.  
							
							 
							
							... 
							
							
							
							(radar 6815425).
llvm-svn: 89146 
							
						 
						
							2009-11-17 21:37:35 +00:00  
						
					 
				
					
						
							
							
								 
								David Chisnall
							
						 
						
							 
							
							
							
							
								
							
							
								950a9518b1 
								
							 
						 
						
							
							
								
								Added block type introspection support.  
							
							 
							
							... 
							
							
							
							As per Fariborz's suggestion, committed now but can be reverted later if the used flag is problematic for Apple.
llvm-svn: 89134 
							
						 
						
							2009-11-17 19:33:30 +00:00  
						
					 
				
					
						
							
							
								 
								David Chisnall
							
						 
						
							 
							
							
							
							
								
							
							
								cb1b7bf79d 
								
							 
						 
						
							
							
								
								Fixed bug where ivar offsets were being initialized as 0 with the fragile GNU ABI.  
							
							 
							
							... 
							
							
							
							llvm-svn: 89133 
							
						 
						
							2009-11-17 19:32:15 +00:00  
						
					 
				
					
						
							
							
								 
								John McCall
							
						 
						
							 
							
							
							
							
								
							
							
								1e9de059cc 
								
							 
						 
						
							
							
								
								Skip over shadow using decls during codegen.  
							
							 
							
							... 
							
							
							
							llvm-svn: 89079 
							
						 
						
							2009-11-17 09:33:40 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								dee9a30204 
								
							 
						 
						
							
							
								
								Unify the way destructor epilogues are generated for synthesized and regular destructors. Also fix PR5529.  
							
							 
							
							... 
							
							
							
							llvm-svn: 89034 
							
						 
						
							2009-11-17 04:44:12 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								cfd3012756 
								
							 
						 
						
							
							
								
								More const is always good.  
							
							 
							
							... 
							
							
							
							llvm-svn: 89033 
							
						 
						
							2009-11-17 03:57:07 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								3afea1d8fe 
								
							 
						 
						
							
							
								
								Fix typo.  Thanks Ted.  
							
							 
							
							... 
							
							
							
							llvm-svn: 89031 
							
						 
						
							2009-11-17 03:01:03 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								8f5e6770e7 
								
							 
						 
						
							
							
								
								Add typeinfo support for T* and const T* for all builtin types T.  
							
							 
							
							... 
							
							
							
							llvm-svn: 89030 
							
						 
						
							2009-11-17 02:57:13 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								3f75d552a3 
								
							 
						 
						
							
							
								
								Add typeid for the builtin types.  WIP.  
							
							 
							
							... 
							
							
							
							llvm-svn: 89028 
							
						 
						
							2009-11-17 02:16:21 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								c2c03349f3 
								
							 
						 
						
							
							
								
								Ensure we peer through () when handling typeid(*p).  
							
							 
							
							... 
							
							
							
							llvm-svn: 89015 
							
						 
						
							2009-11-17 00:45:21 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								4d0e9095e4 
								
							 
						 
						
							
							
								
								Since we always have 2 edges, we don't need to reserve 3 slot for the  
							
							 
							
							... 
							
							
							
							PHI node.
llvm-svn: 89005 
							
						 
						
							2009-11-17 00:10:05 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								e8cdcc9ab0 
								
							 
						 
						
							
							
								
								Minor CFG refinements for typeid and dynamic_cast.  
							
							 
							
							... 
							
							
							
							llvm-svn: 89004 
							
						 
						
							2009-11-17 00:08:50 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								e85ef718d5 
								
							 
						 
						
							
							
								
								Fix up EmitMemberInitializer to handle many more cases.  
							
							 
							
							... 
							
							
							
							llvm-svn: 88999 
							
						 
						
							2009-11-16 23:53:01 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								5e7d969526 
								
							 
						 
						
							
							
								
								Reorganize EmitMemberInitializer to put anonymous unions on the common codepath.  
							
							 
							
							... 
							
							
							
							llvm-svn: 88995 
							
						 
						
							2009-11-16 23:34:11 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								c1daba3ec8 
								
							 
						 
						
							
							
								
								Make member initializers for union members work correctly.  
							
							 
							
							... 
							
							
							
							llvm-svn: 88989 
							
						 
						
							2009-11-16 22:58:01 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								6ca0e21de4 
								
							 
						 
						
							
							
								
								Implement dynamic_cast<void*>(E).  
							
							 
							
							... 
							
							
							
							llvm-svn: 88988 
							
						 
						
							2009-11-16 22:52:20 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								c2ef215bda 
								
							 
						 
						
							
							
								
								Implement a few more cases for copy constructor synthesis.  
							
							 
							
							... 
							
							
							
							llvm-svn: 88971 
							
						 
						
							2009-11-16 21:47:41 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								1b8fe5b716 
								
							 
						 
						
							
							
								
								First part of changes to eliminate problems with cv-qualifiers and  
							
							 
							
							... 
							
							
							
							sugared types. The basic problem is that our qualifier accessors
(getQualifiers, getCVRQualifiers, isConstQualified, etc.) only look at
the current QualType and not at any qualifiers that come from sugared
types, meaning that we won't see these qualifiers through, e.g.,
typedefs:
  typedef const int CInt;
  typedef CInt Self;
Self.isConstQualified() currently returns false!
Various bugs (e.g., PR5383) have cropped up all over the front end due
to such problems. I'm addressing this problem by splitting each
qualifier accessor into two versions: 
  - the "local" version only returns qualifiers on this particular
    QualType instance
  - the "normal" version that will eventually combine qualifiers from this
    QualType instance with the qualifiers on the canonical type to
    produce the full set of qualifiers.
This commit adds the local versions and switches a few callers from
the "normal" version (e.g., isConstQualified) over to the "local"
version (e.g., isLocalConstQualified) when that is the right thing to
do, e.g., because we're printing or serializing the qualifiers. Also,
switch a bunch of
  
  Context.getCanonicalType(T1).getUnqualifiedType() == Context.getCanonicalType(T2).getQualifiedType()
expressions over to 
  Context.hasSameUnqualifiedType(T1, T2)
llvm-svn: 88969 
							
						 
						
							2009-11-16 21:35:15 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								c08bdea63d 
								
							 
						 
						
							
							
								
								Clean up scalar cast kind handling; make cast kind handling explicitly handle  
							
							 
							
							... 
							
							
							
							more cases.  No intended visible change.
llvm-svn: 88968 
							
						 
						
							2009-11-16 21:33:53 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								bf44533846 
								
							 
						 
						
							
							
								
								Audit done, all the required casts are already done.  
							
							 
							
							... 
							
							
							
							llvm-svn: 88966 
							
						 
						
							2009-11-16 21:22:19 +00:00  
						
					 
				
					
						
							
							
								 
								Devang Patel
							
						 
						
							 
							
							
							
							
								
							
							
								37b4b8b1da 
								
							 
						 
						
							
							
								
								revert r88963.  
							
							 
							
							... 
							
							
							
							llvm-svn: 88965 
							
						 
						
							2009-11-16 21:17:07 +00:00  
						
					 
				
					
						
							
							
								 
								Devang Patel
							
						 
						
							 
							
							
							
							
								
							
							
								b71c28db22 
								
							 
						 
						
							
							
								
								Use TrackingVH to hold forward decl. This one is for RecordType.  
							
							 
							
							... 
							
							
							
							llvm-svn: 88963 
							
						 
						
							2009-11-16 21:06:35 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								00dbf4c3c6 
								
							 
						 
						
							
							
								
								Parallel fix to r88951: use TrackingVH to hold forward decl.  
							
							 
							
							... 
							
							
							
							llvm-svn: 88962 
							
						 
						
							2009-11-16 21:04:30 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								b05d0824c6 
								
							 
						 
						
							
							
								
								Fix valgrind uninitialized error.  
							
							 
							
							... 
							
							
							
							llvm-svn: 88952 
							
						 
						
							2009-11-16 20:33:31 +00:00  
						
					 
				
					
						
							
							
								 
								Devang Patel
							
						 
						
							 
							
							
							
							
								
							
							
								10909d5faf 
								
							 
						 
						
							
							
								
								Use TrackingVH to hold forward decl.  
							
							 
							
							... 
							
							
							
							llvm-svn: 88951 
							
						 
						
							2009-11-16 20:09:38 +00:00  
						
					 
				
					
						
							
							
								 
								David Chisnall
							
						 
						
							 
							
							
							
							
								
							
							
								b3b44ce433 
								
							 
						 
						
							
							
								
								Fixed two minor differences between clang and GCC-generated runtime structures for the GNU runtime.  
							
							 
							
							... 
							
							
							
							llvm-svn: 88937 
							
						 
						
							2009-11-16 19:05:54 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								0d82fa66a5 
								
							 
						 
						
							
							
								
								The ssp and sspreq function attributes should only be applied to function definitions, not declarations or calls.  
							
							 
							
							... 
							
							
							
							llvm-svn: 88915 
							
						 
						
							2009-11-16 16:56:03 +00:00  
						
					 
				
					
						
							
							
								 
								Duncan Sands
							
						 
						
							 
							
							
							
							
								
							
							
								7876dad8e7 
								
							 
						 
						
							
							
								
								Pass a value for the isSigned parameter of CreateIntCast, rather than  
							
							 
							
							... 
							
							
							
							passing the name (an exotic way of specifying that the result is signed!).
llvm-svn: 88909 
							
						 
						
							2009-11-16 13:11:21 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								65511704f7 
								
							 
						 
						
							
							
								
								Implement most of dynamic_cast.  WIP.  
							
							 
							
							... 
							
							
							
							llvm-svn: 88901 
							
						 
						
							2009-11-16 06:50:58 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								49ddc5fb94 
								
							 
						 
						
							
							
								
								Make GetAddrOfConstantStringFromLiteral return a constant of the correct type.  
							
							 
							
							... 
							
							
							
							This doesn't have any visible effects at the moment because normally the
implicit cast code forces the type to the expected type.
llvm-svn: 88896 
							
						 
						
							2009-11-16 05:55:46 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								8c98dffd1f 
								
							 
						 
						
							
							
								
								Some minor cleanup for EmitCastLValue.  
							
							 
							
							... 
							
							
							
							llvm-svn: 88894 
							
						 
						
							2009-11-16 05:48:01 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								e6ce354795 
								
							 
						 
						
							
							
								
								Fix a couple of cases where we weren't generating the right kind of call  
							
							 
							
							... 
							
							
							
							for a call to a virtual function.
llvm-svn: 88891 
							
						 
						
							2009-11-16 05:31:29 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								011c4c341b 
								
							 
						 
						
							
							
								
								Implement two-argument form of delete operator.  
							
							 
							
							... 
							
							
							
							llvm-svn: 88890 
							
						 
						
							2009-11-16 05:16:40 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								d787204e6d 
								
							 
						 
						
							
							
								
								When generating the deleting ctor, emit a call to delete.  
							
							 
							
							... 
							
							
							
							llvm-svn: 88878 
							
						 
						
							2009-11-15 23:03:25 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								4ac39ef6f9 
								
							 
						 
						
							
							
								
								Peer through refernces for typeid.  WIP.  
							
							 
							
							... 
							
							
							
							llvm-svn: 88871 
							
						 
						
							2009-11-15 20:30:39 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								1bf924b121 
								
							 
						 
						
							
							
								
								Finish off zero check for typeid(*p) so that it will do a __cxa_bad_typeid.  
							
							 
							
							... 
							
							
							
							llvm-svn: 88852 
							
						 
						
							2009-11-15 16:52:53 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								c9b231c8d1 
								
							 
						 
						
							
							
								
								Implement typeid for class types.  
							
							 
							
							... 
							
							
							
							llvm-svn: 88843 
							
						 
						
							2009-11-15 08:09:41 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								4c808dfc58 
								
							 
						 
						
							
							
								
								Finish off support for typeinfo generation for classes.  
							
							 
							
							... 
							
							
							
							llvm-svn: 88828 
							
						 
						
							2009-11-15 03:28:10 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								f5b2869b75 
								
							 
						 
						
							
							
								
								Finisgh off rest of class_type_info rtti generation.  
							
							 
							
							... 
							
							
							
							llvm-svn: 88823 
							
						 
						
							2009-11-14 23:32:21 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								50cb321fdc 
								
							 
						 
						
							
							
								
								Handle CK_BitCast in EmitCastLValue.  
							
							 
							
							... 
							
							
							
							llvm-svn: 88810 
							
						 
						
							2009-11-14 21:21:42 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								0acee6e0d7 
								
							 
						 
						
							
							
								
								Canonicalize the type before trying to create a debug type.  
							
							 
							
							... 
							
							
							
							llvm-svn: 88808 
							
						 
						
							2009-11-14 21:08:12 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								6037e78149 
								
							 
						 
						
							
							
								
								Have CGDebugInfo::getOrCreateType cache the QualType instead of having every ConvertType overload do it.  
							
							 
							
							... 
							
							
							
							llvm-svn: 88807 
							
						 
						
							2009-11-14 20:52:05 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								1acec6a41a 
								
							 
						 
						
							
							
								
								Build up more of the rtti info for a class.  WIP.  
							
							 
							
							... 
							
							
							
							llvm-svn: 88795 
							
						 
						
							2009-11-14 15:55:18 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								14718425fa 
								
							 
						 
						
							
							
								
								Add the name to the rtti data structure.  
							
							 
							
							... 
							
							
							
							llvm-svn: 88792 
							
						 
						
							2009-11-14 14:25:18 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								274ab904d0 
								
							 
						 
						
							
							
								
								Avoid assert-crash in a case where the expression passed to EmitConstantExpr  
							
							 
							
							... 
							
							
							
							legitimately has side-effects (and needs to be generated as a non-constant).
llvm-svn: 88767 
							
						 
						
							2009-11-14 08:51:33 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								b210fc598f 
								
							 
						 
						
							
							
								
								Make __func__ and friends work correctly within the initializer for a static  
							
							 
							
							... 
							
							
							
							local variable.
llvm-svn: 88766 
							
						 
						
							2009-11-14 08:37:13 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								b572c92674 
								
							 
						 
						
							
							
								
								PR5483: Generate missing form of destructor when it is virtual.  (Someone  
							
							 
							
							... 
							
							
							
							more familiar with this stuff should double-check that there isn't some more
general rule; this is purely from inspecting g++ output.)
llvm-svn: 88755 
							
						 
						
							2009-11-14 04:19:37 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								da2efb091d 
								
							 
						 
						
							
							
								
								Generate the old API when sending message to super  
							
							 
							
							... 
							
							
							
							in a category implementation (objc 32bit api related).
llvm-svn: 88741 
							
						 
						
							2009-11-14 02:18:31 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								52ce3bbf57 
								
							 
						 
						
							
							
								
								Handle CXXDefaultArgExprs in EmitLValue. Fixes PR5484.  
							
							 
							
							... 
							
							
							
							llvm-svn: 88735 
							
						 
						
							2009-11-14 01:51:50 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								2ec5dd7160 
								
							 
						 
						
							
							
								
								Mangling support for typeinfo names.  
							
							 
							
							... 
							
							
							
							llvm-svn: 88726 
							
						 
						
							2009-11-14 00:14:13 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								c5a332cefb 
								
							 
						 
						
							
							
								
								Handle descructor printing better.  
							
							 
							
							... 
							
							
							
							llvm-svn: 88723 
							
						 
						
							2009-11-13 23:45:53 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								559387fe8b 
								
							 
						 
						
							
							
								
								Also track address points for primaries bases.  
							
							 
							
							... 
							
							
							
							llvm-svn: 88717 
							
						 
						
							2009-11-13 23:13:20 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								ebea005812 
								
							 
						 
						
							
							
								
								Code gen. For virtual destructor call on array objects  
							
							 
							
							... 
							
							
							
							(still part of pr5472).
llvm-svn: 88712 
							
						 
						
							2009-11-13 22:29:45 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								6f04b1e605 
								
							 
						 
						
							
							
								
								Obvious fix for PR5474.  
							
							 
							
							... 
							
							
							
							llvm-svn: 88696 
							
						 
						
							2009-11-13 21:23:46 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								f75c1f7a73 
								
							 
						 
						
							
							
								
								Fixes a code gen. bug for array delete operator call  
							
							 
							
							... 
							
							
							
							int 32bit abi (pr5472 related).
-This line, and those below, will be ignored--
M    lib/CodeGen/CGCXXExpr.cpp
llvm-svn: 88695 
							
						 
						
							2009-11-13 21:20:14 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								6814eaa2cc 
								
							 
						 
						
							
							
								
								Code gen for arrady delete operator. Fixes pr5472.  
							
							 
							
							... 
							
							
							
							llvm-svn: 88680 
							
						 
						
							2009-11-13 19:27:47 +00:00  
						
					 
				
					
						
							
							
								 
								Devang Patel
							
						 
						
							 
							
							
							
							
								
							
							
								b40f295037 
								
							 
						 
						
							
							
								
								Do not store DIDescriptor directly into a container. Store MDNode directly, through TrackingVH.  
							
							 
							
							... 
							
							
							
							llvm-svn: 88677 
							
						 
						
							2009-11-13 19:10:24 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								88fc7d4202 
								
							 
						 
						
							
							
								
								This falls into the category of stupid pet tricks.  I hate to do this,  
							
							 
							
							... 
							
							
							
							but this is necessary to continue work on virtual vtables.  We don't
want to penalize virtual table building testcases, just because
complex virtual conversions don't yet work.
llvm-svn: 88676 
							
						 
						
							2009-11-13 18:53:35 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								fb4dda4fed 
								
							 
						 
						
							
							
								
								Instead of storing CXXMethodDecls in the vtable builder, store GlobalDecls so we can represent both the complete and deleting destructors. Also, when encountering a destructor decl, emit entries for both the complete and deleting destructors. Mike, please review.  
							
							 
							
							... 
							
							
							
							With this change, FileCheck builds and runs the clang test suite without failures!
llvm-svn: 88663 
							
						 
						
							2009-11-13 17:08:56 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								1b4441915a 
								
							 
						 
						
							
							
								
								Wherein the TargetInfo argument to Preprocessor is made 'const' and propogated.  
							
							 
							
							... 
							
							
							
							llvm-svn: 87087 
							
						 
						
							2009-11-13 05:51:54 +00:00  
						
					 
				
					
						
							
							
								 
								Zhongxing Xu
							
						 
						
							 
							
							
							
							
								
							
							
								1721ef7a53 
								
							 
						 
						
							
							
								
								Include header for printf.  
							
							 
							
							... 
							
							
							
							llvm-svn: 87086 
							
						 
						
							2009-11-13 05:46:16 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								e828c36933 
								
							 
						 
						
							
							
								
								Add a special BuildVirtualCall that's going to be used for building calls to destructors. This is needed because when compiling:  
							
							 
							
							... 
							
							
							
							struct A {
	virtual ~A();
};
void f(A* a) {
	delete a;
}
A's deleting destructor should be called.
llvm-svn: 87083 
							
						 
						
							2009-11-13 04:45:41 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								78cfaa9e56 
								
							 
						 
						
							
							
								
								Fix two bugs with temporaries:  
							
							 
							
							... 
							
							
							
							1. For 
A f() {
	return A();
}
we were incorrectly calling the A destructor on the returned object.
2. For
void f(A);
void g() {
	A a;
	f(a);
}
we were incorrectly not calling the copy constructor.
llvm-svn: 87082 
							
						 
						
							2009-11-13 04:34:45 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								87f84c1e72 
								
							 
						 
						
							
							
								
								Move GlobalDecl to its own file. Also add DenseMapInfo traits.  
							
							 
							
							... 
							
							
							
							llvm-svn: 87081 
							
						 
						
							2009-11-13 04:25:07 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								fa81808a11 
								
							 
						 
						
							
							
								
								Refine construction vtables; they don't include bits that don't have  
							
							 
							
							... 
							
							
							
							virtual bases unless they are morally virtual.
llvm-svn: 87071 
							
						 
						
							2009-11-13 02:35:38 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								653d0b99df 
								
							 
						 
						
							
							
								
								Refine the construction vtables with respect to offsets.  WIP.  
							
							 
							
							... 
							
							
							
							llvm-svn: 87067 
							
						 
						
							2009-11-13 02:13:54 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								83066c8dee 
								
							 
						 
						
							
							
								
								Allow the tracking of address points for construction vtables as well.  
							
							 
							
							... 
							
							
							
							llvm-svn: 87063 
							
						 
						
							2009-11-13 01:54:23 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								2b34bc5a96 
								
							 
						 
						
							
							
								
								Refine which vtbl is refernced in VTTs.  
							
							 
							
							... 
							
							
							
							llvm-svn: 87043 
							
						 
						
							2009-11-12 23:36:21 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								ca0de33113 
								
							 
						 
						
							
							
								
								Refine offsets into vtables for the VTT.  
							
							 
							
							... 
							
							
							
							llvm-svn: 87041 
							
						 
						
							2009-11-12 23:14:15 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								8677bc27bf 
								
							 
						 
						
							
							
								
								Refine vtable pointers for secondary vtables inside VTTs to point to  
							
							 
							
							... 
							
							
							
							the right base vtable.  WIP.
llvm-svn: 87039 
							
						 
						
							2009-11-12 22:56:32 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								2cefe38365 
								
							 
						 
						
							
							
								
								Fix the offset calculations for non-virtual bases with overrides.  
							
							 
							
							... 
							
							
							
							Refine the VTT entries for virtual bases to refer to the complete
object's vtable instead of constructor vtables.
Refine the AddressPoint calculations for VTT entries for virtual bases.
llvm-svn: 87021 
							
						 
						
							2009-11-12 20:47:57 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								eb80c98a72 
								
							 
						 
						
							
							
								
								Fix a code gen bug in i386-apple-darwin (objc fragile abi), sending  
							
							 
							
							... 
							
							
							
							message to 'super'. Fixes radar 7205866.
llvm-svn: 87017 
							
						 
						
							2009-11-12 20:14:24 +00:00  
						
					 
				
					
						
							
							
								 
								Devang Patel
							
						 
						
							 
							
							
							
							
								
							
							
								94f798c079 
								
							 
						 
						
							
							
								
								"Attach debug info with llvm instructions" mode was enabled a month ago. Now make it permanent and remove old way of inserting intrinsics to encode debug info for locations and types.  
							
							 
							
							... 
							
							
							
							llvm-svn: 87007 
							
						 
						
							2009-11-12 18:21:39 +00:00  
						
					 
				
					
						
							
							
								 
								Devang Patel
							
						 
						
							 
							
							
							
							
								
							
							
								6e98d7af22 
								
							 
						 
						
							
							
								
								Use getNameAsCString() instead of getName().data()  
							
							 
							
							... 
							
							
							
							llvm-svn: 87001 
							
						 
						
							2009-11-12 17:49:47 +00:00  
						
					 
				
					
						
							
							
								 
								Chandler Carruth
							
						 
						
							 
							
							
							
							
								
							
							
								bc55fe26c6 
								
							 
						 
						
							
							
								
								Move CompileOptions -> CodeGenOptions, and sink it into the CodeGen library.  
							
							 
							
							... 
							
							
							
							This resolves the layering violation where CodeGen depended on Frontend.
llvm-svn: 86998 
							
						 
						
							2009-11-12 17:24:48 +00:00  
						
					 
				
					
						
							
							
								 
								Devang Patel
							
						 
						
							 
							
							
							
							
								
							
							
								7bdf096f8d 
								
							 
						 
						
							
							
								
								Do not use StringRef while using DebugInfo interface.  
							
							 
							
							... 
							
							
							
							llvm-svn: 86915 
							
						 
						
							2009-11-12 00:51:46 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								fd84d6d808 
								
							 
						 
						
							
							
								
								Fix ctor vtable name.  WIP.  
							
							 
							
							... 
							
							
							
							llvm-svn: 86879 
							
						 
						
							2009-11-11 20:32:03 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								eac4559790 
								
							 
						 
						
							
							
								
								Push ctor vtable construction down further.  WIP.  
							
							 
							
							... 
							
							
							
							llvm-svn: 86878 
							
						 
						
							2009-11-11 20:26:26 +00:00  
						
					 
				
					
						
							
							
								 
								Devang Patel
							
						 
						
							 
							
							
							
							
								
							
							
								5348515193 
								
							 
						 
						
							
							
								
								Do not eagerly set stop point for arguments. This misleads the debugger in identifying beginning of function body. Instead, create new location to attach with llvm.dbg.declare. This location is only used to find the context of the variable by the code generator, and it is not used to emit line number info.  
							
							 
							
							... 
							
							
							
							llvm-svn: 86862 
							
						 
						
							2009-11-11 19:10:19 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								03f62ed9bb 
								
							 
						 
						
							
							
								
								Value initialize non-class array members in ctor's  
							
							 
							
							... 
							
							
							
							initializer list. Fixes PR5463.
llvm-svn: 86849 
							
						 
						
							2009-11-11 17:55:25 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								c7b9f5e762 
								
							 
						 
						
							
							
								
								More VTT work.  We now track offsets and use the ctor vtable builder  
							
							 
							
							... 
							
							
							
							interface.  WIP.
llvm-svn: 86793 
							
						 
						
							2009-11-11 03:08:24 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								e6c8112572 
								
							 
						 
						
							
							
								
								Avoid generating additional destructor(s) for initialized constructed  
							
							 
							
							... 
							
							
							
							objects.
llvm-svn: 86778 
							
						 
						
							2009-11-11 01:13:34 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								8b2d2d0707 
								
							 
						 
						
							
							
								
								Stub out most of the VTT building code.  WIP.  
							
							 
							
							... 
							
							
							
							llvm-svn: 86772 
							
						 
						
							2009-11-11 00:35:07 +00:00  
						
					 
				
					
						
							
							
								 
								Devang Patel
							
						 
						
							 
							
							
							
							
								
							
							
								af993bf5cc 
								
							 
						 
						
							
							
								
								Attach location info with llvm.dbg.declare.  
							
							 
							
							... 
							
							
							
							llvm-svn: 86750 
							
						 
						
							2009-11-10 23:07:24 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								d76f438369 
								
							 
						 
						
							
							
								
								Revert r86741; it doesn't handle virtual bases correctly.  
							
							 
							
							... 
							
							
							
							llvm-svn: 86745 
							
						 
						
							2009-11-10 22:48:10 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								0960059c0c 
								
							 
						 
						
							
							
								
								Minor optimization to skip null check in generated code where it isn't  
							
							 
							
							... 
							
							
							
							necessary.
llvm-svn: 86741 
							
						 
						
							2009-11-10 22:42:26 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								3ad2645430 
								
							 
						 
						
							
							
								
								Fix for PR5454: make sure to use the right block as the predecessor in the  
							
							 
							
							... 
							
							
							
							generated PHI node for the null check of a new operator.
llvm-svn: 86738 
							
						 
						
							2009-11-10 22:39:09 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								1254a0978c 
								
							 
						 
						
							
							
								
								This patch implements Code gen. for destruction of  
							
							 
							
							... 
							
							
							
							global array of objects.
llvm-svn: 86701 
							
						 
						
							2009-11-10 19:24:06 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								b47222144b 
								
							 
						 
						
							
							
								
								Only generate a VTT for classes that need a VTT.  
							
							 
							
							... 
							
							
							
							llvm-svn: 86699 
							
						 
						
							2009-11-10 19:13:04 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								d846d0825b 
								
							 
						 
						
							
							
								
								Add vtable caching to prevent multiple vtables for the same class from  
							
							 
							
							... 
							
							
							
							being generated.
Add the most derived vtable pointer to the VTT.
llvm-svn: 86671 
							
						 
						
							2009-11-10 07:44:33 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								9f23a149cb 
								
							 
						 
						
							
							
								
								Be sure to clear out VCall when we clear out VCalls.  
							
							 
							
							... 
							
							
							
							Start implementing VTTs.  WIP.
llvm-svn: 86650 
							
						 
						
							2009-11-10 02:30:51 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								3b9176985d 
								
							 
						 
						
							
							
								
								Finish off mangling for the VTT.  
							
							 
							
							... 
							
							
							
							llvm-svn: 86647 
							
						 
						
							2009-11-10 01:58:37 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								ef15744092 
								
							 
						 
						
							
							
								
								Add mangling for the construction vtable.  
							
							 
							
							... 
							
							
							
							llvm-svn: 86643 
							
						 
						
							2009-11-10 01:41:59 +00:00  
						
					 
				
					
						
							
							
								 
								Jeffrey Yasskin
							
						 
						
							 
							
							
							
							
								
							
							
								612e38026a 
								
							 
						 
						
							
							
								
								Fix clang's use of DenseMap iterators after r86636 fixed their constness.  
							
							 
							
							... 
							
							
							
							Patch by Victor Zverovich!
llvm-svn: 86638 
							
						 
						
							2009-11-10 01:17:45 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								68ec7ee0e8 
								
							 
						 
						
							
							
								
								Enable the use of the new llvm objectsize intrinsic.  
							
							 
							
							... 
							
							
							
							llvm-svn: 86607 
							
						 
						
							2009-11-09 22:40:09 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								4ef1d400d9 
								
							 
						 
						
							
							
								
								Make sure that Type::getAs<ArrayType>() (or Type::getAs<subclass of  
							
							 
							
							... 
							
							
							
							ArrayType>()) does not instantiate. Update all callers that used this
unsafe feature to use the appropriate ASTContext::getAs*ArrayType method.
llvm-svn: 86596 
							
						 
						
							2009-11-09 22:08:55 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								cc522d9ab3 
								
							 
						 
						
							
							
								
								Rearrange function to avoid recursive use-after-free.  
							
							 
							
							... 
							
							
							
							llvm-svn: 86516 
							
						 
						
							2009-11-09 05:07:37 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								a72bf0fae8 
								
							 
						 
						
							
							
								
								Explicitly note that pre-inc/dec lvalues are not supported yet, so that it  
							
							 
							
							... 
							
							
							
							doesn't crash.  (Such expressions are valid in C++, but not in C.)
llvm-svn: 86513 
							
						 
						
							2009-11-09 04:20:47 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								11c08c8e5b 
								
							 
						 
						
							
							
								
								Rename areAllFields32Or64BitBasicType to canExpandIndirectArgument to closer match what it is semantically used for.  
							
							 
							
							... 
							
							
							
							Also, fix a major bug where fields from a C++ struct might be dropped -- the expand action doesn't handle them correctly yet.
llvm-svn: 86502 
							
						 
						
							2009-11-09 01:33:53 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								d7686ef31c 
								
							 
						 
						
							
							
								
								Unify the codepaths used to verify base and member initializers for explicitly  
							
							 
							
							... 
							
							
							
							and implicitly defined constructors.  This has a number of benefits:
1. Less code.
2. Explicit and implicit constructors get the same diagnostics.
3. The AST explicitly contains constructor calls from implicit default
constructors.  This allows handing some cases that previously weren't handled
correctly in IRGen without any additional code. Specifically, implicit default
constructors containing calls to constructors with default arguments are now
handled correctly.
llvm-svn: 86500 
							
						 
						
							2009-11-09 01:05:47 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								7e215ea165 
								
							 
						 
						
							
							
								
								Add clarifying parens.  
							
							 
							
							... 
							
							
							
							llvm-svn: 86457 
							
						 
						
							2009-11-08 09:46:46 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								5bbdc9f857 
								
							 
						 
						
							
							
								
								Handle member expressions where the member declaration is actually a static variable. Fixes PR5392.  
							
							 
							
							... 
							
							
							
							llvm-svn: 86414 
							
						 
						
							2009-11-07 23:16:50 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								ea4c30b39a 
								
							 
						 
						
							
							
								
								More LValue related code cleanup.  
							
							 
							
							... 
							
							
							
							llvm-svn: 86413 
							
						 
						
							2009-11-07 23:06:58 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								2ff6395ddc 
								
							 
						 
						
							
							
								
								More cleanup, the code is much easier to follow now.  
							
							 
							
							... 
							
							
							
							llvm-svn: 86412 
							
						 
						
							2009-11-07 22:53:10 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								6eee97276b 
								
							 
						 
						
							
							
								
								Reduce nesting, no functionality change.  
							
							 
							
							... 
							
							
							
							llvm-svn: 86411 
							
						 
						
							2009-11-07 22:46:42 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								03f83e58f7 
								
							 
						 
						
							
							
								
								We only need to call SetObjCNonGC for local variables. No functionality change.  
							
							 
							
							... 
							
							
							
							llvm-svn: 86410 
							
						 
						
							2009-11-07 22:43:34 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								509850ebec 
								
							 
						 
						
							
							
								
								Change EmitPointerToDataMemberLValue to take a FieldDecl. No intended functionality change.  
							
							 
							
							... 
							
							
							
							llvm-svn: 86407 
							
						 
						
							2009-11-07 22:00:15 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								15275e55ce 
								
							 
						 
						
							
							
								
								add missing #include  
							
							 
							
							... 
							
							
							
							llvm-svn: 86368 
							
						 
						
							2009-11-07 09:22:46 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								c0a3561f0f 
								
							 
						 
						
							
							
								
								Always mangle functions with special names. Fixes PR5420.  
							
							 
							
							... 
							
							
							
							llvm-svn: 86350 
							
						 
						
							2009-11-07 07:15:03 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								ce21431fc4 
								
							 
						 
						
							
							
								
								When looking up and adding substitutions to the substitution table, make sure to always use the canonical declaration. With tihs change, FileCheck compiles and links but crashes during startup.  
							
							 
							
							... 
							
							
							
							llvm-svn: 86339 
							
						 
						
							2009-11-07 04:26:04 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								3d888e4548 
								
							 
						 
						
							
							
								
								Revert r86315 and add Type::FixedWidthInt to the FIXME cases.  
							
							 
							
							... 
							
							
							
							llvm-svn: 86320 
							
						 
						
							2009-11-07 01:19:37 +00:00  
						
					 
				
					
						
							
							
								 
								Devang Patel
							
						 
						
							 
							
							
							
							
								
							
							
								5b39e2382f 
								
							 
						 
						
							
							
								
								Do not assert if debug info for certain type is not generated.  
							
							 
							
							... 
							
							
							
							llvm-svn: 86315 
							
						 
						
							2009-11-07 00:29:05 +00:00  
						
					 
				
					
						
							
							
								 
								Devang Patel
							
						 
						
							 
							
							
							
							
								
							
							
								eef461c230 
								
							 
						 
						
							
							
								
								Do not emit linkage name for global variables. It confuses gdb, because it picks up AT_MIPS_linkage_name and ignores AT_name.  
							
							 
							
							... 
							
							
							
							llvm-svn: 86308 
							
						 
						
							2009-11-07 00:10:18 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								cd6f9ed906 
								
							 
						 
						
							
							
								
								Refine the non-virtual this adjustment.  Optimize out virtual this  
							
							 
							
							... 
							
							
							
							adjustments of zero.
llvm-svn: 86300 
							
						 
						
							2009-11-06 23:27:42 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								e8e631c912 
								
							 
						 
						
							
							
								
								Prevent a code gen. crash on empty unions - pr5408.  
							
							 
							
							... 
							
							
							
							llvm-svn: 86287 
							
						 
						
							2009-11-06 20:47:40 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								443f677302 
								
							 
						 
						
							
							
								
								Simplify the debug info code, handle lvalue references and template specializations.  
							
							 
							
							... 
							
							
							
							llvm-svn: 86277 
							
						 
						
							2009-11-06 19:19:55 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								c2d71b531c 
								
							 
						 
						
							
							
								
								This patch fixes code gen. part of pr5333 (Conversion  
							
							 
							
							... 
							
							
							
							using elipsis conversion).
llvm-svn: 86276 
							
						 
						
							2009-11-06 18:47:57 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								8a6512961f 
								
							 
						 
						
							
							
								
								Handle QualifiedNameType and SubstTemplateTypeParmType types in CGDebugInfo::CreateTypeNode.  
							
							 
							
							... 
							
							
							
							llvm-svn: 86274 
							
						 
						
							2009-11-06 18:45:16 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								25ed5c2f42 
								
							 
						 
						
							
							
								
								Don't assert when trying to generate debug info for vector types. This needs to be fixed eventually...  
							
							 
							
							... 
							
							
							
							llvm-svn: 86268 
							
						 
						
							2009-11-06 18:24:04 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								353fc1e447 
								
							 
						 
						
							
							
								
								update comment, pointed out by Gabor  
							
							 
							
							... 
							
							
							
							llvm-svn: 86263 
							
						 
						
							2009-11-06 18:10:47 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								4f24225e8e 
								
							 
						 
						
							
							
								
								indirectbr seems to work!  Rip out the old code.  
							
							 
							
							... 
							
							
							
							llvm-svn: 86256 
							
						 
						
							2009-11-06 17:38:18 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								eb9bc2ba82 
								
							 
						 
						
							
							
								
								Instead of returning a null DIType for unhandled types, assert.  
							
							 
							
							... 
							
							
							
							llvm-svn: 86254 
							
						 
						
							2009-11-06 17:01:39 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								421a5c9651 
								
							 
						 
						
							
							
								
								If a member variable of reference type is bound to a temporary in its member initializer it needs to be destroyed at the end of the constructor.  
							
							 
							
							... 
							
							
							
							llvm-svn: 86230 
							
						 
						
							2009-11-06 04:19:02 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								5852b13827 
								
							 
						 
						
							
							
								
								If a member initializer create temporaries we need to destroy them. Fixes PR5077.  
							
							 
							
							... 
							
							
							
							llvm-svn: 86225 
							
						 
						
							2009-11-06 04:11:09 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								a7cb98b202 
								
							 
						 
						
							
							
								
								More cleanup.  
							
							 
							
							... 
							
							
							
							llvm-svn: 86224 
							
						 
						
							2009-11-06 03:23:06 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								438cf92533 
								
							 
						 
						
							
							
								
								Cleanup ctor/dtor emission.  
							
							 
							
							... 
							
							
							
							llvm-svn: 86222 
							
						 
						
							2009-11-06 02:55:43 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								9e4e0237e4 
								
							 
						 
						
							
							
								
								Handle ParenExprs in mangleExpression.  
							
							 
							
							... 
							
							
							
							llvm-svn: 86218 
							
						 
						
							2009-11-06 02:50:19 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								72431bd9ea 
								
							 
						 
						
							
							
								
								Refine the vcall for a function that is defined in a virtual base  
							
							 
							
							... 
							
							
							
							class that is overridden in a base that isn't morally virtual.
llvm-svn: 86217 
							
						 
						
							2009-11-06 02:38:24 +00:00  
						
					 
				
					
						
							
							
								 
								Devang Patel
							
						 
						
							 
							
							
							
							
								
							
							
								ba3c6681f0 
								
							 
						 
						
							
							
								
								Enable debug info for global variables at -O1+  
							
							 
							
							... 
							
							
							
							llvm-svn: 86156 
							
						 
						
							2009-11-05 19:13:29 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								4127b8ef97 
								
							 
						 
						
							
							
								
								Added support for static variables which require  
							
							 
							
							... 
							
							
							
							initialization before main. Fixes pr5396.
llvm-svn: 86145 
							
						 
						
							2009-11-05 18:03:03 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								c550768a11 
								
							 
						 
						
							
							
								
								References can't be zero; omit zero check for return value adjustments  
							
							 
							
							... 
							
							
							
							in covariant thunks that return references.
llvm-svn: 86121 
							
						 
						
							2009-11-05 06:32:02 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								b8da7a046d 
								
							 
						 
						
							
							
								
								Refine covariant return value adjustments for thunks when null  
							
							 
							
							... 
							
							
							
							pointers are returned.
llvm-svn: 86120 
							
						 
						
							2009-11-05 06:12:26 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								18bc195473 
								
							 
						 
						
							
							
								
								Add code gen for pointer-to-member function in  
							
							 
							
							... 
							
							
							
							ctor's initializer. Fixes pr5178.
llvm-svn: 86040 
							
						 
						
							2009-11-04 19:13:37 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								09cc10f9f8 
								
							 
						 
						
							
							
								
								This patch extends CleanupScope to support destruction  
							
							 
							
							... 
							
							
							
							of array objects on block exit. Patch is by Anders Calrsson.
llvm-svn: 86032 
							
						 
						
							2009-11-04 17:57:40 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								615ac67fb8 
								
							 
						 
						
							
							
								
								Store the unresolved class type in MemberPointerType's Class field,  
							
							 
							
							... 
							
							
							
							from Peter Collingbourne!
llvm-svn: 86030 
							
						 
						
							2009-11-04 16:49:01 +00:00  
						
					 
				
					
						
							
							
								 
								Tanya Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								f9d41df093 
								
							 
						 
						
							
							
								
								Merge constant array and structures. This will create a global variables for arrays and structs that are constant and their initializer is constant. It is on by default but can be disable with the flag -fno-merge-all-constants.  
							
							 
							
							... 
							
							
							
							llvm-svn: 85991 
							
						 
						
							2009-11-04 01:18:09 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								b9c9b351e9 
								
							 
						 
						
							
							
								
								Fix 80-col violations.  
							
							 
							
							... 
							
							
							
							llvm-svn: 85990 
							
						 
						
							2009-11-04 01:11:15 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								71609a2874 
								
							 
						 
						
							
							
								
								Split out return adjustments in thunks from this adjustment in thunks  
							
							 
							
							... 
							
							
							
							so the optimizer can tailcall into the return value adjustment thunk.
This improves codesize for complex hierarchies.
llvm-svn: 85988 
							
						 
						
							2009-11-04 00:53:51 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								8117848174 
								
							 
						 
						
							
							
								
								Misc cleanups.  
							
							 
							
							... 
							
							
							
							llvm-svn: 85978 
							
						 
						
							2009-11-03 23:50:34 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								53f9ded62b 
								
							 
						 
						
							
							
								
								Refine volatile handling, specifically, we must have the canonical  
							
							 
							
							... 
							
							
							
							type to look at the volatile specifier.  I found these all from just
hand auditing the code.
llvm-svn: 85967 
							
						 
						
							2009-11-03 23:25:48 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								4627132ebc 
								
							 
						 
						
							
							
								
								Refine codegen for covariant thunks that return references.  
							
							 
							
							... 
							
							
							
							llvm-svn: 85916 
							
						 
						
							2009-11-03 19:03:17 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								77738205e6 
								
							 
						 
						
							
							
								
								Refine return value adjustments for thunks.  
							
							 
							
							... 
							
							
							
							llvm-svn: 85905 
							
						 
						
							2009-11-03 16:59:27 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								462a4aa787 
								
							 
						 
						
							
							
								
								Fix documentation.  
							
							 
							
							... 
							
							
							
							llvm-svn: 85901 
							
						 
						
							2009-11-03 16:11:57 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								92e5f8cb39 
								
							 
						 
						
							
							
								
								Refine codegen for non-virtual this adjustments for thunks.  
							
							 
							
							... 
							
							
							
							llvm-svn: 85856 
							
						 
						
							2009-11-03 03:16:46 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								f358972fdc 
								
							 
						 
						
							
							
								
								Add virtual adjustments for this for thunks.  
							
							 
							
							... 
							
							
							
							llvm-svn: 85852 
							
						 
						
							2009-11-03 02:12:59 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								31e1d43729 
								
							 
						 
						
							
							
								
								Add basic codegen for thunks that return values.  
							
							 
							
							... 
							
							
							
							llvm-svn: 85842 
							
						 
						
							2009-11-02 23:47:45 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								33ccd9e354 
								
							 
						 
						
							
							
								
								Refine codegen for thunks.  
							
							 
							
							... 
							
							
							
							llvm-svn: 85839 
							
						 
						
							2009-11-02 23:22:01 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								75ce573815 
								
							 
						 
						
							
							
								
								Refine vcall/vbase ordering with vtable construction.  
							
							 
							
							... 
							
							
							
							llvm-svn: 85677 
							
						 
						
							2009-10-31 20:06:59 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								32e1b1c169 
								
							 
						 
						
							
							
								
								Get throws limping along, still a bunch of FIXMEs. Too bad we don't support catching anything yet :)  
							
							 
							
							... 
							
							
							
							llvm-svn: 85574 
							
						 
						
							2009-10-30 02:27:02 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								958c9f8524 
								
							 
						 
						
							
							
								
								Fix thinko, mangleCXXRtti should obviously take a QualType!  
							
							 
							
							... 
							
							
							
							llvm-svn: 85565 
							
						 
						
							2009-10-30 01:52:02 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								4b08db7a62 
								
							 
						 
						
							
							
								
								Add CGException.cpp, to be used for exception related code generation.  
							
							 
							
							... 
							
							
							
							llvm-svn: 85560 
							
						 
						
							2009-10-30 01:42:31 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								430046321b 
								
							 
						 
						
							
							
								
								mangleCXXRtti obviously needs to take a type, what was I thinking...  
							
							 
							
							... 
							
							
							
							llvm-svn: 85555 
							
						 
						
							2009-10-30 01:26:12 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								c9076fecdf 
								
							 
						 
						
							
							
								
								Patch for destruction of array of objects on block exit.  
							
							 
							
							... 
							
							
							
							llvm-svn: 85512 
							
						 
						
							2009-10-29 16:22:54 +00:00  
						
					 
				
					
						
							
							
								 
								Nuno Lopes
							
						 
						
							 
							
							
							
							
								
							
							
								09bd8656c3 
								
							 
						 
						
							
							
								
								make clang emit undefs for padding of structs and unions instead of zeros. this enables constant compaction optimizations.  
							
							 
							
							... 
							
							
							
							llvm-svn: 85504 
							
						 
						
							2009-10-29 11:27:06 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								edc56ef41c 
								
							 
						 
						
							
							
								
								optimize out some ifdefs.  
							
							 
							
							... 
							
							
							
							llvm-svn: 85453 
							
						 
						
							2009-10-29 00:22:00 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								6c4d255bf3 
								
							 
						 
						
							
							
								
								Implement clang support for indirect branch and address of label  
							
							 
							
							... 
							
							
							
							using the new LLVM support for this.  This is temporarily hiding
behind horrible and ugly #ifdefs until the time when the optimizer
is stable (hopefully a week or so).  Until then, lets make it "opt in" :)
llvm-svn: 85446 
							
						 
						
							2009-10-28 23:59:40 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								29baa2b1ba 
								
							 
						 
						
							
							
								
								Minor cleanup.  
							
							 
							
							... 
							
							
							
							llvm-svn: 85434 
							
						 
						
							2009-10-28 21:07:28 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								f1639fffbc 
								
							 
						 
						
							
							
								
								Code gen for array construction - WIP  
							
							 
							
							... 
							
							
							
							llvm-svn: 85432 
							
						 
						
							2009-10-28 20:55:41 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								476e2dfe19 
								
							 
						 
						
							
							
								
								Refactor a bit.  
							
							 
							
							... 
							
							
							
							llvm-svn: 85424 
							
						 
						
							2009-10-28 20:44:03 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								a0c0d88ba8 
								
							 
						 
						
							
							
								
								factor a creation of Int32Ty.  
							
							 
							
							... 
							
							
							
							llvm-svn: 85422 
							
						 
						
							2009-10-28 20:36:47 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								ab5e0af8bc 
								
							 
						 
						
							
							
								
								random tidying  
							
							 
							
							... 
							
							
							
							llvm-svn: 85408 
							
						 
						
							2009-10-28 17:39:19 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								05925031f7 
								
							 
						 
						
							
							
								
								Mangle based on the declaration we're given, not the canonical  
							
							 
							
							... 
							
							
							
							declaration, since attributes that affect mangling may have been added
to subsequent declarations. However, to determine the linkage of the
declaration, we need to look at the canonical declaration. Fixes PR4412.
llvm-svn: 85400 
							
						 
						
							2009-10-28 16:31:34 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								5e71d43155 
								
							 
						 
						
							
							
								
								adjust for a pending LLVM change.  
							
							 
							
							... 
							
							
							
							llvm-svn: 85373 
							
						 
						
							2009-10-28 05:12:07 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								82d25e4e5e 
								
							 
						 
						
							
							
								
								Add mangling for VTTs.  
							
							 
							
							... 
							
							
							
							llvm-svn: 85363 
							
						 
						
							2009-10-28 01:51:46 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								375faa8dd7 
								
							 
						 
						
							
							
								
								Finish off pure virtual function handling.  
							
							 
							
							... 
							
							
							
							llvm-svn: 85354 
							
						 
						
							2009-10-28 00:35:46 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								bb9ff05778 
								
							 
						 
						
							
							
								
								Prep work for putting ___cxa_pure_virtual in the vtables for pure functions.  
							
							 
							
							... 
							
							
							
							llvm-svn: 85345 
							
						 
						
							2009-10-27 23:46:47 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								18e8b477e8 
								
							 
						 
						
							
							
								
								Refactor code a little.  
							
							 
							
							... 
							
							
							
							llvm-svn: 85343 
							
						 
						
							2009-10-27 23:36:26 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								b7e5c847c4 
								
							 
						 
						
							
							
								
								Implement proper linkage for explicit instantiation declarations of  
							
							 
							
							... 
							
							
							
							inlined functions. For example, given
  template<typename T>
  class string {
    unsigned Len;
  public:
    unsigned size() const { return Len; }
  };
  extern template class string<char>;
we now give the instantiation of string<char>::size
available_externally linkage (if it is ever instantiated!), as
permitted by the C++0x standard.
      
llvm-svn: 85340 
							
						 
						
							2009-10-27 23:26:40 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								876387ba4f 
								
							 
						 
						
							
							
								
								__builtin_object_size refinements.  Ensure we handle expressions with  
							
							 
							
							... 
							
							
							
							side-effects up front, as when we switch to the llvm intrinsic call
for __builtin_object_size later, it will have two evaluations.
We also finish off the intrinsic version of the code so we can just
turn it on once llvm has the intrinsic.
llvm-svn: 85324 
							
						 
						
							2009-10-27 22:09:17 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								583dcafce4 
								
							 
						 
						
							
							
								
								Introduce FunctionDecl::isInlined() to tell whether a function should  
							
							 
							
							... 
							
							
							
							be inlined.
llvm-svn: 85307 
							
						 
						
							2009-10-27 21:11:48 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								35b5753e17 
								
							 
						 
						
							
							
								
								Rename FunctionDecl::isInline/setInline to  
							
							 
							
							... 
							
							
							
							FunctionDecl::isInlineSpecified/setInlineSpecified.
llvm-svn: 85305 
							
						 
						
							2009-10-27 21:01:01 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								c369d73405 
								
							 
						 
						
							
							
								
								Set OptimizeForSize LLVM function attribute with -Os.  
							
							 
							
							... 
							
							
							
							llvm-svn: 85278 
							
						 
						
							2009-10-27 19:48:08 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								c14753b781 
								
							 
						 
						
							
							
								
								Fix crash when synthesizing property setters when the property type and ivar  
							
							 
							
							... 
							
							
							
							type have mismatched Objective-C types.
  - <rdar://problem/7336352> [irgen] crash in synthesized property construction
llvm-svn: 85275 
							
						 
						
							2009-10-27 19:21:30 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								29295bff61 
								
							 
						 
						
							
							
								
								Add a PrettyStackTraceDecl in CodeGenModule::EmitGlobalDefinition.  
							
							 
							
							... 
							
							
							
							llvm-svn: 85237 
							
						 
						
							2009-10-27 14:32:27 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								7a484dd6a9 
								
							 
						 
						
							
							
								
								Prep for future __builtin_object_size refinements.  The theory is that  
							
							 
							
							... 
							
							
							
							someone will add an llvm intrinsic for us to use, so the optimizer can
figure out the hard cases.  WIP.
For those that want to help, double check with Eric before starting.
He has a bit of code this will plug into.
llvm-svn: 85175 
							
						 
						
							2009-10-26 23:39:48 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								038374f887 
								
							 
						 
						
							
							
								
								Add Code gen support for '->*' operator which fell  
							
							 
							
							... 
							
							
							
							through the crack.
llvm-svn: 85160 
							
						 
						
							2009-10-26 21:58:25 +00:00  
						
					 
				
					
						
							
							
								 
								Chandler Carruth
							
						 
						
							 
							
							
							
							
								
							
							
								6e0df53865 
								
							 
						 
						
							
							
								
								Switch vtable to linkeonce_odr. Patch by nlewycky.  
							
							 
							
							... 
							
							
							
							llvm-svn: 85131 
							
						 
						
							2009-10-26 17:14:14 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								e0105ad38b 
								
							 
						 
						
							
							
								
								assert -> llvm_unreachable  
							
							 
							
							... 
							
							
							
							llvm-svn: 85125 
							
						 
						
							2009-10-26 16:27:58 +00:00  
						
					 
				
					
						
							
							
								 
								Chandler Carruth
							
						 
						
							 
							
							
							
							
								
							
							
								a3f084ce16 
								
							 
						 
						
							
							
								
								Update location of DataTypes.h to reflect move in LLVM with r85086.  
							
							 
							
							... 
							
							
							
							llvm-svn: 85087 
							
						 
						
							2009-10-26 01:37:10 +00:00  
						
					 
				
					
						
							
							
								 
								Nate Begeman
							
						 
						
							 
							
							
							
							
								
							
							
								b8326be4d9 
								
							 
						 
						
							
							
								
								Fix a bug in calculating shufflevector indices when constructing vectors from other vectors.  
							
							 
							
							... 
							
							
							
							If I can find it again, I will check in a testcase.
llvm-svn: 85032 
							
						 
						
							2009-10-25 02:26:01 +00:00  
						
					 
				
					
						
							
							
								 
								John McCall
							
						 
						
							 
							
							
							
							
								
							
							
								48f2d5860d 
								
							 
						 
						
							
							
								
								Store the builtin types as CanQualTypes.  Expand a bit on the CanQual API,  
							
							 
							
							... 
							
							
							
							but also remove some methods that cause ambiguities, and generally
make CanQual<blah> more analogous to QualType.
llvm-svn: 84976 
							
						 
						
							2009-10-23 23:03:21 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								4bd90e53c2 
								
							 
						 
						
							
							
								
								Eliminate QualifiedDeclRefExpr, which captured the notion of a  
							
							 
							
							... 
							
							
							
							qualified reference to a declaration that is not a non-static data
member or non-static member function, e.g., 
  namespace N { int i; }
  int j = N::i;
Instead, extend DeclRefExpr to optionally store the qualifier. Most
clients won't see or care about the difference (since
QualifierDeclRefExpr inherited DeclRefExpr). However, this reduces the
number of top-level expression types that clients need to cope with,
brings the implementation of DeclRefExpr into line with MemberExpr,
and simplifies and unifies our handling of declaration references.
Extended DeclRefExpr to (optionally) store explicitly-specified
template arguments. This occurs when naming a declaration via a
template-id (which will be stored in a TemplateIdRefExpr) that,
following template argument deduction and (possibly) overload
resolution, is replaced with a DeclRefExpr that refers to a template
specialization but maintains the template arguments as written.
llvm-svn: 84962 
							
						 
						
							2009-10-23 18:54:35 +00:00  
						
					 
				
					
						
							
							
								 
								John McCall
							
						 
						
							 
							
							
							
							
								
							
							
								6fd4c23324 
								
							 
						 
						
							
							
								
								Emit calls using the canonical prototype of the called function.  
							
							 
							
							... 
							
							
							
							llvm-svn: 84947 
							
						 
						
							2009-10-23 08:22:42 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								ae2559a221 
								
							 
						 
						
							
							
								
								Fixup the return type of functions.  
							
							 
							
							... 
							
							
							
							llvm-svn: 84922 
							
						 
						
							2009-10-23 01:52:13 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								ffba662dd2 
								
							 
						 
						
							
							
								
								Complete code gen for '.*' binary expression for  
							
							 
							
							... 
							
							
							
							both scalar and aggregates.
llvm-svn: 84910 
							
						 
						
							2009-10-22 22:57:31 +00:00  
						
					 
				
					
						
							
							
								 
								John McCall
							
						 
						
							 
							
							
							
							
								
							
							
								fc93cf9777 
								
							 
						 
						
							
							
								
								When building types from declarators, instead of building two types (one for  
							
							 
							
							... 
							
							
							
							the DeclaratorInfo, one for semantic analysis), just build a single type whose
canonical type will reflect the semantic analysis (assuming the type is
well-formed, of course).
To make that work, make a few changes to the type system:
* allow the nominal pointee type of a reference type to be a (possibly sugared)
  reference type.  Also, preserve the original spelling of the reference type.
  Both of these can be ignored on canonical reference types.
* Remove ObjCProtocolListType and preserve the associated source information on
  the various ObjC TypeLocs.  Preserve the spelling of protocol lists except in
  the canonical form.
* Preserve some level of source type structure on parameter types, but
  canonicalize on the canonical function type.  This is still a WIP.
Drops code size, makes strides towards accurate source location representation,
slight (~1.7%) progression on Cocoa.h because of complexity drop.
llvm-svn: 84907 
							
						 
						
							2009-10-22 22:37:11 +00:00  
						
					 
				
					
						
							
							
								 
								John McCall
							
						 
						
							 
							
							
							
							
								
							
							
								b692a098c6 
								
							 
						 
						
							
							
								
								Canonicality is a property of qualified types, not unqualified types.  
							
							 
							
							... 
							
							
							
							llvm-svn: 84891 
							
						 
						
							2009-10-22 20:10:53 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								c9f1efe6b3 
								
							 
						 
						
							
							
								
								Remove some misguided code.  
							
							 
							
							... 
							
							
							
							llvm-svn: 84823 
							
						 
						
							2009-10-22 01:31:24 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								e1b19ba05b 
								
							 
						 
						
							
							
								
								Extend out the block descriptor structure for debug information with  
							
							 
							
							... 
							
							
							
							the copy/dispose helpers as appropriate.
llvm-svn: 84817 
							
						 
						
							2009-10-22 00:49:09 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								52987dc581 
								
							 
						 
						
							
							
								
								Code gen for '.*' binary expressions - WIP.  
							
							 
							
							... 
							
							
							
							llvm-svn: 84800 
							
						 
						
							2009-10-21 23:45:42 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								f23b0ead3d 
								
							 
						 
						
							
							
								
								Turn on the preallocation of all BlockDeclRefExprs.  
							
							 
							
							... 
							
							
							
							llvm-svn: 84789 
							
						 
						
							2009-10-21 22:02:08 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								066b616684 
								
							 
						 
						
							
							
								
								Refine collection of BlockDeclRefExprs.  WIP.  
							
							 
							
							... 
							
							
							
							llvm-svn: 84787 
							
						 
						
							2009-10-21 22:01:24 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								b25817ac1f 
								
							 
						 
						
							
							
								
								Expand on code gen. for pointer to data members so it works  
							
							 
							
							... 
							
							
							
							for base classe members as well. Test case enhanced for this.
llvm-svn: 84780 
							
						 
						
							2009-10-21 21:01:47 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								4ebdff5e1c 
								
							 
						 
						
							
							
								
								Code gen for pointer-to-datamember - WIP.  
							
							 
							
							... 
							
							
							
							llvm-svn: 84771 
							
						 
						
							2009-10-21 18:38:00 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								945fec05dd 
								
							 
						 
						
							
							
								
								Fix typo.  
							
							 
							
							... 
							
							
							
							llvm-svn: 84770 
							
						 
						
							2009-10-21 18:24:18 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								41eb02d496 
								
							 
						 
						
							
							
								
								Refactor.  
							
							 
							
							... 
							
							
							
							llvm-svn: 84769 
							
						 
						
							2009-10-21 18:23:01 +00:00  
						
					 
				
					
						
							
							
								 
								Edward O'Callaghan
							
						 
						
							 
							
							
							
							
								
							
							
								437ec1ed6e 
								
							 
						 
						
							
							
								
								Add AuroraUX ABI Triple in correct place.  
							
							 
							
							... 
							
							
							
							llvm-svn: 84758 
							
						 
						
							2009-10-21 11:58:24 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								7fe9cc1dd5 
								
							 
						 
						
							
							
								
								Prep work to always preallocate BlockDeclRefExprs so that we can  
							
							 
							
							... 
							
							
							
							generate the debug information for the first parameter to the block
invoke functions.  WIP.
llvm-svn: 84737 
							
						 
						
							2009-10-21 03:49:08 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								70197d5441 
								
							 
						 
						
							
							
								
								Fix 80-col violation.  
							
							 
							
							... 
							
							
							
							llvm-svn: 84719 
							
						 
						
							2009-10-21 00:42:55 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								e4d94cee05 
								
							 
						 
						
							
							
								
								Code-gen for CXXZeroInitValueExpr AST passed  
							
							 
							
							... 
							
							
							
							as argument to a function call. Removes a FIXME.
llvm-svn: 84694 
							
						 
						
							2009-10-20 23:29:04 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								5789c497a0 
								
							 
						 
						
							
							
								
								Fix the 32-bit ABI to return structures with non-trivial copy ctors or dtors indirectly.  
							
							 
							
							... 
							
							
							
							llvm-svn: 84686 
							
						 
						
							2009-10-20 22:07:59 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								38382028c7 
								
							 
						 
						
							
							
								
								For now, we need to have the llvm type of the block pointer remain as  
							
							 
							
							... 
							
							
							
							it was.  Fixes codegen bug introduced yesterday.
llvm-svn: 84668 
							
						 
						
							2009-10-20 20:30:01 +00:00  
						
					 
				
					
						
							
							
								 
								Devang Patel
							
						 
						
							 
							
							
							
							
								
							
							
								e21912d1ae 
								
							 
						 
						
							
							
								
								Do not eagerly cache DITypes because it allows real struct type to be shadowed by forward declared struct type.  
							
							 
							
							... 
							
							
							
							llvm-svn: 84659 
							
						 
						
							2009-10-20 19:55:01 +00:00  
						
					 
				
					
						
							
							
								 
								Devang Patel
							
						 
						
							 
							
							
							
							
								
							
							
								e4f2b2a8ac 
								
							 
						 
						
							
							
								
								Encode global variable name in debug info.  
							
							 
							
							... 
							
							
							
							llvm-svn: 84653 
							
						 
						
							2009-10-20 18:26:30 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								710a80d3ba 
								
							 
						 
						
							
							
								
								Add missing semi-colon.  
							
							 
							
							... 
							
							
							
							llvm-svn: 84650 
							
						 
						
							2009-10-20 18:07:06 +00:00  
						
					 
				
					
						
							
							
								 
								Edward O'Callaghan
							
						 
						
							 
							
							
							
							
								
							
							
								462e4ab4ac 
								
							 
						 
						
							
							
								
								Bring Darwin into the switch-case statement instead of its own if for readability.  
							
							 
							
							... 
							
							
							
							llvm-svn: 84646 
							
						 
						
							2009-10-20 17:22:50 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								d015328f15 
								
							 
						 
						
							
							
								
								Refine the type of the first parameter to block invoke functions.  
							
							 
							
							... 
							
							
							
							WIP.  I have yet to find the magic incantation to get the structure
type to be defined.  If someone has a pointer, love to hear it.
llvm-svn: 84590 
							
						 
						
							2009-10-20 02:12:22 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								0999aafda5 
								
							 
						 
						
							
							
								
								Handle emitting the assignment operator when the lhs is a reference. Fixes PR5227.  
							
							 
							
							... 
							
							
							
							llvm-svn: 84518 
							
						 
						
							2009-10-19 18:28:22 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								d238681113 
								
							 
						 
						
							
							
								
								Avoid std::string concatenation.  
							
							 
							
							... 
							
							
							
							llvm-svn: 84458 
							
						 
						
							2009-10-19 01:21:19 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								b5aacc282c 
								
							 
						 
						
							
							
								
								Twinify CodeGenFunction::CreateTempAlloca  
							
							 
							
							... 
							
							
							
							llvm-svn: 84456 
							
						 
						
							2009-10-19 01:21:05 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								69c2c4becc 
								
							 
						 
						
							
							
								
								When binding a reference to a temporary, it's important that other temporaries created as on the RHS are destroyed before emitting the dtor for the temporary.  
							
							 
							
							... 
							
							
							
							llvm-svn: 84451 
							
						 
						
							2009-10-18 23:09:21 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								07d0785dbb 
								
							 
						 
						
							
							
								
								PR5218: Replace IdentifierInfo::getName with StringRef version, now that clients  
							
							 
							
							... 
							
							
							
							are updated.
llvm-svn: 84447 
							
						 
						
							2009-10-18 21:17:35 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								349e6fbfce 
								
							 
						 
						
							
							
								
								Twinify CGObjCMac, this simplifies the code and should reduce std::string  
							
							 
							
							... 
							
							
							
							trashing.
llvm-svn: 84439 
							
						 
						
							2009-10-18 20:48:59 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								9500ad13b0 
								
							 
						 
						
							
							
								
								Use CK_BitCast for member function pointer casts. Fixes PR5138.  
							
							 
							
							... 
							
							
							
							llvm-svn: 84438 
							
						 
						
							2009-10-18 20:31:03 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								70e7eadd15 
								
							 
						 
						
							
							
								
								Move misc clients to IdentifierInfo StringRef API.  
							
							 
							
							... 
							
							
							
							- strcmp -> ==
 - OS.write(II->getName() ...) -> OS << II->getNameStr()
 - Avoid std::string concatenation
 - Use getNameStr().str() when an std::string is really needed.
llvm-svn: 84437 
							
						 
						
							2009-10-18 20:26:27 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								2c422dc9ca 
								
							 
						 
						
							
							
								
								Move clients to use IdentifierInfo::getNameStart() instead of getName()  
							
							 
							
							... 
							
							
							
							llvm-svn: 84436 
							
						 
						
							2009-10-18 20:26:12 +00:00  
						
					 
				
					
						
							
							
								 
								Nate Begeman
							
						 
						
							 
							
							
							
							
								
							
							
								19351639fb 
								
							 
						 
						
							
							
								
								Support IRgen of OpenCL vector initializers, ensuring the resulting IR is in a  
							
							 
							
							... 
							
							
							
							form that LLVM code generators can turn into efficient code.  For example,
int4 a, b, c;
a = (int4)(b.yzw, a.x)
llvm-svn: 84434 
							
						 
						
							2009-10-18 20:10:40 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								094c459525 
								
							 
						 
						
							
							
								
								Add some more cast kinds.  
							
							 
							
							... 
							
							
							
							llvm-svn: 84423 
							
						 
						
							2009-10-18 18:12:03 +00:00  
						
					 
				
					
						
							
							
								 
								Nuno Lopes
							
						 
						
							 
							
							
							
							
								
							
							
								ff3507b951 
								
							 
						 
						
							
							
								
								add support for codegening CXXZeroInitValueExprs  
							
							 
							
							... 
							
							
							
							llvm-svn: 84418 
							
						 
						
							2009-10-18 15:18:11 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								1d4172c52b 
								
							 
						 
						
							
							
								
								Suppress -Asserts warning.  
							
							 
							
							... 
							
							
							
							llvm-svn: 84329 
							
						 
						
							2009-10-17 09:39:30 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								671fec8727 
								
							 
						 
						
							
							
								
								Fix PR5211: codegen shouldn't assume that the result of ||/&& is int  
							
							 
							
							... 
							
							
							
							anymore.  In C++ it is bool.
llvm-svn: 84308 
							
						 
						
							2009-10-17 04:24:20 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								da21efb566 
								
							 
						 
						
							
							
								
								Implement derived-to-base AST/code gen. There is a  
							
							 
							
							... 
							
							
							
							FIXME in CGCXX.cpp that I would like Anders to
take a look at.
llvm-svn: 84265 
							
						 
						
							2009-10-16 19:20:59 +00:00  
						
					 
				
					
						
							
							
								 
								Nuno Lopes
							
						 
						
							 
							
							
							
							
								
							
							
								8550cb250c 
								
							 
						 
						
							
							
								
								ignore 'using' directive in CodeGenFunction::EmitDecl(). this fixes PR5085  
							
							 
							
							... 
							
							
							
							llvm-svn: 84255 
							
						 
						
							2009-10-16 14:40:52 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								f847117ac8 
								
							 
						 
						
							
							
								
								Builtin types are subsitutable if they are qualified. Fixes PR5196.  
							
							 
							
							... 
							
							
							
							llvm-svn: 84237 
							
						 
						
							2009-10-16 02:06:06 +00:00  
						
					 
				
					
						
							
							
								 
								John McCall
							
						 
						
							 
							
							
							
							
								
							
							
								c5b8225285 
								
							 
						 
						
							
							
								
								Remove the ConstantArrayType subtypes.  This information is preserved in the  
							
							 
							
							... 
							
							
							
							TypeLoc records for declarations;  it should not be necessary to represent it
directly in the type system.
Please complain if you were using these classes and feel you can't replicate
previous functionality using the TypeLoc API.
llvm-svn: 84222 
							
						 
						
							2009-10-16 00:14:28 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								8bccbfdafe 
								
							 
						 
						
							
							
								
								Refine non-virtual part of the this adjustment for thunks.  Refine  
							
							 
							
							... 
							
							
							
							non-virtual part of the return result adjustments for covariant
thunks.  WIP.
llvm-svn: 84178 
							
						 
						
							2009-10-15 09:30:16 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								37dbe96a06 
								
							 
						 
						
							
							
								
								Track the offset to the current virtual base in CurrentVBaseOffset.  
							
							 
							
							... 
							
							
							
							Track path information completely to ensure we get all the overrides.  WIP.
llvm-svn: 84166 
							
						 
						
							2009-10-15 02:04:03 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								66413c29d3 
								
							 
						 
						
							
							
								
								Handle  
							
							 
							
							... 
							
							
							
							struct A { };
struct B : A { };
void f() {
  const A& a = B();
}
correctly. (This now does the offset conversion if necessary and calls the destructor when a goes out of scope).
llvm-svn: 84162 
							
						 
						
							2009-10-15 00:51:46 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								819c3ddda8 
								
							 
						 
						
							
							
								
								Fix a thinko that John pointed out  
							
							 
							
							... 
							
							
							
							llvm-svn: 84142 
							
						 
						
							2009-10-14 21:36:34 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								3cc3cdeea9 
								
							 
						 
						
							
							
								
								Give explicit and implicit instantiations of static data members of  
							
							 
							
							... 
							
							
							
							class templates the proper linkage. 
Daniel, please look over the CodeGenModule bits.
llvm-svn: 84140 
							
						 
						
							2009-10-14 21:29:40 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								b21c4eede4 
								
							 
						 
						
							
							
								
								Shift the vcall slots for non-virtual bases of a virtual base, up into  
							
							 
							
							... 
							
							
							
							the virtual base so they can be reused properly.  Don't reuse vcall
slots across a virtual boundary.  WIP.  I have a testcase, but there
are still things that need to be fixed before the testcase can go in.
llvm-svn: 84120 
							
						 
						
							2009-10-14 18:14:51 +00:00  
						
					 
				
					
						
							
							
								 
								Devang Patel
							
						 
						
							 
							
							
							
							
								
							
							
								f33cfaf760 
								
							 
						 
						
							
							
								
								Copy metadata associated with CI  
							
							 
							
							... 
							
							
							
							llvm-svn: 84114 
							
						 
						
							2009-10-14 17:03:29 +00:00  
						
					 
				
					
						
							
							
								 
								Duncan Sands
							
						 
						
							 
							
							
							
							
								
							
							
								cef56992b0 
								
							 
						 
						
							
							
								
								There is now only one version of eh.selector and eh.typeid.for.  
							
							 
							
							... 
							
							
							
							Fix the clang build.
llvm-svn: 84107 
							
						 
						
							2009-10-14 16:13:30 +00:00  
						
					 
				
					
						
							
							
								 
								Sanjiv Gupta
							
						 
						
							 
							
							
							
							
								
							
							
								84a0287497 
								
							 
						 
						
							
							
								
								Few targets like PIC16 mangle the names of global variables, so retrieve the name  
							
							 
							
							... 
							
							
							
							from Var itself rather than the decl for DebugInfo metadata.
llvm-svn: 84102 
							
						 
						
							2009-10-14 15:08:34 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								4f8a2e22c0 
								
							 
						 
						
							
							
								
								fix some cfstring related issues:  
							
							 
							
							... 
							
							
							
							1) -fwritable-string does affect the non-utf16 version of cfstrings
   just not the utf16 ones.
2) utf16 strings should always be marked constant, as the __TEXT segment
   is readonly.
3) The name of the global doesn't matter, remove it from TargetInfo.
4) Trust the asmprinter to drop cstrings into the right section, like llvmgcc does now.
This fixes rdar://7115750
llvm-svn: 84077 
							
						 
						
							2009-10-14 05:55:45 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								734351d214 
								
							 
						 
						
							
							
								
								unbreak test/CodeGen/builtins.c, reverting Devang's change.  
							
							 
							
							... 
							
							
							
							llvm-svn: 84075 
							
						 
						
							2009-10-14 05:49:21 +00:00  
						
					 
				
					
						
							
							
								 
								Devang Patel
							
						 
						
							 
							
							
							
							
								
							
							
								3b3f0f6b65 
								
							 
						 
						
							
							
								
								Check void type before using replaceAllUsesWith().  
							
							 
							
							... 
							
							
							
							llvm-svn: 84050 
							
						 
						
							2009-10-13 22:59:11 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								284312176a 
								
							 
						 
						
							
							
								
								Refine handling for non-virtual bases in return value adjustments for  
							
							 
							
							... 
							
							
							
							covariant thunks.  WIP.
llvm-svn: 84046 
							
						 
						
							2009-10-13 22:54:56 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								a2f9bd5339 
								
							 
						 
						
							
							
								
								fix test/CodeGen/statements.c on 32-bit hosts.  
							
							 
							
							... 
							
							
							
							llvm-svn: 84039 
							
						 
						
							2009-10-13 22:12:09 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								7373095ebf 
								
							 
						 
						
							
							
								
								Ensure we sign extend.  
							
							 
							
							... 
							
							
							
							llvm-svn: 84031 
							
						 
						
							2009-10-13 21:31:09 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								6bfee8f3e3 
								
							 
						 
						
							
							
								
								Don't assume that the LHS and RHS of a member pointer expression is a DeclRefExpr. Fixes PR5177.  
							
							 
							
							... 
							
							
							
							llvm-svn: 83986 
							
						 
						
							2009-10-13 17:41:28 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								ad47e7ea81 
								
							 
						 
						
							
							
								
								Remove FIXME.  We construct VBIndex very early, before any calls to OverrideMethod.  
							
							 
							
							... 
							
							
							
							llvm-svn: 83981 
							
						 
						
							2009-10-13 17:23:44 +00:00  
						
					 
				
					
						
							
							
								 
								Devang Patel
							
						 
						
							 
							
							
							
							
								
							
							
								9f73552852 
								
							 
						 
						
							
							
								
								Remove extra white space line.  
							
							 
							
							... 
							
							
							
							llvm-svn: 83979 
							
						 
						
							2009-10-13 17:02:38 +00:00  
						
					 
				
					
						
							
							
								 
								Devang Patel
							
						 
						
							 
							
							
							
							
								
							
							
								7468489deb 
								
							 
						 
						
							
							
								
								Do not check use_empty() before invoking replaceAllUsesWith().  
							
							 
							
							... 
							
							
							
							Let replaceAllUsesWith() adjust VHs even though there are no uses.
llvm-svn: 83978 
							
						 
						
							2009-10-13 17:02:04 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								87876a0053 
								
							 
						 
						
							
							
								
								Refine handling for return value conversions with respect to virtual  
							
							 
							
							... 
							
							
							
							offsets for covariant thunks.
llvm-svn: 83965 
							
						 
						
							2009-10-13 10:55:21 +00:00  
						
					 
				
					
						
							
							
								 
								Benjamin Kramer
							
						 
						
							 
							
							
							
							
								
							
							
								abd5b90e4c 
								
							 
						 
						
							
							
								
								Simplify pointer creation with the new Type::getInt*Ptr methods.  
							
							 
							
							... 
							
							
							
							llvm-svn: 83964 
							
						 
						
							2009-10-13 10:07:13 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								3eb172a02b 
								
							 
						 
						
							
							
								
								Teach sema and codegen about the difference between address of labels,  
							
							 
							
							... 
							
							
							
							which is a common idiom to improve PIC'ness of code using the addr of
label extension.  This implementation is a gross hack, but the only other
alternative would be to teach evalutate about this horrid combination.
While GCC allows things like "&&foo - &&bar + 1", people don't use this
in practice.  This implements PR5131.
llvm-svn: 83957 
							
						 
						
							2009-10-13 07:14:16 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								2bb5cb490c 
								
							 
						 
						
							
							
								
								reimplement codegen for indirect goto with the following advantages:  
							
							 
							
							... 
							
							
							
							1. CGF now has fewer bytes of state (one pointer instead of a vector).
2. The generated code is determinstic, instead of getting labels in
   'map order' based on pointer addresses.
3. Clang now emits one 'indirect goto switch' for each function, instead
   of one for each indirect goto.  This fixes an M*N = N^2 IR size issue
   when there are lots of address-taken labels and lots of indirect gotos.
4. This also makes the default cause do something useful, reducing the
   size of the jump table needed (by one).
llvm-svn: 83952 
							
						 
						
							2009-10-13 06:55:33 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								92ae16b0ae 
								
							 
						 
						
							
							
								
								number address-taken labels from 1.  This allows 0 to be used as a sentinel  
							
							 
							
							... 
							
							
							
							for a null pointer.  In other words, "&&foo != NULL" will always work out to
true.
llvm-svn: 83948 
							
						 
						
							2009-10-13 06:04:29 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								dd7eaad7d4 
								
							 
						 
						
							
							
								
								Use the new Type::getInt8PtrTy method.  This should probably be used in a lot  
							
							 
							
							... 
							
							
							
							more places in clang codegen now.
llvm-svn: 83947 
							
						 
						
							2009-10-13 06:02:42 +00:00  
						
					 
				
					
						
							
							
								 
								Devang Patel
							
						 
						
							 
							
							
							
							
								
							
							
								5b294f4330 
								
							 
						 
						
							
							
								
								Enable "debug info attached to an instruction" mode.  
							
							 
							
							... 
							
							
							
							llvm-svn: 83928 
							
						 
						
							2009-10-12 23:31:25 +00:00  
						
					 
				
					
						
							
							
								 
								Devang Patel
							
						 
						
							 
							
							
							
							
								
							
							
								dac79decf3 
								
							 
						 
						
							
							
								
								There is no need to attach debug location info with alloca instruction.  
							
							 
							
							... 
							
							
							
							llvm-svn: 83913 
							
						 
						
							2009-10-12 22:29:02 +00:00  
						
					 
				
					
						
							
							
								 
								Devang Patel
							
						 
						
							 
							
							
							
							
								
							
							
								551e112e99 
								
							 
						 
						
							
							
								
								Encode long double.  
							
							 
							
							... 
							
							
							
							llvm-svn: 83912 
							
						 
						
							2009-10-12 22:28:31 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								1d116976b4 
								
							 
						 
						
							
							
								
								Store the key function of a record decl inside CGRecordLayout.  
							
							 
							
							... 
							
							
							
							llvm-svn: 83900 
							
						 
						
							2009-10-12 21:16:22 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								a1b54fdbe1 
								
							 
						 
						
							
							
								
								Even more devirtualization cleverness.  
							
							 
							
							... 
							
							
							
							llvm-svn: 83886 
							
						 
						
							2009-10-12 19:59:15 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								2a01709204 
								
							 
						 
						
							
							
								
								More devirtualization improvements.  
							
							 
							
							... 
							
							
							
							llvm-svn: 83883 
							
						 
						
							2009-10-12 19:51:33 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								b61301f353 
								
							 
						 
						
							
							
								
								Devirtualize calls on temporaries. A().f() for example.  
							
							 
							
							... 
							
							
							
							llvm-svn: 83882 
							
						 
						
							2009-10-12 19:45:47 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								d7432dfb0a 
								
							 
						 
						
							
							
								
								Factor out devirtualization checking into a separate function and make it handle references correctly.  
							
							 
							
							... 
							
							
							
							llvm-svn: 83880 
							
						 
						
							2009-10-12 19:41:04 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								b5296558f1 
								
							 
						 
						
							
							
								
								If the base type of a member call is a record type we don't need to emit a virtual call.  
							
							 
							
							... 
							
							
							
							llvm-svn: 83816 
							
						 
						
							2009-10-11 23:55:52 +00:00  
						
					 
				
					
						
							
							
								 
								Benjamin Kramer
							
						 
						
							 
							
							
							
							
								
							
							
								bb0a07bf92 
								
							 
						 
						
							
							
								
								Remove dead variable.  
							
							 
							
							... 
							
							
							
							llvm-svn: 83808 
							
						 
						
							2009-10-11 22:57:54 +00:00  
						
					 
				
					
						
							
							
								 
								Benjamin Kramer
							
						 
						
							 
							
							
							
							
								
							
							
								2e8301dd62 
								
							 
						 
						
							
							
								
								Add CGVtable.cpp to CMakeLists.  
							
							 
							
							... 
							
							
							
							llvm-svn: 83800 
							
						 
						
							2009-10-11 22:22:38 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								2bb27f53e0 
								
							 
						 
						
							
							
								
								Move the vtable builder to CGVtable.cpp, general cleanup.  
							
							 
							
							... 
							
							
							
							llvm-svn: 83798 
							
						 
						
							2009-10-11 22:13:54 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								2295f31810 
								
							 
						 
						
							
							
								
								Change mangleCXXVtable and mangleCXXRtti to take CXXRecordDecls instead of QualTypes.  
							
							 
							
							... 
							
							
							
							llvm-svn: 83793 
							
						 
						
							2009-10-11 21:24:51 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								6ce51fdf43 
								
							 
						 
						
							
							
								
								Move our (non-existing) RTTI emission code into CGRtti.cpp. No functionality change.  
							
							 
							
							... 
							
							
							
							llvm-svn: 83732 
							
						 
						
							2009-10-10 20:49:04 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								07ca72725a 
								
							 
						 
						
							
							
								
								Generate weak read barriers when reading a weak __block  
							
							 
							
							... 
							
							
							
							variable inside the block.
llvm-svn: 83729 
							
						 
						
							2009-10-10 20:07:56 +00:00  
						
					 
				
					
						
							
							
								 
								Devang Patel
							
						 
						
							 
							
							
							
							
								
							
							
								3028a43f57 
								
							 
						 
						
							
							
								
								Revert 83567.  
							
							 
							
							... 
							
							
							
							llvm-svn: 83676 
							
						 
						
							2009-10-09 22:06:15 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								fc8ff639cb 
								
							 
						 
						
							
							
								
								Allow customization for the producer information in the debug output.  
							
							 
							
							... 
							
							
							
							llvm-svn: 83659 
							
						 
						
							2009-10-09 18:38:12 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								0d479e6653 
								
							 
						 
						
							
							
								
								Avoid warning.  
							
							 
							
							... 
							
							
							
							llvm-svn: 83609 
							
						 
						
							2009-10-09 01:25:47 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								01249503fe 
								
							 
						 
						
							
							
								
								Installation of Clang libraries and headers, from Axel Naumann!  
							
							 
							
							... 
							
							
							
							llvm-svn: 83582 
							
						 
						
							2009-10-08 22:15:31 +00:00  
						
					 
				
					
						
							
							
								 
								Devang Patel
							
						 
						
							 
							
							
							
							
								
							
							
								abf71fa9fc 
								
							 
						 
						
							
							
								
								Record location info before emiting alloca for arguments. This allows arguments to have proper location info.  
							
							 
							
							... 
							
							
							
							llvm-svn: 83567 
							
						 
						
							2009-10-08 18:53:37 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								a18ed9b113 
								
							 
						 
						
							
							
								
								If a global initializer has a non-trivial constructor or destructor, we never want to defer generation of it, even if it is declared static.  
							
							 
							
							... 
							
							
							
							With this change we're finally able to compile and run the (infamous)
#include <string>
#include <iostream>
int main(int argc, char **argv) {
  std::cout << "Hello, World" << std::endl;
}
$ clang hello.cpp -lstdc++ -o hello
$ ./hello 
Hello, World
llvm-svn: 83559 
							
						 
						
							2009-10-08 17:28:59 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								3482b819db 
								
							 
						 
						
							
							
								
								Mangle std::basic_ostream<char, std::char_traits<char>> as So.  
							
							 
							
							... 
							
							
							
							llvm-svn: 83557 
							
						 
						
							2009-10-08 17:20:26 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								1e39bd944b 
								
							 
						 
						
							
							
								
								Mangle anonymous structs/unions correctly. Fixes PR5139.  
							
							 
							
							... 
							
							
							
							llvm-svn: 83448 
							
						 
						
							2009-10-07 01:45:02 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								ff971e8bf4 
								
							 
						 
						
							
							
								
								Add a MangleContext and pass it to all mangle functions. It will be used for keeping state, such as identifiers assigned to anonymous structs as well as scope encoding.  
							
							 
							
							... 
							
							
							
							llvm-svn: 83442 
							
						 
						
							2009-10-07 01:06:45 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								b703fd2216 
								
							 
						 
						
							
							
								
								Uncomment some commented out code.  
							
							 
							
							... 
							
							
							
							llvm-svn: 83428 
							
						 
						
							2009-10-06 23:02:00 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								c6d171ec77 
								
							 
						 
						
							
							
								
								Change GetAddressCXXOfBaseClass to use CXXBasePaths for calculating base class offsets. Fix the code to handle virtual bases as well.  
							
							 
							
							... 
							
							
							
							llvm-svn: 83426 
							
						 
						
							2009-10-06 22:43:30 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								11d00cf972 
								
							 
						 
						
							
							
								
								When mangling names, always use the canonical decl. Fixes PR5144.  
							
							 
							
							... 
							
							
							
							llvm-svn: 83420 
							
						 
						
							2009-10-06 21:58:01 +00:00  
						
					 
				
					
						
							
							
								 
								Devang Patel
							
						 
						
							 
							
							
							
							
								
							
							
								542ab5f551 
								
							 
						 
						
							
							
								
								InsertSubprogramStart if ATTACH_DEBUG_INFO_TO_AN_INSN is not defined.  
							
							 
							
							... 
							
							
							
							llvm-svn: 83419 
							
						 
						
							2009-10-06 21:53:41 +00:00  
						
					 
				
					
						
							
							
								 
								Devang Patel
							
						 
						
							 
							
							
							
							
								
							
							
								5d90d62701 
								
							 
						 
						
							
							
								
								Add support to attach debug info to an instruction.  
							
							 
							
							... 
							
							
							
							This is not yet enabled.
llvm-svn: 83399 
							
						 
						
							2009-10-06 18:36:08 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								6b7378bbe1 
								
							 
						 
						
							
							
								
								Emit the destructor epilogue in a cleanup block so a return from a destructor body still calls the epilogue.  
							
							 
							
							... 
							
							
							
							llvm-svn: 83397 
							
						 
						
							2009-10-06 18:09:57 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								80ef6f1a46 
								
							 
						 
						
							
							
								
								Pass the right type to GetAddrOfFunction when getting functions for the VTable. Fixes PR5021.  
							
							 
							
							... 
							
							
							
							llvm-svn: 83395 
							
						 
						
							2009-10-06 17:54:23 +00:00  
						
					 
				
					
						
							
							
								 
								Devang Patel
							
						 
						
							 
							
							
							
							
								
							
							
								faf7e9ad24 
								
							 
						 
						
							
							
								
								Set appropriate context for a global variable while emitting debug info.  
							
							 
							
							... 
							
							
							
							llvm-svn: 83352 
							
						 
						
							2009-10-06 00:35:31 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								916c006735 
								
							 
						 
						
							
							
								
								Fix thinko and simplify.  
							
							 
							
							... 
							
							
							
							llvm-svn: 83342 
							
						 
						
							2009-10-05 23:08:21 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								3472ae5bac 
								
							 
						 
						
							
							
								
								Ensure we have atleast 2-byte alignment for member functions.  
							
							 
							
							... 
							
							
							
							llvm-svn: 83337 
							
						 
						
							2009-10-05 22:49:20 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								c5e153c50e 
								
							 
						 
						
							
							
								
								Respect alignments better.  
							
							 
							
							... 
							
							
							
							llvm-svn: 83328 
							
						 
						
							2009-10-05 21:58:44 +00:00  
						
					 
				
					
						
							
							
								 
								Benjamin Kramer
							
						 
						
							 
							
							
							
							
								
							
							
								dde0fee82e 
								
							 
						 
						
							
							
								
								Use new predicates for some type equality tests.  
							
							 
							
							... 
							
							
							
							llvm-svn: 83303 
							
						 
						
							2009-10-05 13:47:21 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								d5931cd2b7 
								
							 
						 
						
							
							
								
								Pass the canonical method decl to GetVtableIndex. Fixes PR5120.  
							
							 
							
							... 
							
							
							
							llvm-svn: 83272 
							
						 
						
							2009-10-03 19:56:56 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								2ee3c011d9 
								
							 
						 
						
							
							
								
								Implement code generation of member function pointer calls. Fixes PR5121.  
							
							 
							
							... 
							
							
							
							llvm-svn: 83271 
							
						 
						
							2009-10-03 19:43:08 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								c46bf276e1 
								
							 
						 
						
							
							
								
								Teach AggExprEmitter about pointers to member functions.  
							
							 
							
							... 
							
							
							
							llvm-svn: 83266 
							
						 
						
							2009-10-03 15:43:24 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								3162e4945a 
								
							 
						 
						
							
							
								
								Handle base-to-derived casts of member function pointers in CGExprConstant.cpp  
							
							 
							
							... 
							
							
							
							llvm-svn: 83265 
							
						 
						
							2009-10-03 15:13:22 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								128a5d5147 
								
							 
						 
						
							
							
								
								Handle members to function pointers in CGExprConstant.  
							
							 
							
							... 
							
							
							
							llvm-svn: 83264 
							
						 
						
							2009-10-03 15:02:02 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								32bfb1ce8f 
								
							 
						 
						
							
							
								
								Move some functions from CodeGenFunctions to CodeGenModule so they can be used by CGExprConstant.  
							
							 
							
							... 
							
							
							
							llvm-svn: 83263 
							
						 
						
							2009-10-03 14:56:57 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								8a744ad8a6 
								
							 
						 
						
							
							
								
								Don't update the struct alignment when adding fields to a packed struct. Fixes PR5118.  
							
							 
							
							... 
							
							
							
							llvm-svn: 83235 
							
						 
						
							2009-10-02 04:52:12 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								581b9ad124 
								
							 
						 
						
							
							
								
								More magic pixie dust.  
							
							 
							
							... 
							
							
							
							llvm-svn: 83232 
							
						 
						
							2009-10-02 02:30:50 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								440af3d903 
								
							 
						 
						
							
							
								
								Fix up debug information for block pointers a bit more.  
							
							 
							
							... 
							
							
							
							llvm-svn: 83231 
							
						 
						
							2009-10-02 02:23:37 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								39e3eb12ae 
								
							 
						 
						
							
							
								
								When building constant structs, check if the resulting LLVM struct will be bigger than the record layout size and use a packed struct if that's the case. Fixes PR5108.  
							
							 
							
							... 
							
							
							
							llvm-svn: 83230 
							
						 
						
							2009-10-02 02:15:20 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								017460ab6c 
								
							 
						 
						
							
							
								
								Implement a FIXME.  This improves codegen just a tad.  
							
							 
							
							... 
							
							
							
							llvm-svn: 83221 
							
						 
						
							2009-10-01 22:29:41 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								369acf9304 
								
							 
						 
						
							
							
								
								CodeGen may see out-of-line declarations of the various special member  
							
							 
							
							... 
							
							
							
							functions when they are explicitly declared, e.g., via a function
template specialization or explicit template instantiation
declaration. Don't try to synthesize bodies for the special member
functions in this case; rather, check whether we have an implicit
declaration and, if so, synthesize the appropriate function
body. Fixes PR5084.
llvm-svn: 83212 
							
						 
						
							2009-10-01 20:44:19 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								e364e7bc2b 
								
							 
						 
						
							
							
								
								Fix a lame regression in IR gen for C++ delete expressions. PR5102  
							
							 
							
							... 
							
							
							
							llvm-svn: 83195 
							
						 
						
							2009-10-01 05:49:51 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								7d69911a1f 
								
							 
						 
						
							
							
								
								A couple of refinements for laying out debug information for  
							
							 
							
							... 
							
							
							
							BlockDeclRefDecls.
llvm-svn: 83185 
							
						 
						
							2009-10-01 00:27:30 +00:00  
						
					 
				
					
						
							
							
								 
								John McCall
							
						 
						
							 
							
							
							
							
								
							
							
								4fa5342758 
								
							 
						 
						
							
							
								
								Anonymous namespaces, sema + codegen.  A lot of semantics are still broken,  
							
							 
							
							... 
							
							
							
							apparently because using directives aren't quite working correctly.
llvm-svn: 83184 
							
						 
						
							2009-10-01 00:25:31 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								e01e434aef 
								
							 
						 
						
							
							
								
								<rdar://problem/7263113> Make clang produce gcc's objc_assign_StrongCast as a result of type-cast of an ivar in assignment.  
							
							 
							
							... 
							
							
							
							llvm-svn: 83150 
							
						 
						
							2009-09-30 17:10:29 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								2e722b915c 
								
							 
						 
						
							
							
								
								Improve debugging information for BlockDeclRefExpr.  WIP.  Given this  
							
							 
							
							... 
							
							
							
							scheme, we can switch the previous scheme over to using this code
path.  There's a bit of simplifications yet to do as well.
llvm-svn: 83138 
							
						 
						
							2009-09-30 02:43:10 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								bb3e12fc0b 
								
							 
						 
						
							
							
								
								Handle C++ delete expressions when the overloaded delete operator is a  
							
							 
							
							... 
							
							
							
							"usual deallocation function" with two arguments. CodeGen will have to
handle this case specifically, since the value for the second argument
(the size of the allocated object) may have to be computed at run
time.
Fixes the Sema part of PR4782.
llvm-svn: 83080 
							
						 
						
							2009-09-29 18:16:17 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								8f4fd60c47 
								
							 
						 
						
							
							
								
								Handle CXXMemberCallExprs that point to a static method. Fixes PR5093.  
							
							 
							
							... 
							
							
							
							llvm-svn: 83045 
							
						 
						
							2009-09-29 03:54:11 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								9150a2a8c0 
								
							 
						 
						
							
							
								
								Handle CK_BaseToDerivedMemberPointer for member function pointers. Fixes PR5091.  
							
							 
							
							... 
							
							
							
							llvm-svn: 83041 
							
						 
						
							2009-09-29 03:13:20 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								b05a3e551b 
								
							 
						 
						
							
							
								
								Improve support for member function pointers.  
							
							 
							
							... 
							
							
							
							llvm-svn: 83039 
							
						 
						
							2009-09-29 02:09:01 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								1fb7ae9e3c 
								
							 
						 
						
							
							
								
								Use a switch statement in VisitCastExpr.  
							
							 
							
							... 
							
							
							
							llvm-svn: 83038 
							
						 
						
							2009-09-29 01:23:39 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								d30d820dc4 
								
							 
						 
						
							
							
								
								Make hasAggregateLLVMType use positive checks.  
							
							 
							
							... 
							
							
							
							llvm-svn: 83037 
							
						 
						
							2009-09-29 01:15:29 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								e7a2b48572 
								
							 
						 
						
							
							
								
								Fix  http://llvm.org/PR5090 .  
							
							 
							
							... 
							
							
							
							llvm-svn: 83035 
							
						 
						
							2009-09-29 00:50:50 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								02bca738b4 
								
							 
						 
						
							
							
								
								Mangle dependent name expressions. Fixes PR5063.  
							
							 
							
							... 
							
							
							
							llvm-svn: 82915 
							
						 
						
							2009-09-27 20:11:34 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								d122de5f32 
								
							 
						 
						
							
							
								
								Use mangleTemplatePrefix when we know that we're mangling a nested template name.  
							
							 
							
							... 
							
							
							
							llvm-svn: 82912 
							
						 
						
							2009-09-27 19:53:49 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								52d78a518a 
								
							 
						 
						
							
							
								
								CodeGen for try statements. (We just emit the body for now).  
							
							 
							
							... 
							
							
							
							llvm-svn: 82910 
							
						 
						
							2009-09-27 18:58:34 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								9bf787ad1f 
								
							 
						 
						
							
							
								
								Look for substitutions when mangling TypenameTypes.  
							
							 
							
							... 
							
							
							
							llvm-svn: 82885 
							
						 
						
							2009-09-27 01:06:07 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								e00745b285 
								
							 
						 
						
							
							
								
								Better template parameter type mangling.  
							
							 
							
							... 
							
							
							
							llvm-svn: 82883 
							
						 
						
							2009-09-27 00:38:53 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								2e5935241a 
								
							 
						 
						
							
							
								
								Mangle std::basic_string<char, std::char_traits<char>, std::allocator<char> > as Ss.  
							
							 
							
							... 
							
							
							
							llvm-svn: 82882 
							
						 
						
							2009-09-27 00:12:57 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								853bb50382 
								
							 
						 
						
							
							
								
								Mangle ::std::basic_string as Sb.  
							
							 
							
							... 
							
							
							
							llvm-svn: 82881 
							
						 
						
							2009-09-26 23:14:39 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								872ce0dc31 
								
							 
						 
						
							
							
								
								Mangle ::std::allocator as Sa.  
							
							 
							
							... 
							
							
							
							llvm-svn: 82880 
							
						 
						
							2009-09-26 23:10:05 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								3e83c30c4c 
								
							 
						 
						
							
							
								
								Handle substitutions in mangleTemplatePrefix.  
							
							 
							
							... 
							
							
							
							llvm-svn: 82879 
							
						 
						
							2009-09-26 22:18:22 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								aa9e3c8793 
								
							 
						 
						
							
							
								
								Substitute "::std::" as "St".  
							
							 
							
							... 
							
							
							
							llvm-svn: 82874 
							
						 
						
							2009-09-26 20:53:44 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								49232b9f42 
								
							 
						 
						
							
							
								
								Don't crash when trying to mangle function templates.  
							
							 
							
							... 
							
							
							
							llvm-svn: 82872 
							
						 
						
							2009-09-26 20:13:56 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								26e67afd1e 
								
							 
						 
						
							
							
								
								mangleTemplatePrefix and mangleUnscopedTemplateName should take a TemplateDecl.  
							
							 
							
							... 
							
							
							
							llvm-svn: 82871 
							
						 
						
							2009-09-26 19:45:45 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								677475206c 
								
							 
						 
						
							
							
								
								Use the qualified name for tag types.  
							
							 
							
							... 
							
							
							
							llvm-svn: 82870 
							
						 
						
							2009-09-26 19:03:24 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								e33eed5c1e 
								
							 
						 
						
							
							
								
								Set alignment on static function level decls and VLAs. Fixes PR5060.  
							
							 
							
							... 
							
							
							
							llvm-svn: 82868 
							
						 
						
							2009-09-26 18:16:06 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								0374742326 
								
							 
						 
						
							
							
								
								Use ABIArgInfo::getDirect() for all types that have a pointer representation.  
							
							 
							
							... 
							
							
							
							llvm-svn: 82845 
							
						 
						
							2009-09-26 03:56:53 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								296f8dc52f 
								
							 
						 
						
							
							
								
								Mangle record types as decls.  
							
							 
							
							... 
							
							
							
							llvm-svn: 82843 
							
						 
						
							2009-09-26 03:55:37 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								9f8e3d1929 
								
							 
						 
						
							
							
								
								Change isTemplate to return the actual template declaration.  
							
							 
							
							... 
							
							
							
							llvm-svn: 82839 
							
						 
						
							2009-09-26 03:24:57 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								bdaaab4671 
								
							 
						 
						
							
							
								
								Improve mangling of typename types.  
							
							 
							
							... 
							
							
							
							llvm-svn: 82833 
							
						 
						
							2009-09-26 02:26:02 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								1dbb8f78a3 
								
							 
						 
						
							
							
								
								Fix 80-col violation.  
							
							 
							
							... 
							
							
							
							llvm-svn: 82782 
							
						 
						
							2009-09-25 18:11:00 +00:00  
						
					 
				
					
						
							
							
								 
								John McCall
							
						 
						
							 
							
							
							
							
								
							
							
								0cf155174e 
								
							 
						 
						
							
							
								
								Fix an infinite loop arising when trying to generate debug information  
							
							 
							
							... 
							
							
							
							for a ObjC class with an ivar of weak self type.
llvm-svn: 82745 
							
						 
						
							2009-09-25 01:40:47 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								1f9ed58277 
								
							 
						 
						
							
							
								
								Fixed another code gen bug in objc's new write-barrier API.  
							
							 
							
							... 
							
							
							
							llvm-svn: 82735 
							
						 
						
							2009-09-25 00:00:20 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								d2a3e61798 
								
							 
						 
						
							
							
								
								Fix 80-col violation.  
							
							 
							
							... 
							
							
							
							llvm-svn: 82725 
							
						 
						
							2009-09-24 22:31:14 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								7a95d72b10 
								
							 
						 
						
							
							
								
								Patch fixes a code gen. bug in generation of objc_assign_ivar  
							
							 
							
							... 
							
							
							
							(objc GC's API).
llvm-svn: 82724 
							
						 
						
							2009-09-24 22:25:38 +00:00  
						
					 
				
					
						
							
							
								 
								John McCall
							
						 
						
							 
							
							
							
							
								
							
							
								8ccfcb51ee 
								
							 
						 
						
							
							
								
								Refactor the representation of qualifiers to bring ExtQualType out of the  
							
							 
							
							... 
							
							
							
							Type hierarchy.  Demote 'volatile' to extended-qualifier status.  Audit our
use of qualifiers and fix a few places that weren't dealing with qualifiers
quite right;  many more remain.
llvm-svn: 82705 
							
						 
						
							2009-09-24 19:53:00 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								b3b1e53d33 
								
							 
						 
						
							
							
								
								Darwin/x86-32: Enumerated types and block pointer types in structures were not  
							
							 
							
							... 
							
							
							
							handled correctly.
 - <rdar://problem/7247671> Function arguments incorrect when function returns a
   struct on i386 w/ llvm-g++ and clang
llvm-svn: 82681 
							
						 
						
							2009-09-24 05:12:36 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								649a17e861 
								
							 
						 
						
							
							
								
								Handle namespace aliases.  
							
							 
							
							... 
							
							
							
							llvm-svn: 82644 
							
						 
						
							2009-09-23 19:19:16 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								f771681e63 
								
							 
						 
						
							
							
								
								Emit new[] cookie when needed.  
							
							 
							
							... 
							
							
							
							llvm-svn: 82642 
							
						 
						
							2009-09-23 18:59:48 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								b4bd0666d2 
								
							 
						 
						
							
							
								
								Basic support for new[].  
							
							 
							
							... 
							
							
							
							llvm-svn: 82628 
							
						 
						
							2009-09-23 16:07:23 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								d49844b715 
								
							 
						 
						
							
							
								
								Add a new variant of EmitCXXAggrConstructorCall that takes a Value that holds the number of elements to construct, to be used when implementing new[].  
							
							 
							
							... 
							
							
							
							llvm-svn: 82602 
							
						 
						
							2009-09-23 02:45:36 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								cc52f65500 
								
							 
						 
						
							
							
								
								Move codegen of new and delete to CGCXXExpr.cpp  
							
							 
							
							... 
							
							
							
							llvm-svn: 82585 
							
						 
						
							2009-09-22 22:53:17 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								17abe2a620 
								
							 
						 
						
							
							
								
								Remove now fixed FIXME.  
							
							 
							
							... 
							
							
							
							llvm-svn: 82584 
							
						 
						
							2009-09-22 22:31:44 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								8c978b4fc2 
								
							 
						 
						
							
							
								
								No need to null check implicit lvalue cast exprs.  
							
							 
							
							... 
							
							
							
							llvm-svn: 82580 
							
						 
						
							2009-09-22 22:00:46 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								8fef09cd80 
								
							 
						 
						
							
							
								
								When doing a derived-to-base class and the class offset is 0 we can just do a simple bitcast.  
							
							 
							
							... 
							
							
							
							llvm-svn: 82579 
							
						 
						
							2009-09-22 21:58:22 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								1d3b6f62df 
								
							 
						 
						
							
							
								
								CXXMethodDecls should always be mangled, even if they are inside an extern "C" block. Fixes PR5017.  
							
							 
							
							... 
							
							
							
							llvm-svn: 82567 
							
						 
						
							2009-09-22 20:33:31 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								fc51cc968b 
								
							 
						 
						
							
							
								
								Don't assert that linkage decls are always C++, it's not true. Fixes PR5019.  
							
							 
							
							... 
							
							
							
							llvm-svn: 82557 
							
						 
						
							2009-09-22 17:23:30 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								b879c3c125 
								
							 
						 
						
							
							
								
								Revert "Switch a few clients over to StringLiteral::getString.", this is breaking some projects, but I don't have a test case yet.  
							
							 
							
							... 
							
							
							
							llvm-svn: 82539 
							
						 
						
							2009-09-22 10:03:52 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								5de27daf93 
								
							 
						 
						
							
							
								
								Switch a few clients over to StringLiteral::getString.  
							
							 
							
							... 
							
							
							
							- Switching all of them out-of-my-current-scope-of-interest, sorry.
llvm-svn: 82515 
							
						 
						
							2009-09-22 03:27:52 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								207c680ff3 
								
							 
						 
						
							
							
								
								Fix some typos.  WIP.  Large alignments don't work yet.  
							
							 
							
							... 
							
							
							
							llvm-svn: 82512 
							
						 
						
							2009-09-22 02:44:17 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								2114d7c299 
								
							 
						 
						
							
							
								
								Improve debug info generation for __block variables.  
							
							 
							
							... 
							
							
							
							llvm-svn: 82508 
							
						 
						
							2009-09-22 02:12:52 +00:00  
						
					 
				
					
						
							
							
								 
								John McCall
							
						 
						
							 
							
							
							
							
								
							
							
								9dd450bb78 
								
							 
						 
						
							
							
								
								Change all the Type::getAsFoo() methods to specializations of Type::getAs().  
							
							 
							
							... 
							
							
							
							Several of the existing methods were identical to their respective
specializations, and so have been removed entirely.  Several more 'leaf'
optimizations were introduced.
The getAsFoo() methods which imposed extra conditions, like
getAsObjCInterfacePointerType(), have been left in place.
llvm-svn: 82501 
							
						 
						
							2009-09-21 23:43:11 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								71848a3ff1 
								
							 
						 
						
							
							
								
								Removed -fobjc-newgc-api option. clang now conforms to  
							
							 
							
							... 
							
							
							
							gcc-style write-barrier api only.
llvm-svn: 82493 
							
						 
						
							2009-09-21 23:03:37 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								38c3ae9bc4 
								
							 
						 
						
							
							
								
								Miscellanous fixes in generatation of objc gc's write-barriers.  
							
							 
							
							... 
							
							
							
							llvm-svn: 82472 
							
						 
						
							2009-09-21 18:54:29 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								bf20638966 
								
							 
						 
						
							
							
								
								Implement __builtin_unreachable(), a GCC 4.5 extension.  
							
							 
							
							... 
							
							
							
							llvm-svn: 82433 
							
						 
						
							2009-09-21 03:09:59 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								a18322cea5 
								
							 
						 
						
							
							
								
								Start mangling expressions.  
							
							 
							
							... 
							
							
							
							llvm-svn: 82423 
							
						 
						
							2009-09-21 01:21:10 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								9996138a80 
								
							 
						 
						
							
							
								
								Ok, an AssertingVH definitely doesn't work for now because we free our cache after the optimizer may have hacked on the module. Use a WeakVH instead.  
							
							 
							
							... 
							
							
							
							llvm-svn: 82324 
							
						 
						
							2009-09-19 20:17:48 +00:00  
						
					 
				
					
						
							
							
								 
								Nick Lewycky
							
						 
						
							 
							
							
							
							
								
							
							
								41eaf0ac57 
								
							 
						 
						
							
							
								
								Make clang stop relying on ConstantStruct::get's default value for isPacked  
							
							 
							
							... 
							
							
							
							which will be going away (ie. it's becoming a required parameter) later today.
llvm-svn: 82323 
							
						 
						
							2009-09-19 20:00:52 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								1cbaae56cf 
								
							 
						 
						
							
							
								
								Switch CGDebugInfo type cache to using an AssertingVH.  
							
							 
							
							... 
							
							
							
							llvm-svn: 82321 
							
						 
						
							2009-09-19 19:27:24 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								de870bdcf2 
								
							 
						 
						
							
							
								
								Factor out CGDebugInfo::CreateTypeNode method.  
							
							 
							
							... 
							
							
							
							- No functionality change.
llvm-svn: 82320 
							
						 
						
							2009-09-19 19:27:14 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								82b688e423 
								
							 
						 
						
							
							
								
								More mangling work.  
							
							 
							
							... 
							
							
							
							llvm-svn: 82265 
							
						 
						
							2009-09-18 20:11:09 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								c3773bd669 
								
							 
						 
						
							
							
								
								Make the mangler conform even better to the grammar.  
							
							 
							
							... 
							
							
							
							llvm-svn: 82262 
							
						 
						
							2009-09-18 19:44:50 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								f9c95be2f6 
								
							 
						 
						
							
							
								
								Generate more of the vbase virtual offset for covariant thunks.  WIP.  
							
							 
							
							... 
							
							
							
							llvm-svn: 82253 
							
						 
						
							2009-09-18 19:06:35 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								559d9741a8 
								
							 
						 
						
							
							
								
								More mangler mangling.  
							
							 
							
							... 
							
							
							
							llvm-svn: 82250 
							
						 
						
							2009-09-18 19:00:18 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								caf4a646f8 
								
							 
						 
						
							
							
								
								Call mangleTemplatePrefix.  
							
							 
							
							... 
							
							
							
							llvm-svn: 82247 
							
						 
						
							2009-09-18 18:47:07 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								c1370cb49b 
								
							 
						 
						
							
							
								
								Change manglePrefix to return early if the DC is the translation unit.  
							
							 
							
							... 
							
							
							
							llvm-svn: 82246 
							
						 
						
							2009-09-18 18:39:58 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								2b5e1dda69 
								
							 
						 
						
							
							
								
								More mangling goodness.  
							
							 
							
							... 
							
							
							
							llvm-svn: 82193 
							
						 
						
							2009-09-18 04:29:09 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								7a8a74f704 
								
							 
						 
						
							
							
								
								Handle mangling of TemplateSpecializationType.  
							
							 
							
							... 
							
							
							
							llvm-svn: 82189 
							
						 
						
							2009-09-18 02:42:01 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								2e32ddc7ba 
								
							 
						 
						
							
							
								
								Fixed a bug in generation of the new write-barriers when  
							
							 
							
							... 
							
							
							
							array syntax is used to derefernce and assign to ivar pointee.
llvm-svn: 82183 
							
						 
						
							2009-09-18 00:04:00 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								ca51ef156b 
								
							 
						 
						
							
							
								
								Ignore extern "C++" { } when mangling.  
							
							 
							
							... 
							
							
							
							llvm-svn: 82146 
							
						 
						
							2009-09-17 16:12:20 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								f96da57adb 
								
							 
						 
						
							
							
								
								Revert r82123 for now.  
							
							 
							
							... 
							
							
							
							llvm-svn: 82125 
							
						 
						
							2009-09-17 05:31:47 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								49fe8b4f97 
								
							 
						 
						
							
							
								
								Treat an unqualified RecordType as a RecordDecl when substituting.  
							
							 
							
							... 
							
							
							
							llvm-svn: 82123 
							
						 
						
							2009-09-17 04:38:23 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								4245bf9e13 
								
							 
						 
						
							
							
								
								Substitution for prefixes.  
							
							 
							
							... 
							
							
							
							llvm-svn: 82122 
							
						 
						
							2009-09-17 04:16:28 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								a2fb9bcd19 
								
							 
						 
						
							
							
								
								Substitute unscoped template names.  
							
							 
							
							... 
							
							
							
							llvm-svn: 82119 
							
						 
						
							2009-09-17 04:02:31 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								df0e62d0a1 
								
							 
						 
						
							
							
								
								IRgen/ObjC: Correctly construct the function info for variadic message sends.  
							
							 
							
							... 
							
							
							
							This fixes some bad -O0 codegen and the unnecessary clearing of al on entry to objc_msgSend for most message sends.
<rdar://problem/7102824> [irgen] unnecessary xorb on calls to objc_msgSend on x86_64
llvm-svn: 82118 
							
						 
						
							2009-09-17 04:01:40 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								aff9fcaa02 
								
							 
						 
						
							
							
								
								IRgen/ObjC: Make the target method decl available to GenerateMessageSendSuper.  
							
							 
							
							... 
							
							
							
							llvm-svn: 82117 
							
						 
						
							2009-09-17 04:01:22 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								a96f56fba8 
								
							 
						 
						
							
							
								
								Add mangleSubstitution/addSubstitution variants that take a NamedDecl.  
							
							 
							
							... 
							
							
							
							llvm-svn: 82116 
							
						 
						
							2009-09-17 03:53:28 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								df644fb773 
								
							 
						 
						
							
							
								
								When mangling function template specialization, mangle the type encoding of the original function template. Also, port mangle.cpp and function-template-specialization.cpp over to using FileCheck.  
							
							 
							
							... 
							
							
							
							llvm-svn: 82114 
							
						 
						
							2009-09-17 03:46:43 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								98e00bb162 
								
							 
						 
						
							
							
								
								Add new functions to the mangler for the <unscoped-name> and <unscoped-template-name> productions.  
							
							 
							
							... 
							
							
							
							llvm-svn: 82113 
							
						 
						
							2009-09-17 03:17:01 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								feb60501a8 
								
							 
						 
						
							
							
								
								Add basic substitution to the C++ mangler. It currently only looks at types.  
							
							 
							
							... 
							
							
							
							llvm-svn: 82102 
							
						 
						
							2009-09-17 00:43:46 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								de1d324dce 
								
							 
						 
						
							
							
								
								patch for generating objc'2 objc_assign_ivar. WIP.  
							
							 
							
							... 
							
							
							
							llvm-svn: 82090 
							
						 
						
							2009-09-16 23:11:23 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								a7fa6beb2e 
								
							 
						 
						
							
							
								
								Starting patch to generate more specific API for objc's  
							
							 
							
							... 
							
							
							
							GC. Currently, new API will be generated under
clang-cc's -fobjc-newgc-api flag which will eventually
become the default. WIP.
llvm-svn: 82082 
							
						 
						
							2009-09-16 21:37:16 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								4141deb68e 
								
							 
						 
						
							
							
								
								Removed a superfluous check before setting  
							
							 
							
							... 
							
							
							
							a flag (objc GC).
llvm-svn: 82052 
							
						 
						
							2009-09-16 16:49:08 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								20759ad54c 
								
							 
						 
						
							
							
								
								x86-64 ABI: If a type is a C++ record with either a non-trivial destructor or a non-trivial copy constructor, it should be passed in a pointer. Daniel, plz review.  
							
							 
							
							... 
							
							
							
							llvm-svn: 82050 
							
						 
						
							2009-09-16 15:53:40 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								c3844bea75 
								
							 
						 
						
							
							
								
								Be sure to use the correct version instead of inventing the wrong one.  
							
							 
							
							... 
							
							
							
							llvm-svn: 81924 
							
						 
						
							2009-09-15 21:48:34 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								1450adbbf9 
								
							 
						 
						
							
							
								
								Code generation of Conditional operators that are lvalues (but that aren't bitfields).  
							
							 
							
							... 
							
							
							
							llvm-svn: 81867 
							
						 
						
							2009-09-15 16:35:24 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								7cd39e0721 
								
							 
						 
						
							
							
								
								Handle reinterpret_cast between integral types and pointer types.  
							
							 
							
							... 
							
							
							
							llvm-svn: 81837 
							
						 
						
							2009-09-15 04:48:33 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								04c3bf4fab 
								
							 
						 
						
							
							
								
								Codegen support for nullptr from C++0x.  
							
							 
							
							... 
							
							
							
							llvm-svn: 81835 
							
						 
						
							2009-09-15 04:39:46 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								09d3362bf5 
								
							 
						 
						
							
							
								
								ARM/[A]APCS: Ignore empty records passed as arguments.  
							
							 
							
							... 
							
							
							
							llvm-svn: 81798 
							
						 
						
							2009-09-14 21:54:03 +00:00  
						
					 
				
					
						
							
							
								 
								David Chisnall
							
						 
						
							 
							
							
							
							
								
							
							
								2997982ab4 
								
							 
						 
						
							
							
								
								Small fix to stop CGObjCGNU emitting symbols that break some versions of gas.  
							
							 
							
							... 
							
							
							
							llvm-svn: 81778 
							
						 
						
							2009-09-14 19:04:10 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								ddf57d3df9 
								
							 
						 
						
							
							
								
								Remove an unnecessary FunctionDecl parameter to the synthesizing functions.  
							
							 
							
							... 
							
							
							
							llvm-svn: 81759 
							
						 
						
							2009-09-14 05:32:02 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								ff0553ec61 
								
							 
						 
						
							
							
								
								Fix subtle bug in generating LLVM function declarations for builtin functions.  
							
							 
							
							... 
							
							
							
							The decl wasn't being passed down, which meant that function attributes were not
being set correctly. This is particularly important for ARM, since it wants to
override the calling convention. Instead we would emit the builtin with the
wrong calling convention, and instcombine would come along and merrily shred all
the calls to it. :)
llvm-svn: 81756 
							
						 
						
							2009-09-14 04:33:21 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								d53bac7fa4 
								
							 
						 
						
							
							
								
								ARM/APCS: Don't treat structs w/ floating point types as "integer like".  
							
							 
							
							... 
							
							
							
							llvm-svn: 81748 
							
						 
						
							2009-09-14 02:20:34 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								aedb46fe21 
								
							 
						 
						
							
							
								
								If a function call returns a reference, don't bind it to a temporary.  
							
							 
							
							... 
							
							
							
							llvm-svn: 81743 
							
						 
						
							2009-09-14 01:30:44 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								96bad9a5cd 
								
							 
						 
						
							
							
								
								Implement CodeGenFunction::EmitCXXExprWithTemporariesLValue.  
							
							 
							
							... 
							
							
							
							llvm-svn: 81738 
							
						 
						
							2009-09-14 01:10:45 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								1ce7251a0a 
								
							 
						 
						
							
							
								
								Some minor clang/ARM/AAPCS tweaks.  
							
							 
							
							... 
							
							
							
							llvm-svn: 81737 
							
						 
						
							2009-09-14 00:56:55 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								b4091a9c6a 
								
							 
						 
						
							
							
								
								Add TargetInfo::getABI(), and base ARM APCS vs AAPCS choice on that.  
							
							 
							
							... 
							
							
							
							llvm-svn: 81735 
							
						 
						
							2009-09-14 00:35:03 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								8783737029 
								
							 
						 
						
							
							
								
								Handle delete where the class has a virtual destructor.  
							
							 
							
							... 
							
							
							
							llvm-svn: 81733 
							
						 
						
							2009-09-14 00:16:25 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								ccbabc9645 
								
							 
						 
						
							
							
								
								Fix another byref bug. This should hopefully get QuickLookPlugins building successfully.  
							
							 
							
							... 
							
							
							
							llvm-svn: 81681 
							
						 
						
							2009-09-13 17:55:13 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								626f1d8c3a 
								
							 
						 
						
							
							
								
								ARM/APCS: Only "integer like" aggregates should be returned in r0 (following  
							
							 
							
							... 
							
							
							
							gcc's interpretation of APCS' somewhat loose specification).
llvm-svn: 81671 
							
						 
						
							2009-09-13 08:03:58 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								299d76e901 
								
							 
						 
						
							
							
								
								Rework the way we determine whether an externally visible symbol is  
							
							 
							
							... 
							
							
							
							generated for an inline function definition, taking into account C99
and GNU inline/extern inline semantics. This solution is simpler,
cleaner, and fixes PR4536.
llvm-svn: 81670 
							
						 
						
							2009-09-13 07:46:26 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								0482cfd790 
								
							 
						 
						
							
							
								
								Don't use the PredefinedExpr string as the global variable name, these don't  
							
							 
							
							... 
							
							
							
							make very nice symbols, just use the function name.
llvm-svn: 81653 
							
						 
						
							2009-09-12 23:06:21 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								ee7bd3b204 
								
							 
						 
						
							
							
								
								whitespace fix  
							
							 
							
							... 
							
							
							
							llvm-svn: 81644 
							
						 
						
							2009-09-12 22:45:21 +00:00  
						
					 
				
					
						
							
							
								 
								Benjamin Kramer
							
						 
						
							 
							
							
							
							
								
							
							
								2864584b14 
								
							 
						 
						
							
							
								
								Update CMake files.  
							
							 
							
							... 
							
							
							
							llvm-svn: 81631 
							
						 
						
							2009-09-12 21:18:26 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								6768683933 
								
							 
						 
						
							
							
								
								Add FIXME for alignments that won't be honored.  
							
							 
							
							... 
							
							
							
							llvm-svn: 81620 
							
						 
						
							2009-09-12 18:58:28 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								d76611fac0 
								
							 
						 
						
							
							
								
								We can't have ctors in the vtable (right Doug?)  :-)  
							
							 
							
							... 
							
							
							
							llvm-svn: 81619 
							
						 
						
							2009-09-12 18:57:58 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								d95f9608ab 
								
							 
						 
						
							
							
								
								Handle CK_DerivedToBase when emitting lvalue casts.  
							
							 
							
							... 
							
							
							
							llvm-svn: 81614 
							
						 
						
							2009-09-12 16:16:49 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								360e7d0a8f 
								
							 
						 
						
							
							
								
								When necessary, null check the base value in GetAddressCXXOfBaseClass.  
							
							 
							
							... 
							
							
							
							llvm-svn: 81611 
							
						 
						
							2009-09-12 06:04:24 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								12f5a25f15 
								
							 
						 
						
							
							
								
								Handle derived-to-base conversion in CGExprScalar::EmitCast, if the cast kind is CK_DerivedToBase.  
							
							 
							
							... 
							
							
							
							llvm-svn: 81610 
							
						 
						
							2009-09-12 04:57:16 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								9a57c5ac6f 
								
							 
						 
						
							
							
								
								Whoops, add CGCXXClass.cpp  
							
							 
							
							... 
							
							
							
							llvm-svn: 81607 
							
						 
						
							2009-09-12 04:27:24 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								864d525533 
								
							 
						 
						
							
							
								
								Rename AddressCXXOfBaseClass to GetAddressCXXOfBaseClass. Add a NullCheckValue argument (currently unused).  
							
							 
							
							... 
							
							
							
							llvm-svn: 81606 
							
						 
						
							2009-09-12 04:26:35 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								307408d2af 
								
							 
						 
						
							
							
								
								Add CGCXXClass.cpp. and move CodeGenFunction::AddressCXXOfBaseClass there.  
							
							 
							
							... 
							
							
							
							llvm-svn: 81604 
							
						 
						
							2009-09-12 03:29:09 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								f8e94f2008 
								
							 
						 
						
							
							
								
								Add support for __block variables with alignment greater than __alignof(void *).  
							
							 
							
							... 
							
							
							
							llvm-svn: 81602 
							
						 
						
							2009-09-12 02:44:18 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								0168f4b202 
								
							 
						 
						
							
							
								
								For __block variables, cache the LLVM types as well as which LLVM field where the variable is stored.  
							
							 
							
							... 
							
							
							
							llvm-svn: 81599 
							
						 
						
							2009-09-12 02:14:24 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								020daa9476 
								
							 
						 
						
							
							
								
								Stub out room for ARM APCS ABI implementation (and AAPCS_VFP, although you can't  
							
							 
							
							... 
							
							
							
							hit this via command line options yet).
llvm-svn: 81595 
							
						 
						
							2009-09-12 01:00:39 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								d59655c992 
								
							 
						 
						
							
							
								
								Formatting fixes.  
							
							 
							
							... 
							
							
							
							llvm-svn: 81594 
							
						 
						
							2009-09-12 00:59:49 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								0ef3479cb7 
								
							 
						 
						
							
							
								
								Change CodeGenModule::ConstructTypeAttributes to return the calling convention  
							
							 
							
							... 
							
							
							
							to use, and allow the ABI implementation to override the calling convention.
llvm-svn: 81593 
							
						 
						
							2009-09-12 00:59:20 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								15fc956ca0 
								
							 
						 
						
							
							
								
								Remove unnecessary ASTContext parameter from FunctionDecl::isBuiltinID  
							
							 
							
							... 
							
							
							
							llvm-svn: 81590 
							
						 
						
							2009-09-12 00:22:50 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								16618f2157 
								
							 
						 
						
							
							
								
								Remove unnecessary ASTContext parameters from isMain and isExternC  
							
							 
							
							... 
							
							
							
							llvm-svn: 81589 
							
						 
						
							2009-09-12 00:17:51 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								97c7eda14a 
								
							 
						 
						
							
							
								
								Fix a crash when generating vtables that contain destructors.  
							
							 
							
							... 
							
							
							
							llvm-svn: 81587 
							
						 
						
							2009-09-12 00:00:29 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								80f6ac5a4f 
								
							 
						 
						
							
							
								
								Add basic covariant thunk generation support.  WIP.  
							
							 
							
							... 
							
							
							
							llvm-svn: 81585 
							
						 
						
							2009-09-11 23:25:56 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								bbaeca4fef 
								
							 
						 
						
							
							
								
								Set the calling convention based on the CGFunctionInfo.  
							
							 
							
							... 
							
							
							
							llvm-svn: 81582 
							
						 
						
							2009-09-11 22:25:00 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								7feafc70d9 
								
							 
						 
						
							
							
								
								Add CallingConvention argument to CGFunctionInfo.  
							
							 
							
							... 
							
							
							
							- Currently unused.
llvm-svn: 81581 
							
						 
						
							2009-09-11 22:24:53 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								c0f8eef710 
								
							 
						 
						
							
							
								
								Fix use of uninitialized, David please check.  
							
							 
							
							... 
							
							
							
							llvm-svn: 81570 
							
						 
						
							2009-09-11 20:56:53 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								10e9bffde3 
								
							 
						 
						
							
							
								
								Fixes a regression in objc GC layout bitmap involving  
							
							 
							
							... 
							
							
							
							block pointer ivars.
llvm-svn: 81535 
							
						 
						
							2009-09-11 17:39:05 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								33a004e9eb 
								
							 
						 
						
							
							
								
								Swizzle the target triple based on -mthumb, and update clang-cc to recognize  
							
							 
							
							... 
							
							
							
							thumb-foo-bar as an ARM target.
llvm-svn: 81497 
							
						 
						
							2009-09-11 01:14:50 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								fd384d8065 
								
							 
						 
						
							
							
								
								Pass the GlobalDecl to getMangledName, fixes PR4890.  
							
							 
							
							... 
							
							
							
							llvm-svn: 81486 
							
						 
						
							2009-09-11 00:11:35 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								73fcc95f0f 
								
							 
						 
						
							
							
								
								Pass GlobalDecls to GenerateCode and StartFunction.  
							
							 
							
							... 
							
							
							
							llvm-svn: 81485 
							
						 
						
							2009-09-11 00:07:24 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								ecf9bf0158 
								
							 
						 
						
							
							
								
								GlobalDecl doesn't have an explicit constructor anymore.  
							
							 
							
							... 
							
							
							
							llvm-svn: 81481 
							
						 
						
							2009-09-10 23:43:36 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								38988d7ee0 
								
							 
						 
						
							
							
								
								Add stricter GlobalDecl constructors.  
							
							 
							
							... 
							
							
							
							llvm-svn: 81480 
							
						 
						
							2009-09-10 23:38:47 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								2cde203392 
								
							 
						 
						
							
							
								
								Non fragile ABI for GNU runtime. Patch bu David Chisnall.  
							
							 
							
							... 
							
							
							
							llvm-svn: 81462 
							
						 
						
							2009-09-10 21:48:21 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								d1f1ff3978 
								
							 
						 
						
							
							
								
								Get the size of object to pass to objc_memmove_collectable()  
							
							 
							
							... 
							
							
							
							from correct field of TypeInfo.
llvm-svn: 81446 
							
						 
						
							2009-09-10 16:20:31 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								10f2c10b83 
								
							 
						 
						
							
							
								
								Make the forwarding member of block byref structs be a pointer to the block byref struct itself.  
							
							 
							
							... 
							
							
							
							llvm-svn: 81423 
							
						 
						
							2009-09-10 01:32:12 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								1ca52689e7 
								
							 
						 
						
							
							
								
								Use the right GlobalDecl type for destructors.  
							
							 
							
							... 
							
							
							
							llvm-svn: 81398 
							
						 
						
							2009-09-09 23:17:18 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								277aa36d68 
								
							 
						 
						
							
							
								
								Suppress build warning.  
							
							 
							
							... 
							
							
							
							llvm-svn: 81384 
							
						 
						
							2009-09-09 22:32:15 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								e9766d559b 
								
							 
						 
						
							
							
								
								If a cast expression needs either a conversion function or a constructor to be called, generate implicit child expressions that call them.  
							
							 
							
							... 
							
							
							
							llvm-svn: 81383 
							
						 
						
							2009-09-09 21:33:21 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								11289f4280 
								
							 
						 
						
							
							
								
								Remove tabs, and whitespace cleanups.  
							
							 
							
							... 
							
							
							
							llvm-svn: 81346 
							
						 
						
							2009-09-09 15:08:12 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								4a3999fe90 
								
							 
						 
						
							
							
								
								Reflow comments and some minor whitespace fixups.  
							
							 
							
							... 
							
							
							
							llvm-svn: 81337 
							
						 
						
							2009-09-09 13:00:44 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								71d1d92d37 
								
							 
						 
						
							
							
								
								Make BuildByRefType take a ValueDecl instead of a QualType and an alignment.  
							
							 
							
							... 
							
							
							
							llvm-svn: 81315 
							
						 
						
							2009-09-09 02:51:03 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								2fb0824197 
								
							 
						 
						
							
							
								
								Vastly improve PredefinedExpr output, both in Sema and CodeGen. Patch by Sam Weinig!  
							
							 
							
							... 
							
							
							
							llvm-svn: 81237 
							
						 
						
							2009-09-08 18:24:21 +00:00  
						
					 
				
					
						
							
							
								 
								Benjamin Kramer
							
						 
						
							 
							
							
							
							
								
							
							
								b178ab2155 
								
							 
						 
						
							
							
								
								Remove unnecessary #include <sstream>.  
							
							 
							
							... 
							
							
							
							llvm-svn: 81147 
							
						 
						
							2009-09-07 11:12:05 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								e73d5ca9a8 
								
							 
						 
						
							
							
								
								Refine vcall offsets.  Cleanups.  WIP.  
							
							 
							
							... 
							
							
							
							llvm-svn: 81143 
							
						 
						
							2009-09-07 04:27:52 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								d027a92431 
								
							 
						 
						
							
							
								
								Use a SetVector for tracking some Obj-C metadata, to ensure deterministic  
							
							 
							
							... 
							
							
							
							output.
 - Also, cleanup code to output inline asm references.
llvm-svn: 81139 
							
						 
						
							2009-09-07 00:20:42 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								b82db12b35 
								
							 
						 
						
							
							
								
								Refine overrides and thunks for virtual bases.  Cleanups.  WIP.  
							
							 
							
							... 
							
							
							
							llvm-svn: 81080 
							
						 
						
							2009-09-05 11:28:33 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								c9eb1727db 
								
							 
						 
						
							
							
								
								Cleanup.  
							
							 
							
							... 
							
							
							
							llvm-svn: 81078 
							
						 
						
							2009-09-05 09:24:43 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								69bbd6ce84 
								
							 
						 
						
							
							
								
								Cleanups.  
							
							 
							
							... 
							
							
							
							llvm-svn: 81077 
							
						 
						
							2009-09-05 09:10:58 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								6363021ab9 
								
							 
						 
						
							
							
								
								Cleanups.  
							
							 
							
							... 
							
							
							
							llvm-svn: 81075 
							
						 
						
							2009-09-05 08:47:24 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								3cdb051425 
								
							 
						 
						
							
							
								
								Cleanups.  
							
							 
							
							... 
							
							
							
							llvm-svn: 81074 
							
						 
						
							2009-09-05 08:45:02 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								5e3ac0249c 
								
							 
						 
						
							
							
								
								Cleanups.  
							
							 
							
							... 
							
							
							
							llvm-svn: 81073 
							
						 
						
							2009-09-05 08:40:18 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								ea8eea2c45 
								
							 
						 
						
							
							
								
								Cleanups.  
							
							 
							
							... 
							
							
							
							llvm-svn: 81072 
							
						 
						
							2009-09-05 08:37:03 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								db14a73606 
								
							 
						 
						
							
							
								
								Cleanups.  
							
							 
							
							... 
							
							
							
							llvm-svn: 81071 
							
						 
						
							2009-09-05 08:07:32 +00:00  
						
					 
				
					
						
							
							
								 
								John McCall
							
						 
						
							 
							
							
							
							
								
							
							
								cc5e23ca8d 
								
							 
						 
						
							
							
								
								Overhaul the mangler to use a visitor pattern, at least for types.  We can safely  
							
							 
							
							... 
							
							
							
							ignore non-canonical type classes, but apparently we need to know how to mangle
dependent names.
The missing cases are much more obvious now.
llvm-svn: 81070 
							
						 
						
							2009-09-05 07:56:18 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								001ad31c9a 
								
							 
						 
						
							
							
								
								Cleanups.  WIP.  
							
							 
							
							... 
							
							
							
							llvm-svn: 81069 
							
						 
						
							2009-09-05 07:49:12 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								453fe4285d 
								
							 
						 
						
							
							
								
								Install thunks later to fixup overrides.  Track space taken by vbase  
							
							 
							
							... 
							
							
							
							offsets better for thunk refinements.  Cleanups.  WIP.
llvm-svn: 81067 
							
						 
						
							2009-09-05 07:20:32 +00:00  
						
					 
				
					
						
							
							
								 
								John McCall
							
						 
						
							 
							
							
							
							
								
							
							
								b2e195a585 
								
							 
						 
						
							
							
								
								Start emitting ElaboratedTypes in C++ mode.  Support the effort in various  
							
							 
							
							... 
							
							
							
							ways:  remove elab types during desugaring, enhance pretty-printing to allow
tags to be suppressed without suppressing scopes, look through elab types
when associating a typedef name with an anonymous record type.
llvm-svn: 81065 
							
						 
						
							2009-09-05 06:31:47 +00:00  
						
					 
				
					
						
							
							
								 
								John McCall
							
						 
						
							 
							
							
							
							
								
							
							
								fcc33b074b 
								
							 
						 
						
							
							
								
								Basic support for representing elaborated type specifiers  
							
							 
							
							... 
							
							
							
							directly in the AST.  The current thinking is to create these
only in C++ mode for efficiency.  But for now, they're not being
created at all; patch to follow.
This will let us do things like verify that tags match during
template instantation, as well as signal that an elaborated type
specifier was used for clients that actually care.
Optimally, the TypeLoc hierarchy should be adjusted to carry tag
location information as well.
llvm-svn: 81057 
							
						 
						
							2009-09-05 00:15:47 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								34ec2ef159 
								
							 
						 
						
							
							
								
								Improve the AST representation and semantic analysis for extern  
							
							 
							
							... 
							
							
							
							templates. We now distinguish between an explicit instantiation
declaration and an explicit instantiation definition, and know not to
instantiate explicit instantiation declarations. Unfortunately, there
is some remaining confusion w.r.t. instantiation of out-of-line member
function definitions that causes trouble here.
 
llvm-svn: 81053 
							
						 
						
							2009-09-04 22:48:11 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								d94105a1c2 
								
							 
						 
						
							
							
								
								Don't generate any code for an explicit call to a trivial destructor.  
							
							 
							
							... 
							
							
							
							Now that parsing, semantic analysis, and (I think) code generation of
pseudo-destructor expressions and explicit destructor calls works,
update the example-dynarray.cpp test to destroy the objects it
allocates and update the test to actually compile + link.
The code seems correct, but the Clang-compiled version dies with a
malloc error. Time to debug!
llvm-svn: 81025 
							
						 
						
							2009-09-04 19:04:08 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								5a522353c3 
								
							 
						 
						
							
							
								
								Add overidding for methods for vtable building for the secondary  
							
							 
							
							... 
							
							
							
							vtables.  Add thunk generation.  WIP.
llvm-svn: 81014 
							
						 
						
							2009-09-04 18:27:16 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								ad8a336b40 
								
							 
						 
						
							
							
								
								Implement AST, semantics, and CodeGen for C++ pseudo-destructor  
							
							 
							
							... 
							
							
							
							expressions, e.g.,
  p->~T()
when p is a pointer to a scalar type. 
We don't currently diagnose errors when pseudo-destructor expressions
are used in any way other than by forming a call.
llvm-svn: 81009 
							
						 
						
							2009-09-04 17:36:40 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								0e91275ab4 
								
							 
						 
						
							
							
								
								If the alignment of the chosen field in a union is greater than the alignment of the union, we need to use a packed LLVM struct. Fixes <rdar://problem/7184250>.  
							
							 
							
							... 
							
							
							
							llvm-svn: 80964 
							
						 
						
							2009-09-03 22:56:02 +00:00  
						
					 
				
					
						
							
							
								 
								David Chisnall
							
						 
						
							 
							
							
							
							
								
							
							
								2c5bef2a74 
								
							 
						 
						
							
							
								
								Fixed bug introduced in r79900 where FreeBSD was turned into NetBSD, transposing the ABIs and breaking both platforms.  
							
							 
							
							... 
							
							
							
							llvm-svn: 80870 
							
						 
						
							2009-09-03 01:48:05 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								e5feb51624 
								
							 
						 
						
							
							
								
								Don't try to CodeGen using directives, from Anders Johnsen  
							
							 
							
							... 
							
							
							
							llvm-svn: 80853 
							
						 
						
							2009-09-02 23:49:23 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								35dca26835 
								
							 
						 
						
							
							
								
								Fix an assertion when initializing a union using a member initializer. (We weren't casting from the union type to the initializer type correctly).  
							
							 
							
							... 
							
							
							
							llvm-svn: 80837 
							
						 
						
							2009-09-02 21:14:47 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								09a3774cd3 
								
							 
						 
						
							
							
								
								Packed unions should be packed. Fixes an assert Daniel reported.  
							
							 
							
							... 
							
							
							
							llvm-svn: 80808 
							
						 
						
							2009-09-02 17:51:33 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								3f707e9f14 
								
							 
						 
						
							
							
								
								Add mangling for covariant thunks.  
							
							 
							
							... 
							
							
							
							llvm-svn: 80747 
							
						 
						
							2009-09-02 00:56:18 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								a119813218 
								
							 
						 
						
							
							
								
								Shorten name.  
							
							 
							
							... 
							
							
							
							llvm-svn: 80744 
							
						 
						
							2009-09-02 00:28:47 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								9cc7d30435 
								
							 
						 
						
							
							
								
								Add mangling for thunks.  
							
							 
							
							... 
							
							
							
							llvm-svn: 80743 
							
						 
						
							2009-09-02 00:25:38 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								2348e62498 
								
							 
						 
						
							
							
								
								More overriding base work and some cleanups.  WIP.  
							
							 
							
							... 
							
							
							
							llvm-svn: 80737 
							
						 
						
							2009-09-01 23:22:44 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								40dc64bcfc 
								
							 
						 
						
							
							
								
								Split out overriding.  WIP.  
							
							 
							
							... 
							
							
							
							llvm-svn: 80732 
							
						 
						
							2009-09-01 22:20:28 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								c82555fb85 
								
							 
						 
						
							
							
								
								Handle member expressions that return references correctly.  
							
							 
							
							... 
							
							
							
							llvm-svn: 80723 
							
						 
						
							2009-09-01 21:18:52 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								783ab50b33 
								
							 
						 
						
							
							
								
								Assert that we don't have any virtual bases. We can emit dtors for polymorphics classes just fune.  
							
							 
							
							... 
							
							
							
							llvm-svn: 80722 
							
						 
						
							2009-09-01 21:12:16 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								f1ae6d45dd 
								
							 
						 
						
							
							
								
								Use the correct cast kinds for bit casts and function to pointer decay. Fixes PR4827.  
							
							 
							
							... 
							
							
							
							llvm-svn: 80720 
							
						 
						
							2009-09-01 20:52:42 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								6b8b4b459d 
								
							 
						 
						
							
							
								
								We can generate constructors/destructors with base classes and non-trivial fields just fine now.  
							
							 
							
							... 
							
							
							
							llvm-svn: 80701 
							
						 
						
							2009-09-01 18:33:46 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								1a50477385 
								
							 
						 
						
							
							
								
								Fixed a property getter ir-gen crash.  
							
							 
							
							... 
							
							
							
							llvm-svn: 80681 
							
						 
						
							2009-09-01 17:02:21 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								1c277d0fe8 
								
							 
						 
						
							
							
								
								PR4836, part 2: CodeGen for __builtin_isnan.  
							
							 
							
							... 
							
							
							
							llvm-svn: 80655 
							
						 
						
							2009-09-01 04:19:44 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								f405d7e6f1 
								
							 
						 
						
							
							
								
								Eliminate CXXAdornedMemberExpr entirely. Instead, optionally allocate  
							
							 
							
							... 
							
							
							
							space within the MemberExpr for the nested-name-specifier and its
source range. We'll do the same thing with explicitly-specified
template arguments, assuming I don't flip-flop again.
llvm-svn: 80642 
							
						 
						
							2009-08-31 23:41:50 +00:00  
						
					 
				
					
						
							
							
								 
								Devang Patel
							
						 
						
							 
							
							
							
							
								
							
							
								124095bb18 
								
							 
						 
						
							
							
								
								Rename DIBlock as DILexicalBlock.  
							
							 
							
							... 
							
							
							
							llvm-svn: 80634 
							
						 
						
							2009-08-31 22:00:32 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								96ee789d33 
								
							 
						 
						
							
							
								
								Rename CXXQualifiedMemberExpr -> CXXAdornedMemberExpr, since we will  
							
							 
							
							... 
							
							
							
							also be adding explicit template arguments as an additional
"adornment". No functionality change.
llvm-svn: 80628 
							
						 
						
							2009-08-31 21:41:48 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								879d726608 
								
							 
						 
						
							
							
								
								Re-implemented generation of objc_memmove_collectable  
							
							 
							
							... 
							
							
							
							API for copying GC'able aggregates (Next runtime only).
llvm-svn: 80607 
							
						 
						
							2009-08-31 19:33:16 +00:00  
						
					 
				
					
						
							
							
								 
								David Chisnall
							
						 
						
							 
							
							
							
							
								
							
							
								5778fce141 
								
							 
						 
						
							
							
								
								Updated GNU runtime non-fragile ABI.  
							
							 
							
							... 
							
							
							
							Added -fconstant-string-class= option.
Added __has_feature() test for non-fragile ABI.
llvm-svn: 80591 
							
						 
						
							2009-08-31 16:41:57 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								033e8d4ae6 
								
							 
						 
						
							
							
								
								Make IRGen for initializing a member reference work correctly.  
							
							 
							
							... 
							
							
							
							llvm-svn: 80439 
							
						 
						
							2009-08-29 20:58:20 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								0a484d007b 
								
							 
						 
						
							
							
								
								Patch to ir-gen user-defined conversions used in expressions  
							
							 
							
							... 
							
							
							
							[12.3.2-p3]
llvm-svn: 80436 
							
						 
						
							2009-08-29 20:33:32 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								3df8767869 
								
							 
						 
						
							
							
								
								Patch for code gen. for c-style cast which ends in  
							
							 
							
							... 
							
							
							
							using class's conversion functions [12.3.2-p2]
llvm-svn: 80433 
							
						 
						
							2009-08-29 19:15:16 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								beefdc8948 
								
							 
						 
						
							
							
								
								iGenerate vcalls as we build up the methods.  WIP.  
							
							 
							
							... 
							
							
							
							llvm-svn: 80405 
							
						 
						
							2009-08-28 23:22:54 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								8b899e4247 
								
							 
						 
						
							
							
								
								ir-gen related patch for type conversion  
							
							 
							
							... 
							
							
							
							with class type conversion methods. WIP.
llvm-svn: 80365 
							
						 
						
							2009-08-28 15:11:24 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								ff083ef429 
								
							 
						 
						
							
							
								
								Clean up CodeGenFunction::EmitCastLValue to use the cast kind.  Error  
							
							 
							
							... 
							
							
							
							out for user-defined conversions instead of crashing.
llvm-svn: 80282 
							
						 
						
							2009-08-27 21:19:33 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								a0d0e6fcb1 
								
							 
						 
						
							
							
								
								Fixup codegen for static dispatch to a virtual function that was  
							
							 
							
							... 
							
							
							
							almost correct.  :-)
llvm-svn: 80181 
							
						 
						
							2009-08-26 23:38:08 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								c71f094c08 
								
							 
						 
						
							
							
								
								ir-gen for type convesion of class objects. WIP.  
							
							 
							
							... 
							
							
							
							llvm-svn: 80178 
							
						 
						
							2009-08-26 23:31:30 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								c190523d7a 
								
							 
						 
						
							
							
								
								When a member reference expression includes a qualifier on the member  
							
							 
							
							... 
							
							
							
							name, e.g.,
  
  x->Base::f()
retain the qualifier (and its source range information) in a new
subclass of MemberExpr called CXXQualifiedMemberExpr. Provide
construction, transformation, profiling, printing, etc., for this new
expression type.
When a virtual function is called via a qualified name, don't emit a
virtual call. Instead, call that function directly. Mike, could you
add a CodeGen test for this, too?
llvm-svn: 80167 
							
						 
						
							2009-08-26 22:36:53 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								3722f5896c 
								
							 
						 
						
							
							
								
								Regularize the case and sort.  
							
							 
							
							... 
							
							
							
							llvm-svn: 80163 
							
						 
						
							2009-08-26 22:31:08 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								a5588bf3ac 
								
							 
						 
						
							
							
								
								Implement virtual dispatch.  :-) This is self-consistent with clang,  
							
							 
							
							... 
							
							
							
							but not yet necessarily perfectly consistent with gcc.  Also addressed
Doug and John's comments.
llvm-svn: 80137 
							
						 
						
							2009-08-26 20:46:33 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								95f896380f 
								
							 
						 
						
							
							
								
								Make address-space qualification work correctly for compound literals.  
							
							 
							
							... 
							
							
							
							Issue reported on cfe-dev.
Also fixed the code to use isConstant to determine whether to generate a 
constant global, to be consistent with CodeGenModule.  This probably 
needs to be refactored to deal with C++, though.
llvm-svn: 80131 
							
						 
						
							2009-08-26 20:01:39 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								458055a890 
								
							 
						 
						
							
							
								
								Revert r80064 since it broke the build.  
							
							 
							
							... 
							
							
							
							llvm-svn: 80066 
							
						 
						
							2009-08-26 03:30:14 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								fbddfdacdc 
								
							 
						 
						
							
							
								
								Implement virtual dispatch.  :-)  This is self-consistent with clang, but not yet  
							
							 
							
							... 
							
							
							
							necessarily perfectly consistent with gcc.
llvm-svn: 80064 
							
						 
						
							2009-08-26 01:54:35 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								2c73b1d2a2 
								
							 
						 
						
							
							
								
								Simplified default construction of array data members  
							
							 
							
							... 
							
							
							
							in the constructor prologue.
llvm-svn: 80060 
							
						 
						
							2009-08-26 00:23:27 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								6c0a6e490c 
								
							 
						 
						
							
							
								
								Emit conversion functions correctly.  
							
							 
							
							... 
							
							
							
							llvm-svn: 79985 
							
						 
						
							2009-08-25 13:14:46 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								12e022ddbf 
								
							 
						 
						
							
							
								
								Fix ivar layout map generation (hopefully).  
							
							 
							
							... 
							
							
							
							llvm-svn: 79968 
							
						 
						
							2009-08-25 02:07:02 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								a6a3494c1d 
								
							 
						 
						
							
							
								
								Remove #ifdef'out code.  
							
							 
							
							... 
							
							
							
							llvm-svn: 79956 
							
						 
						
							2009-08-24 23:16:37 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								7c07d5fed8 
								
							 
						 
						
							
							
								
								Remove ivarlayout bitmap optimization, instead if all zeros,  
							
							 
							
							... 
							
							
							
							put out the bitmap when all objects are scanned.
llvm-svn: 79947 
							
						 
						
							2009-08-24 21:55:06 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								c327709db8 
								
							 
						 
						
							
							
								
								Handle array to pointer decay in EmitCastExpr and get rid of VisitImplicitCastExpr.  
							
							 
							
							... 
							
							
							
							llvm-svn: 79930 
							
						 
						
							2009-08-24 18:37:17 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								3df53bcf10 
								
							 
						 
						
							
							
								
								Handle CK_NullToMemberPointer in ScalarExprEmitter::EmitCast  
							
							 
							
							... 
							
							
							
							llvm-svn: 79929 
							
						 
						
							2009-08-24 18:26:39 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								15583e4493 
								
							 
						 
						
							
							
								
								Pass the cast kind to ScalarExprEmitter::EmitCastExpr.  
							
							 
							
							... 
							
							
							
							llvm-svn: 79928 
							
						 
						
							2009-08-24 18:12:39 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								867b48f713 
								
							 
						 
						
							
							
								
								More member pointer work.  
							
							 
							
							... 
							
							
							
							llvm-svn: 79922 
							
						 
						
							2009-08-24 17:16:23 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								4557b2c0c2 
								
							 
						 
						
							
							
								
								Remove dead code  
							
							 
							
							... 
							
							
							
							llvm-svn: 79921 
							
						 
						
							2009-08-24 16:52:33 +00:00  
						
					 
				
					
						
							
							
								 
								Torok Edwin
							
						 
						
							 
							
							
							
							
								
							
							
								db7149246f 
								
							 
						 
						
							
							
								
								Fix build of clang with gcc-4.4: #include <cstdio> was missing.  
							
							 
							
							... 
							
							
							
							llvm-svn: 79916 
							
						 
						
							2009-08-24 13:25:12 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								576d90d39b 
								
							 
						 
						
							
							
								
								Remove TargetInfo::getTargetPrefix().  
							
							 
							
							... 
							
							
							
							llvm-svn: 79907 
							
						 
						
							2009-08-24 09:54:37 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								40165180f7 
								
							 
						 
						
							
							
								
								Switch TargetInfo to store an llvm::Triple.  
							
							 
							
							... 
							
							
							
							- Primarily to discourage clients form making decisions based on the string.
llvm-svn: 79901 
							
						 
						
							2009-08-24 09:10:05 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								e3532f82a7 
								
							 
						 
						
							
							
								
								Switch ABI selection to use llvm::Triple instead of string munging.  
							
							 
							
							... 
							
							
							
							llvm-svn: 79900 
							
						 
						
							2009-08-24 08:52:16 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								76d8c5725f 
								
							 
						 
						
							
							
								
								Don't install Clang libraries.  
							
							 
							
							... 
							
							
							
							llvm-svn: 79824 
							
						 
						
							2009-08-23 05:02:18 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								622ddae92b 
								
							 
						 
						
							
							
								
								Whoops, comment this out for now. I'll fix it shortly.  
							
							 
							
							... 
							
							
							
							llvm-svn: 79806 
							
						 
						
							2009-08-23 01:28:08 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								d606de72ab 
								
							 
						 
						
							
							
								
								More work towards zero-initializing structs that contain member pointers in constant expressions.  
							
							 
							
							... 
							
							
							
							llvm-svn: 79805 
							
						 
						
							2009-08-23 01:25:01 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								beac2bef4d 
								
							 
						 
						
							
							
								
								Remove the PaddingFields member from CGRecordLayout, it wasn't used anyway.  
							
							 
							
							... 
							
							
							
							llvm-svn: 79799 
							
						 
						
							2009-08-23 01:01:04 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								faeccc622f 
								
							 
						 
						
							
							
								
								Handle CK_NullToMemberPointer casts in the constant expr emitter.  
							
							 
							
							... 
							
							
							
							llvm-svn: 79790 
							
						 
						
							2009-08-23 00:02:11 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								3b0c5dcdd2 
								
							 
						 
						
							
							
								
								Change the constant expression emitter to look at the cast kind for to-union casts.  
							
							 
							
							... 
							
							
							
							llvm-svn: 79789 
							
						 
						
							2009-08-22 23:54:44 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								9cedbefb24 
								
							 
						 
						
							
							
								
								Add a -fno-elide-constructors option to clang-cc.  
							
							 
							
							... 
							
							
							
							llvm-svn: 79782 
							
						 
						
							2009-08-22 22:30:33 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								0b8c5ae7af 
								
							 
						 
						
							
							
								
								Calculate the address point for a vtable better, and start fleshing out the vcall  
							
							 
							
							... 
							
							
							
							calculations better.
llvm-svn: 79687 
							
						 
						
							2009-08-21 23:09:30 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								8adc973483 
								
							 
						 
						
							
							
								
								Patch to ir-gen copy assigning array members when synthesizing  
							
							 
							
							... 
							
							
							
							a copy assignment operator function.
llvm-svn: 79681 
							
						 
						
							2009-08-21 22:34:55 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								5626384384 
								
							 
						 
						
							
							
								
								Patch to provide ir-gen support in copying array members  
							
							 
							
							... 
							
							
							
							when synthesizing a copy constructor. Arrays's base element
may have a trivial or non-trivial copy constructor.
llvm-svn: 79653 
							
						 
						
							2009-08-21 18:30:26 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								7481bd88bb 
								
							 
						 
						
							
							
								
								Array member construction in prologue of user-declared  
							
							 
							
							... 
							
							
							
							constructors.
llvm-svn: 79640 
							
						 
						
							2009-08-21 17:09:38 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								6c9e5a2b9e 
								
							 
						 
						
							
							
								
								Introduce getConstantArrayElementCount API and use it in  
							
							 
							
							... 
							
							
							
							construction/destruction of array members.
llvm-svn: 79637 
							
						 
						
							2009-08-21 16:31:06 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								a002945a20 
								
							 
						 
						
							
							
								
								We now support overriding base functions in vtables.  WIP.  
							
							 
							
							... 
							
							
							
							llvm-svn: 79587 
							
						 
						
							2009-08-21 01:45:00 +00:00  
						
					 
				
					
						
							
							
								 
								Argyrios Kyrtzidis
							
						 
						
							 
							
							
							
							
								
							
							
								6032ef1aa3 
								
							 
						 
						
							
							
								
								Remove TypeSpecStartLocation from VarDecl/FunctionDecl/FieldDecl, and use DeclaratorInfo to get this information.  
							
							 
							
							... 
							
							
							
							llvm-svn: 79584 
							
						 
						
							2009-08-21 00:31:54 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								1a606ab12a 
								
							 
						 
						
							
							
								
								Patch to ir-gen destruction of array member elements in revers order  
							
							 
							
							... 
							
							
							
							of their construction.
llvm-svn: 79571 
							
						 
						
							2009-08-20 23:02:58 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								9c83720d17 
								
							 
						 
						
							
							
								
								ir-gen patch to destruct array members. WIP.  
							
							 
							
							... 
							
							
							
							llvm-svn: 79565 
							
						 
						
							2009-08-20 20:54:15 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								9a84665921 
								
							 
						 
						
							
							
								
								Using "ObjCImplicitSetterGetterRefExpr" instead of "ObjCImplctSetterGetterRefExpr".  
							
							 
							
							... 
							
							
							
							A field rename and more comments.
llvm-svn: 79537 
							
						 
						
							2009-08-20 17:02:02 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								cae6178b3b 
								
							 
						 
						
							
							
								
								Refine vbase offsets for the inductive case.  Things are now starting  
							
							 
							
							... 
							
							
							
							to come together nicely.  Still a WIP.
llvm-svn: 79521 
							
						 
						
							2009-08-20 07:22:17 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								2220447adc 
								
							 
						 
						
							
							
								
								Ensure we don't output repeated vbase offsets.  I have a testcase for  
							
							 
							
							... 
							
							
							
							this, but need to fixup the actual offset value before I can check it
in.  WIP.
llvm-svn: 79506 
							
						 
						
							2009-08-20 02:11:48 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								dd46eb770f 
								
							 
						 
						
							
							
								
								Test case for my last patch plus a minor clean up.  
							
							 
							
							... 
							
							
							
							llvm-svn: 79500 
							
						 
						
							2009-08-20 01:01:06 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								eeb0e57247 
								
							 
						 
						
							
							
								
								ir-gen for multi-dimensional array construction. WIP.  
							
							 
							
							... 
							
							
							
							llvm-svn: 79497 
							
						 
						
							2009-08-20 00:15:15 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								a8fe2c26a8 
								
							 
						 
						
							
							
								
								Removed unneeded code for break/continue statements in  
							
							 
							
							... 
							
							
							
							manufactured for-loop per Anders feedback (thanks).
- Fariborz
llvm-svn: 79466 
							
						 
						
							2009-08-19 21:10:38 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								431c883287 
								
							 
						 
						
							
							
								
								ir-gen for constructing arrays as non-static data members. WIP.  
							
							 
							
							... 
							
							
							
							llvm-svn: 79464 
							
						 
						
							2009-08-19 20:55:16 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								58bc48c14e 
								
							 
						 
						
							
							
								
								Switch to SmallString::str from SmallString::c_str.  
							
							 
							
							... 
							
							
							
							- Several FIXMEs due to non-Twinification of IRBuilder.
llvm-svn: 79455 
							
						 
						
							2009-08-19 20:04:03 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								3bc0a3bf7d 
								
							 
						 
						
							
							
								
								One second thought, I think I want to limit this class to just vtable  
							
							 
							
							... 
							
							
							
							building activities.
llvm-svn: 79438 
							
						 
						
							2009-08-19 18:10:47 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								b386941208 
								
							 
						 
						
							
							
								
								Cleanup: fold IndirectPrimary into builder.  
							
							 
							
							... 
							
							
							
							llvm-svn: 79423 
							
						 
						
							2009-08-19 14:40:47 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								3b09f004db 
								
							 
						 
						
							
							
								
								We don't want to confuse this layout with the BLayout from the builder.  
							
							 
							
							... 
							
							
							
							llvm-svn: 79422 
							
						 
						
							2009-08-19 14:06:50 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								984c99d190 
								
							 
						 
						
							
							
								
								Restore vbase offsets for classes without a primary.  
							
							 
							
							... 
							
							
							
							llvm-svn: 79402 
							
						 
						
							2009-08-19 02:53:08 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								583ef62149 
								
							 
						 
						
							
							
								
								Refine vcalls a little.  
							
							 
							
							... 
							
							
							
							llvm-svn: 79400 
							
						 
						
							2009-08-19 02:06:38 +00:00  
						
					 
				
					
						
							
							
								 
								Argyrios Kyrtzidis
							
						 
						
							 
							
							
							
							
								
							
							
								e918926d31 
								
							 
						 
						
							
							
								
								Introduce LocInfoType which is a Sema-specific implementation detail.  
							
							 
							
							... 
							
							
							
							This is a Type subclass that can hold a DeclaratorInfo* when we have type source info coming
out of a declarator that we want to preserve. This is used only at the "border" of Parser/Sema for
passing/getting QualTypes, it does not participate in the type system semantics in any way.
llvm-svn: 79394 
							
						 
						
							2009-08-19 01:28:17 +00:00  
						
					 
				
					
						
							
							
								 
								Argyrios Kyrtzidis
							
						 
						
							 
							
							
							
							
								
							
							
								60ed560428 
								
							 
						 
						
							
							
								
								Introduce DeclaratorDecl and pass DeclaratorInfo through the Decl/Sema interfaces.  
							
							 
							
							... 
							
							
							
							DeclaratorDecl contains a DeclaratorInfo* to keep type source info.
Subclasses of DeclaratorDecl are FieldDecl, FunctionDecl, and VarDecl.
EnumConstantDecl still inherits from ValueDecl since it has no need for DeclaratorInfo.
Decl/Sema interfaces accept a DeclaratorInfo as parameter but no DeclaratorInfo is created yet.
llvm-svn: 79392 
							
						 
						
							2009-08-19 01:27:57 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								6fe6ca11da 
								
							 
						 
						
							
							
								
								Cleanup.  
							
							 
							
							... 
							
							
							
							llvm-svn: 79374 
							
						 
						
							2009-08-18 22:04:08 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								494c42526b 
								
							 
						 
						
							
							
								
								Add some documentation.  
							
							 
							
							... 
							
							
							
							llvm-svn: 79373 
							
						 
						
							2009-08-18 21:59:28 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								07347353a0 
								
							 
						 
						
							
							
								
								Cleanups.  Move GenerateRtti to CodeGenModule.  
							
							 
							
							... 
							
							
							
							llvm-svn: 79372 
							
						 
						
							2009-08-18 21:49:00 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								19380c4b88 
								
							 
						 
						
							
							
								
								Renamed ClassProp data member of ObjCImplctSetterGetterRefExpr  
							
							 
							
							... 
							
							
							
							to InterfaceDecl, as it is unrelated to any property and
holds the InterfaceDecl needed for accessing class getter/setter
methods using the dot-syntax.
llvm-svn: 79371 
							
						 
						
							2009-08-18 21:37:33 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								ee81dca8c7 
								
							 
						 
						
							
							
								
								Move the rest of the vtable building code into the new builder.  
							
							 
							
							... 
							
							
							
							llvm-svn: 79370 
							
						 
						
							2009-08-18 21:30:21 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								1f18b9a301 
								
							 
						 
						
							
							
								
								Suck up method generation.  
							
							 
							
							... 
							
							
							
							llvm-svn: 79367 
							
						 
						
							2009-08-18 21:03:28 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								5cb34077ef 
								
							 
						 
						
							
							
								
								Split out vtable bulding code into a builder.  
							
							 
							
							... 
							
							
							
							llvm-svn: 79366 
							
						 
						
							2009-08-18 20:50:28 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								88cc2340de 
								
							 
						 
						
							
							
								
								Renamed ObjCKVCRefExpr to ObjCImplctSetterGetterRefExpr.  
							
							 
							
							... 
							
							
							
							Removed an unnecessary loop to get to setters incoming
argument. Added DoxyGen comments. Still more work
to do in this area (WIP).
llvm-svn: 79365 
							
						 
						
							2009-08-18 20:50:23 +00:00  
						
					 
				
					
						
							
							
								 
								David Chisnall
							
						 
						
							 
							
							
							
							
								
							
							
								26657ea8bc 
								
							 
						 
						
							
							
								
								Fixed typo in last commit pointed out by Anton.  
							
							 
							
							... 
							
							
							
							llvm-svn: 79290 
							
						 
						
							2009-08-17 23:18:30 +00:00  
						
					 
				
					
						
							
							
								 
								David Chisnall
							
						 
						
							 
							
							
							
							
								
							
							
								de3a06933d 
								
							 
						 
						
							
							
								
								Changes to TargetABIInfo to (hopefully) select the correct calling convention.  This has been tested on FreeBSD, and now correctly generates GCC-compatible code for functions returning small structures.  Please test it on other platforms!  
							
							 
							
							... 
							
							
							
							llvm-svn: 79288 
							
						 
						
							2009-08-17 23:08:21 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								d172e91f2a 
								
							 
						 
						
							
							
								
								Patch to 1) synthesizing non-trivial default destructor when  
							
							 
							
							... 
							
							
							
							one is not provided by user. 2) More complete
emission of ctor prologue when it has no initializer
list or when it is synthesized.
llvm-svn: 79269 
							
						 
						
							2009-08-17 19:04:50 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								49033712e4 
								
							 
						 
						
							
							
								
								Remove an ErrorUnsupported call.  
							
							 
							
							... 
							
							
							
							llvm-svn: 79261 
							
						 
						
							2009-08-17 18:24:57 +00:00  
						
					 
				
					
						
							
							
								 
								David Chisnall
							
						 
						
							 
							
							
							
							
								
							
							
								9f57c29053 
								
							 
						 
						
							
							
								
								Initial patch to support definitions of id and Class from headers in Objective-C code.  
							
							 
							
							... 
							
							
							
							This currently breaks test/SemaObjC/id-isa-ref.m and issues some spurious warnings when you attempt to assign a struct objc_class* value to a Class variable.  The test case probably should fail as it's written, because without the definition of Class the compiler should not assume struct objc_class* is a valid receiver type, but it's left broken because it would be nice if we could get that passing too for the special case of isa.
Approved by snaroff.
llvm-svn: 79248 
							
						 
						
							2009-08-17 16:35:33 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								81f0df9601 
								
							 
						 
						
							
							
								
								Improve handling of delete expressions.  
							
							 
							
							... 
							
							
							
							llvm-svn: 79205 
							
						 
						
							2009-08-16 21:13:42 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								d262eda6fc 
								
							 
						 
						
							
							
								
								Patch toward synthesizing non-trivial destructors. WIP  
							
							 
							
							... 
							
							
							
							llvm-svn: 79199 
							
						 
						
							2009-08-16 19:36:17 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								3b848940d7 
								
							 
						 
						
							
							
								
								Only do this for initializers of course.  
							
							 
							
							... 
							
							
							
							llvm-svn: 79197 
							
						 
						
							2009-08-16 17:54:29 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								b80760bd78 
								
							 
						 
						
							
							
								
								Destroy bound temporaries.  
							
							 
							
							... 
							
							
							
							llvm-svn: 79196 
							
						 
						
							2009-08-16 17:50:25 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								5b106a7545 
								
							 
						 
						
							
							
								
								Add an IsInitializer flag to EmitAnyExpr. This is used to prevent temporaries from being destroyed when they're bound to a reference variable.  
							
							 
							
							... 
							
							
							
							llvm-svn: 79179 
							
						 
						
							2009-08-16 07:36:22 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								157c321b7c 
								
							 
						 
						
							
							
								
								No need to append extra padding now that we don't create packed structs for simple cases like the constant string.  
							
							 
							
							... 
							
							
							
							llvm-svn: 79178 
							
						 
						
							2009-08-16 05:55:31 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								22ea1f8a30 
								
							 
						 
						
							
							
								
								Cleanups and fixups for calculating the virtual base offsets.  WIP.  
							
							 
							
							... 
							
							
							
							llvm-svn: 79156 
							
						 
						
							2009-08-16 01:46:26 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								0aed0225b4 
								
							 
						 
						
							
							
								
								Improved on ir-gen for synthesis of non-trivial default  
							
							 
							
							... 
							
							
							
							constructor body whose class has non-static data-members which
required non-trivial construction.
llvm-svn: 79125 
							
						 
						
							2009-08-15 18:55:17 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								04fddf0d1f 
								
							 
						 
						
							
							
								
								Fix for PR4721: adjust CodeGen and ASTContext so that we have a  
							
							 
							
							... 
							
							
							
							consistent model for handling size expressions for VLAs.
The model is essentially as follows: VLA types own their associated
expression.  In some cases, we need to create multiple VLA types to 
represent a given VLA (for canonical types, or qualifiers on array types,
or type merging).  If we need to create multiple types based off of 
the same VLA declaration, we use the new refcounting functionality so they can 
all own the expression. The VLASizeMap in CodeGenFunction then uses the size
expression to identify the group of VLA types based off of the same original
declaration.
I'm not particularly attached to the VLA types owning the expression, 
but we're stuck with at least until someone comes up with a way 
to walk the VLA expressions for a declaration.
I did the parallel fix in ASTContext for DependentSizedArrayType, but I 
haven't really looked closely at it, so there might still be issues 
there.
I'll clean up the code duplication in ASTContext in a followup commit.
llvm-svn: 79071 
							
						 
						
							2009-08-15 02:50:32 +00:00  
						
					 
				
					
						
							
							
								 
								John McCall
							
						 
						
							 
							
							
							
							
								
							
							
								deb8448690 
								
							 
						 
						
							
							
								
								Disable all recognition of main() in -ffreestanding.  Addresses bug  #4720 .  
							
							 
							
							... 
							
							
							
							llvm-svn: 79070 
							
						 
						
							2009-08-15 02:09:25 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								8dc7626f9c 
								
							 
						 
						
							
							
								
								minor cleanups for VLA stuff.  
							
							 
							
							... 
							
							
							
							llvm-svn: 79059 
							
						 
						
							2009-08-15 00:03:43 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								19efdd67dd 
								
							 
						 
						
							
							
								
								use GetVLASize instead of accessing VLASizeMap directly, this gets an assert if  
							
							 
							
							... 
							
							
							
							VLASize isn't populated for the type yet.
llvm-svn: 79057 
							
						 
						
							2009-08-14 23:43:22 +00:00  
						
					 
				
					
						
							
							
								 
								Devang Patel
							
						 
						
							 
							
							
							
							
								
							
							
								d4bbb08946 
								
							 
						 
						
							
							
								
								Do now overflow while calulating upper bound for zero sized array.  
							
							 
							
							... 
							
							
							
							llvm-svn: 79043 
							
						 
						
							2009-08-14 20:57:45 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								42af5ba7b7 
								
							 
						 
						
							
							
								
								ir-gen for generation of trvial copy constructor  
							
							 
							
							... 
							
							
							
							call.
llvm-svn: 79034 
							
						 
						
							2009-08-14 20:11:43 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								bcf756cbac 
								
							 
						 
						
							
							
								
								Deconflate virtual base offsets from non-virtual base offsets.  
							
							 
							
							... 
							
							
							
							Deconflate a virtual base primary from a non-virtual base.
llvm-svn: 78971 
							
						 
						
							2009-08-14 01:44:03 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								92b3f47de2 
								
							 
						 
						
							
							
								
								Fixed a bug in ir-gen for copy assignment synthesis.  
							
							 
							
							... 
							
							
							
							Fixed a bug when evaluating those copy-assignments
which need by lazily syntheized. A test case
for these.
llvm-svn: 78965 
							
						 
						
							2009-08-14 00:01:54 +00:00  
						
					 
				
					
						
							
							
								 
								Owen Anderson
							
						 
						
							 
							
							
							
							
								
							
							
								c36edfede5 
								
							 
						 
						
							
							
								
								Update for LLVM API change.  
							
							 
							
							... 
							
							
							
							llvm-svn: 78957 
							
						 
						
							2009-08-13 23:27:53 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								c2f591b1e6 
								
							 
						 
						
							
							
								
								Refine vtable layout for virtual bases and keep better track of  
							
							 
							
							... 
							
							
							
							primaries.  WIP.
llvm-svn: 78950 
							
						 
						
							2009-08-13 22:53:07 +00:00  
						
					 
				
					
						
							
							
								 
								Owen Anderson
							
						 
						
							 
							
							
							
							
								
							
							
								41a750271b 
								
							 
						 
						
							
							
								
								Update for LLVM API change.  
							
							 
							
							... 
							
							
							
							llvm-svn: 78946 
							
						 
						
							2009-08-13 21:57:51 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								4985b33fd7 
								
							 
						 
						
							
							
								
								Patch to force synthesis of copy assignment operator  
							
							 
							
							... 
							
							
							
							function in the order according to c++03. ir-gen 
for copy assignment in the trivial case and the first
test case.
llvm-svn: 78938 
							
						 
						
							2009-08-13 21:09:41 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								2631d8c517 
								
							 
						 
						
							
							
								
								Minor cleanups.  
							
							 
							
							... 
							
							
							
							llvm-svn: 78927 
							
						 
						
							2009-08-13 18:39:54 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								1300754fdd 
								
							 
						 
						
							
							
								
								Prep for vbase layout refinements.  WIP.  
							
							 
							
							... 
							
							
							
							llvm-svn: 78882 
							
						 
						
							2009-08-13 02:02:14 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								9b630c3040 
								
							 
						 
						
							
							
								
								Minor refactoring of copy assign operator ir-gen. SWIP.  
							
							 
							
							... 
							
							
							
							llvm-svn: 78875 
							
						 
						
							2009-08-13 00:53:36 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								bbd5e8c2cf 
								
							 
						 
						
							
							
								
								More toward synthesizing copy assignments. SWIP.  
							
							 
							
							... 
							
							
							
							llvm-svn: 78861 
							
						 
						
							2009-08-12 23:34:46 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								b661738203 
								
							 
						 
						
							
							
								
								Cleanup.  
							
							 
							
							... 
							
							
							
							llvm-svn: 78858 
							
						 
						
							2009-08-12 23:25:18 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								938f15b033 
								
							 
						 
						
							
							
								
								Refactor.  WIP.  Eventually, this will all go into a vtable builder class.  
							
							 
							
							... 
							
							
							
							llvm-svn: 78857 
							
						 
						
							2009-08-12 23:14:12 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								480212253a 
								
							 
						 
						
							
							
								
								Cleanup.  
							
							 
							
							... 
							
							
							
							llvm-svn: 78855 
							
						 
						
							2009-08-12 23:03:28 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								82165efbc4 
								
							 
						 
						
							
							
								
								Refactor.  
							
							 
							
							... 
							
							
							
							llvm-svn: 78854 
							
						 
						
							2009-08-12 23:00:59 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								dc94d3fd27 
								
							 
						 
						
							
							
								
								Refactor.  
							
							 
							
							... 
							
							
							
							llvm-svn: 78851 
							
						 
						
							2009-08-12 22:34:12 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								de7d4c264a 
								
							 
						 
						
							
							
								
								Patch for synthesizing copy assignment operator.  
							
							 
							
							... 
							
							
							
							WIP.
llvm-svn: 78841 
							
						 
						
							2009-08-12 21:14:35 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								9deb22b850 
								
							 
						 
						
							
							
								
								Improve the secondary vtables to not include vbase offsets.  WIP.  
							
							 
							
							... 
							
							
							
							llvm-svn: 78831 
							
						 
						
							2009-08-12 18:50:26 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								cecfe61cd1 
								
							 
						 
						
							
							
								
								Refine vtable building for the secondary vtables to exclude yet more  
							
							 
							
							... 
							
							
							
							cases where a virtual base was already used as a primary base class.
WIP.
llvm-svn: 78820 
							
						 
						
							2009-08-12 17:42:21 +00:00  
						
					 
				
					
						
							
							
								 
								Dan Gohman
							
						 
						
							 
							
							
							
							
								
							
							
								b321039271 
								
							 
						 
						
							
							
								
								Use the new nsw form of add for signed integer addition.  
							
							 
							
							... 
							
							
							
							llvm-svn: 78765 
							
						 
						
							2009-08-12 01:16:29 +00:00  
						
					 
				
					
						
							
							
								 
								Dan Gohman
							
						 
						
							 
							
							
							
							
								
							
							
								43b4484f87 
								
							 
						 
						
							
							
								
								Use the inbounds variant of getelementptr for common pointer arithmetic.  
							
							 
							
							... 
							
							
							
							llvm-svn: 78756 
							
						 
						
							2009-08-12 00:33:55 +00:00  
						
					 
				
					
						
							
							
								 
								Dan Gohman
							
						 
						
							 
							
							
							
							
								
							
							
								1cebe56735 
								
							 
						 
						
							
							
								
								Remove the hack that turns sdiv by a power of 2 to ashr, and  
							
							 
							
							... 
							
							
							
							use the new "exact" sdiv to allow LLVM optimization to perform
this transformation.
llvm-svn: 78739 
							
						 
						
							2009-08-11 22:40:09 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								b2197042b8 
								
							 
						 
						
							
							
								
								ir-gen support for anonymous union data member  
							
							 
							
							... 
							
							
							
							copying in copy constructors and used in
default constructor's initializer list.
llvm-svn: 78700 
							
						 
						
							2009-08-11 18:49:54 +00:00  
						
					 
				
					
						
							
							
								 
								Benjamin Kramer
							
						 
						
							 
							
							
							
							
								
							
							
								9cd050ab07 
								
							 
						 
						
							
							
								
								LLVMContext is a class now.  
							
							 
							
							... 
							
							
							
							llvm-svn: 78691 
							
						 
						
							2009-08-11 17:46:57 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								78696a70bf 
								
							 
						 
						
							
							
								
								Implement more of the inductive case for vtable layout involving  
							
							 
							
							... 
							
							
							
							virtual base primaries and improve the layout of classes with virtual
bases.  WIP.
Hey, I've decided I want a change to FileCheck, I need to ensure that
the group is together, nothing in between.  Can we change it to check
the match line is from the line immediately following the last matched
line, if the source for the matched line is immediately after the
source for the previously matched line?
// CHECK: 1
// CHECK: 2
// CHECK: 3
// CHECK: 4
// CHECK: 5
// CHECK: 6
would require 1 2 and 3 to be continuous in the output, and 4 5 and 6
to be continuous.
llvm-svn: 78638 
							
						 
						
							2009-08-11 04:03:59 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								296584b2a9 
								
							 
						 
						
							
							
								
								Support for anonymous union in ctor's initializer and  
							
							 
							
							... 
							
							
							
							bunch of FIXMEs for their is-gen.
llvm-svn: 78623 
							
						 
						
							2009-08-10 23:56:17 +00:00  
						
					 
				
					
						
							
							
								 
								Nate Begeman
							
						 
						
							 
							
							
							
							
								
							
							
								5ec4b318e3 
								
							 
						 
						
							
							
								
								Take 2 on AltiVec-style vector initializers.  
							
							 
							
							... 
							
							
							
							Fixes PR4704 problems
Addresses Eli's patch feedback re: ugly cast code
Updates all postfix operators to remove ParenListExprs.  While this is awful,
no better solution (say, in the parser) is obvious to me.  Better solutions
welcome.
llvm-svn: 78621 
							
						 
						
							2009-08-10 23:49:36 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								9d3405ceab 
								
							 
						 
						
							
							
								
								minor refactoring. No change otherwise.  
							
							 
							
							... 
							
							
							
							llvm-svn: 78582 
							
						 
						
							2009-08-10 18:46:38 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								7cc52cf09f 
								
							 
						 
						
							
							
								
								ir-gen for generating copying of scalar data members in  
							
							 
							
							... 
							
							
							
							a synthesized copy constructor.
llvm-svn: 78580 
							
						 
						
							2009-08-10 18:34:26 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								2a26e351fc 
								
							 
						 
						
							
							
								
								Fixed a ir-gen bug in synthesizing copy constructors.  
							
							 
							
							... 
							
							
							
							llvm-svn: 78570 
							
						 
						
							2009-08-10 17:20:45 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								481fe50903 
								
							 
						 
						
							
							
								
								Revert r78535, it is causing a number of failures to build projects.  
							
							 
							
							... 
							
							
							
							--- Reverse-merging r78535 into '.':
D    test/Sema/altivec-init.c
U    include/clang/Basic/DiagnosticSemaKinds.td
U    include/clang/AST/Expr.h
U    include/clang/AST/StmtNodes.def
U    include/clang/Parse/Parser.h
U    include/clang/Parse/Action.h
U    tools/clang-cc/clang-cc.cpp
U    lib/Frontend/PrintParserCallbacks.cpp
U    lib/CodeGen/CGExprScalar.cpp
U    lib/Sema/SemaInit.cpp
U    lib/Sema/Sema.h
U    lib/Sema/SemaExpr.cpp
U    lib/Sema/SemaTemplateInstantiateExpr.cpp
U    lib/AST/StmtProfile.cpp
U    lib/AST/Expr.cpp
U    lib/AST/StmtPrinter.cpp
U    lib/Parse/ParseExpr.cpp
U    lib/Parse/ParseExprCXX.cpp
llvm-svn: 78551 
							
						 
						
							2009-08-10 03:01:36 +00:00  
						
					 
				
					
						
							
							
								 
								Ryan Flynn
							
						 
						
							 
							
							
							
							
								
							
							
								1f1fdc070e 
								
							 
						 
						
							
							
								
								map previously ignored __attribute((malloc)) to noalias attribute of llvm function's return  
							
							 
							
							... 
							
							
							
							llvm-svn: 78541 
							
						 
						
							2009-08-09 20:07:29 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								f48123b413 
								
							 
						 
						
							
							
								
								Improve handling of member pointers.  
							
							 
							
							... 
							
							
							
							llvm-svn: 78536 
							
						 
						
							2009-08-09 18:26:27 +00:00  
						
					 
				
					
						
							
							
								 
								Nate Begeman
							
						 
						
							 
							
							
							
							
								
							
							
								a96114ed08 
								
							 
						 
						
							
							
								
								AltiVec-style vector initializer syntax, vec4 a = (vec4)(a, b, c, d);  
							
							 
							
							... 
							
							
							
							In addition to being defined by the AltiVec PIM, this is also the vector
initializer syntax used by OpenCL, so that vector literals are compatible
with macro arguments.
llvm-svn: 78535 
							
						 
						
							2009-08-09 17:55:44 +00:00  
						
					 
				
					
						
							
							
								 
								Benjamin Kramer
							
						 
						
							 
							
							
							
							
								
							
							
								b57e5d2f4f 
								
							 
						 
						
							
							
								
								Older GCCs don't have vector::data().  
							
							 
							
							... 
							
							
							
							llvm-svn: 78519 
							
						 
						
							2009-08-08 23:43:26 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								24f38969d5 
								
							 
						 
						
							
							
								
								ir-gen for initialization, in synthesize copy constructor,  
							
							 
							
							... 
							
							
							
							of base/field which have trivial copy constructor.
llvm-svn: 78516 
							
						 
						
							2009-08-08 23:32:22 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								b8be93fc92 
								
							 
						 
						
							
							
								
								Add support for global initializers.  
							
							 
							
							... 
							
							
							
							llvm-svn: 78515 
							
						 
						
							2009-08-08 23:24:23 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								f40886acca 
								
							 
						 
						
							
							
								
								Refactor some code and implement support for global destructors for static variables.  
							
							 
							
							... 
							
							
							
							llvm-svn: 78507 
							
						 
						
							2009-08-08 21:45:14 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								28a5fa29f3 
								
							 
						 
						
							
							
								
								Take #pragma pack into account when laying out structs. Fixes rdar://problem/7095436.  
							
							 
							
							... 
							
							
							
							llvm-svn: 78490 
							
						 
						
							2009-08-08 19:38:24 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								f6bda5d61e 
								
							 
						 
						
							
							
								
								Refactoring of copy ctor ir-gen. No change in functionality.  
							
							 
							
							... 
							
							
							
							llvm-svn: 78489 
							
						 
						
							2009-08-08 19:31:03 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								68e0b68289 
								
							 
						 
						
							
							
								
								Introduce a new PragmaPack attribute, and use it for #pragma pack. The PackedAttr now only represents __attribute__((packed)).  
							
							 
							
							... 
							
							
							
							This is necessary because #pragma pack and __attribute__((packed)) have different semantics. No functionality change yet, but this lays the groundwork for fixing a record layout bug.
llvm-svn: 78483 
							
						 
						
							2009-08-08 18:23:56 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								453878bed4 
								
							 
						 
						
							
							
								
								Assert that the LLVM type has the same size as the RecordDecl size.  
							
							 
							
							... 
							
							
							
							llvm-svn: 78481 
							
						 
						
							2009-08-08 18:01:57 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								7c3d7f6c59 
								
							 
						 
						
							
							
								
								Remove use of uninitized variable.  
							
							 
							
							... 
							
							
							
							llvm-svn: 78448 
							
						 
						
							2009-08-08 00:59:58 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								59b3259284 
								
							 
						 
						
							
							
								
								Synthesize copying of non-static data members with  
							
							 
							
							... 
							
							
							
							non-trivial copy constructors.
llvm-svn: 78445 
							
						 
						
							2009-08-08 00:15:41 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								b68df0bc42 
								
							 
						 
						
							
							
								
								Synthesized copy constructor now generates code for  
							
							 
							
							... 
							
							
							
							copying non-virtual base classes which have non-trivial
constructor. Work in progress.
llvm-svn: 78436 
							
						 
						
							2009-08-07 23:51:33 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								8fc489da2a 
								
							 
						 
						
							
							
								
								Add a CK_ArrayToPointerDecay cast kind.  
							
							 
							
							... 
							
							
							
							llvm-svn: 78434 
							
						 
						
							2009-08-07 23:48:20 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								ec143777ba 
								
							 
						 
						
							
							
								
								Add CK_ToUnion and use it for aggregate expression codegen.  
							
							 
							
							... 
							
							
							
							llvm-svn: 78429 
							
						 
						
							2009-08-07 23:22:37 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								16644668cd 
								
							 
						 
						
							
							
								
								Add vbase offsets to the vtable.  Wow, having an rbegin was so  
							
							 
							
							... 
							
							
							
							fortuitous.  WIP.
llvm-svn: 78413 
							
						 
						
							2009-08-07 21:54:03 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								40134e71be 
								
							 
						 
						
							
							
								
								More synthesis of copy constructors. Work in progress.  
							
							 
							
							... 
							
							
							
							llvm-svn: 78402 
							
						 
						
							2009-08-07 20:22:40 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								a4d94b1a95 
								
							 
						 
						
							
							
								
								Fix typo.  
							
							 
							
							... 
							
							
							
							llvm-svn: 78401 
							
						 
						
							2009-08-07 20:14:05 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								c266c6d797 
								
							 
						 
						
							
							
								
								Add ability to generate vcall offsets for primary virtual base.  
							
							 
							
							... 
							
							
							
							llvm-svn: 78396 
							
						 
						
							2009-08-07 19:00:50 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								b93185d05a 
								
							 
						 
						
							
							
								
								Fix some const_cast issues.  This is the beginning of the rabbit hole.  
							
							 
							
							... 
							
							
							
							llvm-svn: 78393 
							
						 
						
							2009-08-07 18:05:12 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								7c32eab164 
								
							 
						 
						
							
							
								
								Add support for vcall generation for vtables for virtual bases.  WIP.  
							
							 
							
							... 
							
							
							
							llvm-svn: 78357 
							
						 
						
							2009-08-06 23:48:32 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								9301b24c0a 
								
							 
						 
						
							
							
								
								Patch toward synthesizing copy constructors.  
							
							 
							
							... 
							
							
							
							Work in progress.
llvm-svn: 78355 
							
						 
						
							2009-08-06 23:38:16 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								3e62d00271 
								
							 
						 
						
							
							
								
								Also generate the rtti field for virtual bases for vtables.  Turn on  
							
							 
							
							... 
							
							
							
							rtti so we can properly test it.  Refactor code a little.  Still a
work in progress.
llvm-svn: 78343 
							
						 
						
							2009-08-06 21:49:36 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								001309371e 
								
							 
						 
						
							
							
								
								Set and use Elidable in elimination of copy ctors.  
							
							 
							
							... 
							
							
							
							llvm-svn: 78331 
							
						 
						
							2009-08-06 19:12:38 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								2d8d655922 
								
							 
						 
						
							
							
								
								Layout the primary base first in the vtable.  
							
							 
							
							... 
							
							
							
							llvm-svn: 78327 
							
						 
						
							2009-08-06 18:05:22 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								c255f3581a 
								
							 
						 
						
							
							
								
								More layout for virtual tables for virtual bases.  Still in progress.  
							
							 
							
							... 
							
							
							
							llvm-svn: 78314 
							
						 
						
							2009-08-06 15:50:11 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								6b2556f829 
								
							 
						 
						
							
							
								
								Layout virtual bases.  Work in progress.  
							
							 
							
							... 
							
							
							
							llvm-svn: 78308 
							
						 
						
							2009-08-06 13:41:24 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								f1ad6b7064 
								
							 
						 
						
							
							
								
								Fix clang breakage, CGF can be null in this context.  
							
							 
							
							... 
							
							
							
							llvm-svn: 78269 
							
						 
						
							2009-08-06 01:24:27 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								eb869768f9 
								
							 
						 
						
							
							
								
								Patch to optimize away copy constructor call when  
							
							 
							
							... 
							
							
							
							appropriate.
llvm-svn: 78267 
							
						 
						
							2009-08-06 01:02:49 +00:00  
						
					 
				
					
						
							
							
								 
								Owen Anderson
							
						 
						
							 
							
							
							
							
								
							
							
								758428f4e3 
								
							 
						 
						
							
							
								
								Update for LLVM API change.  
							
							 
							
							... 
							
							
							
							llvm-svn: 78259 
							
						 
						
							2009-08-05 23:18:46 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								a19718af5a 
								
							 
						 
						
							
							
								
								Refactor some bits.  
							
							 
							
							... 
							
							
							
							llvm-svn: 78254 
							
						 
						
							2009-08-05 22:59:44 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								d8fe7b2792 
								
							 
						 
						
							
							
								
								Calculate the primary base class better and use that when laying down  
							
							 
							
							... 
							
							
							
							the vtable.  Still a work in progress.
llvm-svn: 78252 
							
						 
						
							2009-08-05 22:37:18 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								c58e5699be 
								
							 
						 
						
							
							
								
								cgobjcgnu was making invalid common globals.  
							
							 
							
							... 
							
							
							
							llvm-svn: 78161 
							
						 
						
							2009-08-05 05:25:18 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								f49573d1ee 
								
							 
						 
						
							
							
								
								weak globals that are const should get weak_odr linkage.  
							
							 
							
							... 
							
							
							
							add a fixme about C++ const.
llvm-svn: 78159 
							
						 
						
							2009-08-05 05:20:29 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								c0693bc2ea 
								
							 
						 
						
							
							
								
								rdar://7119244 - globals with an explicit section specified don't get  
							
							 
							
							... 
							
							
							
							common linkage.
llvm-svn: 78158 
							
						 
						
							2009-08-05 04:56:58 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								9beac787c1 
								
							 
						 
						
							
							
								
								vtable building for simple inheritance.  Still in progress.  
							
							 
							
							... 
							
							
							
							llvm-svn: 78110 
							
						 
						
							2009-08-04 21:58:42 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								7551d05358 
								
							 
						 
						
							
							
								
								Will I ever get used to CamelCase?  Will I ever like capitols for  
							
							 
							
							... 
							
							
							
							random variables?
  --This line, and those below, will be ignored--
M    lib/CodeGen/CGCXX.cpp
llvm-svn: 78094 
							
						 
						
							2009-08-04 20:06:48 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								5638895b2a 
								
							 
						 
						
							
							
								
								Revert the fix for PR3800, it broke things.  
							
							 
							
							... 
							
							
							
							llvm-svn: 78084 
							
						 
						
							2009-08-04 18:18:36 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								19702bb054 
								
							 
						 
						
							
							
								
								Simplify alignment handling in the record builder.  
							
							 
							
							... 
							
							
							
							llvm-svn: 78069 
							
						 
						
							2009-08-04 16:29:15 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								4d93a4f9d4 
								
							 
						 
						
							
							
								
								Make sure UTF-16 strings end with a 16-bit null (as opposed to 8-bit).  
							
							 
							
							... 
							
							
							
							llvm-svn: 78001 
							
						 
						
							2009-08-03 21:47:08 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								a1d8bcd33e 
								
							 
						 
						
							
							
								
								When generating cleanup blocks for Obj-C  @finally , mark them as catch all blocks  
							
							 
							
							... 
							
							
							
							from the perspective of LLVM exception handling. Otherwise the C++ personality
function may decide not to run them, if it only detects cleanup handlers.
 - Test case for this is exceptions.m in llvm-test.
llvm-svn: 77999 
							
						 
						
							2009-08-03 21:20:07 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								d44bdb2926 
								
							 
						 
						
							
							
								
								assert(nyi) on attempt to destruct an array of objects.  
							
							 
							
							... 
							
							
							
							llvm-svn: 77993 
							
						 
						
							2009-08-03 20:51:29 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								18c062361d 
								
							 
						 
						
							
							
								
								ir-gen for destructor calls.  
							
							 
							
							... 
							
							
							
							llvm-svn: 77991 
							
						 
						
							2009-08-03 20:20:07 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								59e476b1b9 
								
							 
						 
						
							
							
								
								Formatting fixes (trailing whitespace, 80-cols, indentation).  
							
							 
							
							... 
							
							
							
							llvm-svn: 77972 
							
						 
						
							2009-08-03 17:06:42 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								59a9468b22 
								
							 
						 
						
							
							
								
								Whoops, meant to delete this.  
							
							 
							
							... 
							
							
							
							llvm-svn: 77916 
							
						 
						
							2009-08-02 21:34:52 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								f18318cf4e 
								
							 
						 
						
							
							
								
								use CodeGenModule::EmitNullConstant in a couple of places.  
							
							 
							
							... 
							
							
							
							llvm-svn: 77915 
							
						 
						
							2009-08-02 21:18:22 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								44616ce317 
								
							 
						 
						
							
							
								
								Remove old code that was causing the new test to fail.  
							
							 
							
							... 
							
							
							
							llvm-svn: 77862 
							
						 
						
							2009-08-02 04:17:43 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								7df966e040 
								
							 
						 
						
							
							
								
								Don't evaluate inout constraints twice. Fixes PR3800.  
							
							 
							
							... 
							
							
							
							llvm-svn: 77854 
							
						 
						
							2009-08-02 03:40:19 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								4074b93184 
								
							 
						 
						
							
							
								
								Use Twine instead of utostr  
							
							 
							
							... 
							
							
							
							llvm-svn: 77848 
							
						 
						
							2009-08-02 01:43:57 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								62561fe9b0 
								
							 
						 
						
							
							
								
								Fix a minor issue with unions in the new struct building code.  
							
							 
							
							... 
							
							
							
							llvm-svn: 77829 
							
						 
						
							2009-08-01 23:11:24 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								e480ce3d29 
								
							 
						 
						
							
							
								
								Don't error on C++ linkage; if we don't support that, there are  
							
							 
							
							... 
							
							
							
							serious issues :)
llvm-svn: 77800 
							
						 
						
							2009-08-01 20:48:04 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								183c3d2f59 
								
							 
						 
						
							
							
								
								Add beginnigs of rtti generation, wire up more of -fno-exceptions.  
							
							 
							
							... 
							
							
							
							llvm-svn: 77751 
							
						 
						
							2009-07-31 23:15:31 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								1726aaa4fc 
								
							 
						 
						
							
							
								
								Remove the old struct builder code.  
							
							 
							
							... 
							
							
							
							llvm-svn: 77738 
							
						 
						
							2009-07-31 21:48:56 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								67829f6493 
								
							 
						 
						
							
							
								
								And now we can generate a simple vtable.  Still a work in progress...  
							
							 
							
							... 
							
							
							
							llvm-svn: 77737 
							
						 
						
							2009-07-31 21:43:43 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								d65ab045e8 
								
							 
						 
						
							
							
								
								Move code from EmitUnion directly into the function that handles cast-to-union.  
							
							 
							
							... 
							
							
							
							llvm-svn: 77735 
							
						 
						
							2009-07-31 21:38:39 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								0d5f37b81a 
								
							 
						 
						
							
							
								
								Use the struct builder for unions.  
							
							 
							
							... 
							
							
							
							llvm-svn: 77732 
							
						 
						
							2009-07-31 21:34:04 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								dd93a19ac6 
								
							 
						 
						
							
							
								
								Fixup spacing and 80-col violations.  
							
							 
							
							... 
							
							
							
							llvm-svn: 77731 
							
						 
						
							2009-07-31 21:31:32 +00:00  
						
					 
				
					
						
							
							
								 
								Owen Anderson
							
						 
						
							 
							
							
							
							
								
							
							
								0b75f23b94 
								
							 
						 
						
							
							
								
								Update for LLVM API change.  
							
							 
							
							... 
							
							
							
							llvm-svn: 77722 
							
						 
						
							2009-07-31 20:28:54 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								bc78a728ee 
								
							 
						 
						
							
							
								
								Add code to setup the vtable pointer in the constructor.  Work in progress.  
							
							 
							
							... 
							
							
							
							llvm-svn: 77699 
							
						 
						
							2009-07-31 18:25:34 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								f332516136 
								
							 
						 
						
							
							
								
								Fix spacing.  
							
							 
							
							... 
							
							
							
							llvm-svn: 77688 
							
						 
						
							2009-07-31 17:46:44 +00:00  
						
					 
				
					
						
							
							
								 
								Owen Anderson
							
						 
						
							 
							
							
							
							
								
							
							
								fe4e34707c 
								
							 
						 
						
							
							
								
								Update for LLVM API change.  
							
							 
							
							... 
							
							
							
							llvm-svn: 77686 
							
						 
						
							2009-07-31 17:39:36 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								6f14c73087 
								
							 
						 
						
							
							
								
								Synthesize the default constructor which has not  
							
							 
							
							... 
							
							
							
							been declared as needed.
llvm-svn: 77641 
							
						 
						
							2009-07-30 23:22:00 +00:00  
						
					 
				
					
						
							
							
								 
								Owen Anderson
							
						 
						
							 
							
							
							
							
								
							
							
								7ec07a573c 
								
							 
						 
						
							
							
								
								Update for LLVM API changes.  
							
							 
							
							... 
							
							
							
							llvm-svn: 77638 
							
						 
						
							2009-07-30 23:11:26 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								658fe02d17 
								
							 
						 
						
							
							
								
								Canonicalize else spacing.  
							
							 
							
							... 
							
							
							
							llvm-svn: 77629 
							
						 
						
							2009-07-30 22:28:39 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								a523b2d7a0 
								
							 
						 
						
							
							
								
								Note some other limitations.  
							
							 
							
							... 
							
							
							
							llvm-svn: 77626 
							
						 
						
							2009-07-30 21:47:44 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								aa01d2a532 
								
							 
						 
						
							
							
								
								Patch for future ir-gen for destructor calls.  
							
							 
							
							... 
							
							
							
							llvm-svn: 77608 
							
						 
						
							2009-07-30 17:49:11 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								e8caa2a72f 
								
							 
						 
						
							
							
								
								Remove bogus "unsupported" case for vectors (which shouldn't  
							
							 
							
							... 
							
							
							
							ever trigger).  Add an "unsupported" case that triggers for C++ code.
It would be nice if someone would implement this properly... it 
shouldn't be too hard, but I haven't looked closely at the relevant 
code.
llvm-svn: 77562 
							
						 
						
							2009-07-30 01:10:26 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								3dc7eb9440 
								
							 
						 
						
							
							
								
								Add ability to layout the vtable pointer in trivial cases.  I noticed  
							
							 
							
							... 
							
							
							
							that we would silently do bad things with virtual bases in the layout
code, so, we just turn them off.  When people do better things with
them, we can turn them back on.
llvm-svn: 77556 
							
						 
						
							2009-07-30 00:22:38 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								d375454dcf 
								
							 
						 
						
							
							
								
								ir-gen for nested non-virtual base member access  
							
							 
							
							... 
							
							
							
							in current class.
llvm-svn: 77554 
							
						 
						
							2009-07-30 00:10:25 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								716dabbb1b 
								
							 
						 
						
							
							
								
								Eliminate an unused-variable warning  
							
							 
							
							... 
							
							
							
							llvm-svn: 77518 
							
						 
						
							2009-07-29 22:40:58 +00:00  
						
					 
				
					
						
							
							
								 
								Owen Anderson
							
						 
						
							 
							
							
							
							
								
							
							
								9793f0e4d7 
								
							 
						 
						
							
							
								
								Update for LLVM API change.  
							
							 
							
							... 
							
							
							
							llvm-svn: 77514 
							
						 
						
							2009-07-29 22:16:19 +00:00  
						
					 
				
					
						
							
							
								 
								Ted Kremenek
							
						 
						
							 
							
							
							
							
								
							
							
								c23c7e6a51 
								
							 
						 
						
							
							
								
								Change uses of:  
							
							 
							
							... 
							
							
							
							Type::getAsReferenceType() -> Type::getAs<ReferenceType>()
  Type::getAsRecordType() -> Type::getAs<RecordType>()
  Type::getAsPointerType() -> Type::getAs<PointerType>()
  Type::getAsBlockPointerType() -> Type::getAs<BlockPointerType>()
  Type::getAsLValueReferenceType() -> Type::getAs<LValueReferenceType>()
  Type::getAsRValueReferenceType() -> Type::getAs<RValueReferenceType>()
  Type::getAsMemberPointerType() -> Type::getAs<MemberPointerType>()
  Type::getAsReferenceType() -> Type::getAs<ReferenceType>()
  Type::getAsTagType() -> Type::getAs<TagType>()
  
And remove Type::getAsReferenceType(), etc.
This change is similar to one I made a couple weeks ago, but that was partly
reverted pending some additional design discussion. With Doug's pending smart
pointer changes for Types, it seemed natural to take this approach.
llvm-svn: 77510 
							
						 
						
							2009-07-29 21:53:49 +00:00  
						
					 
				
					
						
							
							
								 
								Owen Anderson
							
						 
						
							 
							
							
							
							
								
							
							
								ade90fd1ba 
								
							 
						 
						
							
							
								
								Update for LLVM API change.  
							
							 
							
							... 
							
							
							
							llvm-svn: 77492 
							
						 
						
							2009-07-29 18:54:39 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								7be1ad814b 
								
							 
						 
						
							
							
								
								No longer need to keep base class offsets in the offset  
							
							 
							
							... 
							
							
							
							table as it has its own place now.
llvm-svn: 77491 
							
						 
						
							2009-07-29 18:50:06 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								bb67b827d9 
								
							 
						 
						
							
							
								
								Patch to provide cast of objects in member access  
							
							 
							
							... 
							
							
							
							excpression, if needed, and remove some ir-gen code
now unnencessary.
llvm-svn: 77490 
							
						 
						
							2009-07-29 18:40:24 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								72b1f24bd2 
								
							 
						 
						
							
							
								
								Use the existing API for base offset. Use suitable llvm type  
							
							 
							
							... 
							
							
							
							for offset ir-gen.
llvm-svn: 77458 
							
						 
						
							2009-07-29 15:54:56 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								82e2874270 
								
							 
						 
						
							
							
								
								Code refactoring to define getCXXRecordDeclForPointerType  
							
							 
							
							... 
							
							
							
							and use it in several places.
llvm-svn: 77411 
							
						 
						
							2009-07-29 00:44:13 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								f17071580f 
								
							 
						 
						
							
							
								
								ir-gen derived-to-base conversion in implicit casts.  
							
							 
							
							... 
							
							
							
							llvm-svn: 77374 
							
						 
						
							2009-07-28 22:00:58 +00:00  
						
					 
				
					
						
							
							
								 
								Owen Anderson
							
						 
						
							 
							
							
							
							
								
							
							
								3cc120a51e 
								
							 
						 
						
							
							
								
								Update for LLVM API change.  
							
							 
							
							... 
							
							
							
							llvm-svn: 77368 
							
						 
						
							2009-07-28 21:22:35 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								019f414261 
								
							 
						 
						
							
							
								
								Remove the old RecordOrganizer.  
							
							 
							
							... 
							
							
							
							llvm-svn: 77365 
							
						 
						
							2009-07-28 21:03:34 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								a399dfae19 
								
							 
						 
						
							
							
								
								More cleanup of data member access and then some.  
							
							 
							
							... 
							
							
							
							llvm-svn: 77351 
							
						 
						
							2009-07-28 18:54:57 +00:00  
						
					 
				
					
						
							
							
								 
								Owen Anderson
							
						 
						
							 
							
							
							
							
								
							
							
								47034e1733 
								
							 
						 
						
							
							
								
								Update for LLVM API change.  
							
							 
							
							... 
							
							
							
							llvm-svn: 77349 
							
						 
						
							2009-07-28 18:33:04 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								1d0f16f22a 
								
							 
						 
						
							
							
								
								add some fixme's  
							
							 
							
							... 
							
							
							
							llvm-svn: 77343 
							
						 
						
							2009-07-28 18:25:06 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								b77659f4ae 
								
							 
						 
						
							
							
								
								Some code cleanup.  
							
							 
							
							... 
							
							
							
							llvm-svn: 77339 
							
						 
						
							2009-07-28 18:09:28 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								d5d6413aa5 
								
							 
						 
						
							
							
								
								More CGRecordLayoutBuilder cleanup.  
							
							 
							
							... 
							
							
							
							llvm-svn: 77335 
							
						 
						
							2009-07-28 17:56:36 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								5142fbd02e 
								
							 
						 
						
							
							
								
								More work toward data member access ir-gen.  
							
							 
							
							... 
							
							
							
							llvm-svn: 77332 
							
						 
						
							2009-07-28 17:38:28 +00:00  
						
					 
				
					
						
							
							
								 
								John McCall
							
						 
						
							 
							
							
							
							
								
							
							
								caa1945306 
								
							 
						 
						
							
							
								
								Allow functions to be marked "implicit return zero" and so mark main().  
							
							 
							
							... 
							
							
							
							Codegen by initializing the return value with its LLVM type's null value.
llvm-svn: 77288 
							
						 
						
							2009-07-28 01:00:58 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								e309b48a22 
								
							 
						 
						
							
							
								
								Patch for objc's zero-const exception to not assume  
							
							 
							
							... 
							
							
							
							that @catch(...) cathces all exceptions (c++ objects
are not cought by that).
llvm-svn: 77270 
							
						 
						
							2009-07-27 23:12:41 +00:00  
						
					 
				
					
						
							
							
								 
								Owen Anderson
							
						 
						
							 
							
							
							
							
								
							
							
								0e0189d64d 
								
							 
						 
						
							
							
								
								Update for LLVM API change.  
							
							 
							
							... 
							
							
							
							llvm-svn: 77267 
							
						 
						
							2009-07-27 22:29:56 +00:00  
						
					 
				
					
						
							
							
								 
								Owen Anderson
							
						 
						
							 
							
							
							
							
								
							
							
								e05f2ed478 
								
							 
						 
						
							
							
								
								Update for LLVM API change.  
							
							 
							
							... 
							
							
							
							llvm-svn: 77249 
							
						 
						
							2009-07-27 21:00:51 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								7b2b1ec6b1 
								
							 
						 
						
							
							
								
								Some minor changes toward support of data  
							
							 
							
							... 
							
							
							
							member access in the presense of non-virtual bases.
llvm-svn: 77246 
							
						 
						
							2009-07-27 20:57:45 +00:00  
						
					 
				
					
						
							
							
								 
								Devang Patel
							
						 
						
							 
							
							
							
							
								
							
							
								6a3b3fe98a 
								
							 
						 
						
							
							
								
								Use DICompositeType->replaceAllUsesWith()  
							
							 
							
							... 
							
							
							
							llvm-svn: 77228 
							
						 
						
							2009-07-27 18:42:03 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								cabdeb4932 
								
							 
						 
						
							
							
								
								Use the CGRecordLayoutBuilder even if there are no fields, because in C++ an empty class will have a padding byte.  
							
							 
							
							... 
							
							
							
							llvm-svn: 77205 
							
						 
						
							2009-07-27 17:10:54 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								72fb384a65 
								
							 
						 
						
							
							
								
								Enable the new struct type builder now that the constant struct builder works. (The old code will still be there until we know that everything works well.  
							
							 
							
							... 
							
							
							
							llvm-svn: 77190 
							
						 
						
							2009-07-27 15:31:55 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								b97a3ec4e7 
								
							 
						 
						
							
							
								
								Fix a tail padding bug in the record layout builder code. The bug was found by an existing test.  
							
							 
							
							... 
							
							
							
							llvm-svn: 77189 
							
						 
						
							2009-07-27 14:55:54 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								b7130ed888 
								
							 
						 
						
							
							
								
								Enable the new constant struct builder by default. The old code is still in place but will be removed shortly. The new struct builder works on big endian systems.  
							
							 
							
							... 
							
							
							
							llvm-svn: 77185 
							
						 
						
							2009-07-27 05:54:15 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								bff6b49cd0 
								
							 
						 
						
							
							
								
								More work on the constant struct builder, fix a couple of thinkos and add support for inserting part of a bitfield in the previous byte.  
							
							 
							
							... 
							
							
							
							llvm-svn: 77180 
							
						 
						
							2009-07-27 02:56:37 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								ba4c6d1c91 
								
							 
						 
						
							
							
								
								More work on bitfield support in the new constant struct builder.  
							
							 
							
							... 
							
							
							
							llvm-svn: 77177 
							
						 
						
							2009-07-27 01:23:51 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								e59313a298 
								
							 
						 
						
							
							
								
								Switch to getName()  
							
							 
							
							... 
							
							
							
							llvm-svn: 77151 
							
						 
						
							2009-07-26 09:28:40 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								600dfac30a 
								
							 
						 
						
							
							
								
								Switch to using llvm::Value::getName()  
							
							 
							
							... 
							
							
							
							llvm-svn: 77147 
							
						 
						
							2009-07-26 08:32:30 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								dedf1e4b1a 
								
							 
						 
						
							
							
								
								ir-gen for non-virtual base class initialization  
							
							 
							
							... 
							
							
							
							in constructors.
llvm-svn: 77087 
							
						 
						
							2009-07-25 21:12:28 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								3b484b928d 
								
							 
						 
						
							
							
								
								More work on the constant struct builder. We can now convert the struct to a packed struct when necessary.  
							
							 
							
							... 
							
							
							
							llvm-svn: 77038 
							
						 
						
							2009-07-25 01:40:29 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								87a9a34e5b 
								
							 
						 
						
							
							
								
								More work on the constant struct builder. We now try to layout all constant structs but throw away the result.  
							
							 
							
							... 
							
							
							
							llvm-svn: 77021 
							
						 
						
							2009-07-25 00:24:56 +00:00  
						
					 
				
					
						
							
							
								 
								Owen Anderson
							
						 
						
							 
							
							
							
							
								
							
							
								b7a2fe6f81 
								
							 
						 
						
							
							
								
								Update for LLVM API change.  
							
							 
							
							... 
							
							
							
							llvm-svn: 77012 
							
						 
						
							2009-07-24 23:12:58 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								5e66fb5d16 
								
							 
						 
						
							
							
								
								Fix a release build warning.  
							
							 
							
							... 
							
							
							
							llvm-svn: 76985 
							
						 
						
							2009-07-24 18:20:38 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								2a1b5af130 
								
							 
						 
						
							
							
								
								More work toward initialization of objects  
							
							 
							
							... 
							
							
							
							in constructors.
llvm-svn: 76980 
							
						 
						
							2009-07-24 17:57:02 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								e2c6baf629 
								
							 
						 
						
							
							
								
								Don't use getLLVMFieldNo for bitfields when constructing the ivar layout maps for GC.  
							
							 
							
							... 
							
							
							
							llvm-svn: 76978 
							
						 
						
							2009-07-24 17:23:54 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								e1d5ca583f 
								
							 
						 
						
							
							
								
								Check in a half finished new constant struct builder (Obviously not used yet).  
							
							 
							
							... 
							
							
							
							llvm-svn: 76969 
							
						 
						
							2009-07-24 15:20:52 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								c46a079957 
								
							 
						 
						
							
							
								
								Fix declaration of obc_enumerationMutation function, for GNU runtime.  
							
							 
							
							... 
							
							
							
							llvm-svn: 76959 
							
						 
						
							2009-07-24 07:40:24 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								6e853bf2b7 
								
							 
						 
						
							
							
								
								Get rid of the size parameter to AppendField. No functionality change.  
							
							 
							
							... 
							
							
							
							llvm-svn: 76931 
							
						 
						
							2009-07-24 02:45:50 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								91ade14197 
								
							 
						 
						
							
							
								
								Output UTF-16 string literals independent of host byte order.  
							
							 
							
							... 
							
							
							
							- Steve, can you take a look at this? It seems like this code should live
   elsewhere, and there is a FIXME about having Sema validates the UTF-8 to
   UTF-16 conversion.
llvm-svn: 76915 
							
						 
						
							2009-07-23 23:41:22 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								64509b2765 
								
							 
						 
						
							
							
								
								Factor out map lookup for CFString constants.  
							
							 
							
							... 
							
							
							
							llvm-svn: 76908 
							
						 
						
							2009-07-23 22:52:48 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								085395426c 
								
							 
						 
						
							
							
								
								Don't just store the field/bit field info one field, do it for all fields in the union.  
							
							 
							
							... 
							
							
							
							llvm-svn: 76907 
							
						 
						
							2009-07-23 22:52:34 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								e2accf4404 
								
							 
						 
						
							
							
								
								Fix another thinko.  
							
							 
							
							... 
							
							
							
							llvm-svn: 76903 
							
						 
						
							2009-07-23 21:52:03 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								516e5e7835 
								
							 
						 
						
							
							
								
								Correct a  thinko in bitfield layout code. Fixes PR4611.  
							
							 
							
							... 
							
							
							
							llvm-svn: 76898 
							
						 
						
							2009-07-23 21:16:33 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								2a5b83c7e6 
								
							 
						 
						
							
							
								
								Simplify, NFC.  
							
							 
							
							... 
							
							
							
							llvm-svn: 76897 
							
						 
						
							2009-07-23 20:38:28 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								635d481de0 
								
							 
						 
						
							
							
								
								Simplify.  
							
							 
							
							... 
							
							
							
							llvm-svn: 76885 
							
						 
						
							2009-07-23 17:33:49 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								d78fc89fcb 
								
							 
						 
						
							
							
								
								We don't need to keep track of the packed alignment, just whether the struct is packed or not. Fixes PR4610.  
							
							 
							
							... 
							
							
							
							llvm-svn: 76884 
							
						 
						
							2009-07-23 17:24:40 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								8af896c10a 
								
							 
						 
						
							
							
								
								Move the LLVM field number for bit fields into the BitFieldInfo structure, since it's meaning is completely different than for non-bit fields.  
							
							 
							
							... 
							
							
							
							llvm-svn: 76882 
							
						 
						
							2009-07-23 17:01:21 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								2aff97c9e6 
								
							 
						 
						
							
							
								
								Unbreak the CMake build  
							
							 
							
							... 
							
							
							
							llvm-svn: 76878 
							
						 
						
							2009-07-23 15:15:06 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								7c02cf609d 
								
							 
						 
						
							
							
								
								Shield clang from LLVM API changes, until the dust settles.  
							
							 
							
							... 
							
							
							
							llvm-svn: 76862 
							
						 
						
							2009-07-23 05:30:36 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								f55922b8b8 
								
							 
						 
						
							
							
								
								Set field info for unions.  
							
							 
							
							... 
							
							
							
							llvm-svn: 76856 
							
						 
						
							2009-07-23 04:59:05 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								718a89a501 
								
							 
						 
						
							
							
								
								Use arrays as union padding. Also, since the resulting struct will always contain a single element and either a single i8 element or an array of i8s, there's no reason to use a packed struct.  
							
							 
							
							... 
							
							
							
							llvm-svn: 76854 
							
						 
						
							2009-07-23 04:50:01 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								f814ee6003 
								
							 
						 
						
							
							
								
								Handle zero width bit fields in unions correctly (by ignoring them).  
							
							 
							
							... 
							
							
							
							llvm-svn: 76847 
							
						 
						
							2009-07-23 04:00:39 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								697f65943d 
								
							 
						 
						
							
							
								
								Implement union layout support.  
							
							 
							
							... 
							
							
							
							llvm-svn: 76846 
							
						 
						
							2009-07-23 03:43:54 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								307846fe67 
								
							 
						 
						
							
							
								
								Check in  CGRecordLayoutBuilder which is a reimplementation of the record layout code. (Yay, no more packed structs unless absolutely necessary). We currently don't use the layouts being built but that will change when the new code is mature enough :)  
							
							 
							
							... 
							
							
							
							llvm-svn: 76845 
							
						 
						
							2009-07-23 03:17:50 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								a244814e6f 
								
							 
						 
						
							
							
								
								These IRgen improvements have been done.  
							
							 
							
							... 
							
							
							
							Technically we could still do a bit more to avoid deferred generation of statics
which we know are used, but I seriously doubt this is important.
llvm-svn: 76844 
							
						 
						
							2009-07-23 03:03:07 +00:00  
						
					 
				
					
						
							
							
								 
								Devang Patel
							
						 
						
							 
							
							
							
							
								
							
							
								06cceef545 
								
							 
						 
						
							
							
								
								Use DICompositeType->replaceAllUsesWith().  
							
							 
							
							... 
							
							
							
							This requires llvm rev. 76769 or higher.
llvm-svn: 76770 
							
						 
						
							2009-07-22 18:57:00 +00:00  
						
					 
				
					
						
							
							
								 
								Steve Naroff
							
						 
						
							 
							
							
							
							
								
							
							
								3de6b70730 
								
							 
						 
						
							
							
								
								Fix a couple recent ABI regressions noticed during code review (fallout from the ObjC type system rewrite).  
							
							 
							
							... 
							
							
							
							It's unfortunate that the mangling includes the low-level structs. Nevertheless, we need this for binary compatibility with GCC.
llvm-svn: 76755 
							
						 
						
							2009-07-22 17:14:51 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								5ac69057c0 
								
							 
						 
						
							
							
								
								Make vectorized floating-point comparisons work without crashing.  
							
							 
							
							... 
							
							
							
							llvm-svn: 76726 
							
						 
						
							2009-07-22 06:07:16 +00:00  
						
					 
				
					
						
							
							
								 
								Mon P Wang
							
						 
						
							 
							
							
							
							
								
							
							
								acedf7768f 
								
							 
						 
						
							
							
								
								Preserve address space information through member accesses, e.g.,  
							
							 
							
							... 
							
							
							
							__attribute__((address_space(1))) struct {int arr[ 3 ]; }  *p1;
   ... = p1->arr[2];  // load from address space 1
llvm-svn: 76717 
							
						 
						
							2009-07-22 03:08:17 +00:00  
						
					 
				
					
						
							
							
								 
								Owen Anderson
							
						 
						
							 
							
							
							
							
								
							
							
								a265a3876c 
								
							 
						 
						
							
							
								
								Update for LLVM API change.  
							
							 
							
							... 
							
							
							
							llvm-svn: 76599 
							
						 
						
							2009-07-21 18:06:41 +00:00  
						
					 
				
					
						
							
							
								 
								Owen Anderson
							
						 
						
							 
							
							
							
							
								
							
							
								f319a7d6e7 
								
							 
						 
						
							
							
								
								Update for LLVM API change.  
							
							 
							
							... 
							
							
							
							llvm-svn: 76534 
							
						 
						
							2009-07-21 02:57:15 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								83381cc9a6 
								
							 
						 
						
							
							
								
								Move EmitCtorPrologue to CGCXX. Add an assert and FIXMEs.  
							
							 
							
							... 
							
							
							
							llvm-svn: 76498 
							
						 
						
							2009-07-20 23:18:55 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								127059c7ec 
								
							 
						 
						
							
							
								
								Early ir-gen for constructor prologue. This is on going.  
							
							 
							
							... 
							
							
							
							llvm-svn: 76493 
							
						 
						
							2009-07-20 22:35:22 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								94e12450aa 
								
							 
						 
						
							
							
								
								Remove an apparently unused header.  
							
							 
							
							... 
							
							
							
							llvm-svn: 76473 
							
						 
						
							2009-07-20 21:17:53 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								ea3060a9e5 
								
							 
						 
						
							
							
								
								Catch another trivial case where we can avoid emitting a separate return blcok.  
							
							 
							
							... 
							
							
							
							llvm-svn: 76365 
							
						 
						
							2009-07-19 08:24:34 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								c3ab4c6c98 
								
							 
						 
						
							
							
								
								Detect when the current generation point is unreachable after emitting  
							
							 
							
							... 
							
							
							
							expressions.
 - This generally catches the important case of noreturn functions.
 - With the last two changes, we are down to 152 unreachable blocks emitted on
   403.gcc, vs the 1805 we started with.
llvm-svn: 76364 
							
						 
						
							2009-07-19 08:23:12 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								669521c97c 
								
							 
						 
						
							
							
								
								Fix thinko.  
							
							 
							
							... 
							
							
							
							llvm-svn: 76362 
							
						 
						
							2009-07-19 07:03:11 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								b6adc43f6e 
								
							 
						 
						
							
							
								
								Avoid generation of dead code in a few more situations.  
							
							 
							
							... 
							
							
							
							- Emit variable declarations as "simple", we want to avoid forcing the creation
   of a dummy basic block, but still need to make the variable available for
   later use.
 - With that, we can now skip IRgen for other unreachable statements (which
   don't define a label).
 - Anders, I added two fixmes on calls to EmitVLASize, can you check them?
llvm-svn: 76361 
							
						 
						
							2009-07-19 06:58:07 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								27b50135ee 
								
							 
						 
						
							
							
								
								Rename NextOffset to DataSize, which better matches the Itanium C++ ABI  
							
							 
							
							... 
							
							
							
							llvm-svn: 76339 
							
						 
						
							2009-07-18 21:26:44 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								15b73deeea 
								
							 
						 
						
							
							
								
								Revert r75641.  
							
							 
							
							... 
							
							
							
							llvm-svn: 76327 
							
						 
						
							2009-07-18 19:43:29 +00:00  
						
					 
				
					
						
							
							
								 
								Steve Naroff
							
						 
						
							 
							
							
							
							
								
							
							
								c277ad10f0 
								
							 
						 
						
							
							
								
								Remove ObjCQualifiedInterfaceType:-)  
							
							 
							
							... 
							
							
							
							llvm-svn: 76321 
							
						 
						
							2009-07-18 15:33:26 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								f56501ce48 
								
							 
						 
						
							
							
								
								fix objc codegen to not have its own list of things that eventually get into llvm.used, just  
							
							 
							
							... 
							
							
							
							populate CGM's list directly.
llvm-svn: 76266 
							
						 
						
							2009-07-17 23:57:13 +00:00  
						
					 
				
					
						
							
							
								 
								Ted Kremenek
							
						 
						
							 
							
							
							
							
								
							
							
								8a286fbdb9 
								
							 
						 
						
							
							
								
								Per offline discussion with Steve Naroff, add back Type::getAsXXXType() methods  
							
							 
							
							... 
							
							
							
							until Doug Gregor's Type smart pointer code lands (or more discussion occurs).
These methods just call the new Type::getAs<XXX> methods, so we still have
reduced implementation redundancy. Having explicit getAsXXXType() methods makes
it easier to set breakpoints in the debugger.
llvm-svn: 76193 
							
						 
						
							2009-07-17 17:50:17 +00:00  
						
					 
				
					
						
							
							
								 
								Ted Kremenek
							
						 
						
							 
							
							
							
							
								
							
							
								b825c0ddc5 
								
							 
						 
						
							
							
								
								Replaced Type::getAsLValueReferenceType(), Type::getAsRValueReferenceType(), Type::getAsMemberPointerType(), Type::getAsTagType(), and Type::getAsRecordType() with their Type::getAs<XXX> equivalents.  
							
							 
							
							... 
							
							
							
							llvm-svn: 76139 
							
						 
						
							2009-07-17 01:20:38 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								c3443a3bf3 
								
							 
						 
						
							
							
								
								ir-gen for --/++ operators of objc object pointers  
							
							 
							
							... 
							
							
							
							in 32bit abi.
llvm-svn: 76109 
							
						 
						
							2009-07-16 22:04:59 +00:00  
						
					 
				
					
						
							
							
								 
								Anton Korobeynikov
							
						 
						
							 
							
							
							
							
								
							
							
								b5b703b2f7 
								
							 
						 
						
							
							
								
								Hook in s390x stuff into clang  
							
							 
							
							... 
							
							
							
							llvm-svn: 76099 
							
						 
						
							2009-07-16 20:09:57 +00:00  
						
					 
				
					
						
							
							
								 
								Ted Kremenek
							
						 
						
							 
							
							
							
							
								
							
							
								e3fb4b6524 
								
							 
						 
						
							
							
								
								Add member template 'Type::getAs<T>', which converts a Type* to a respective T*.  
							
							 
							
							... 
							
							
							
							This method is intended to eventually replace the individual
Type::getAsXXXType<> methods.
The motivation behind this change is twofold:
1) Reduce redundant implementations of Type::getAsXXXType() methods. Most of
them are basically copy-and-paste.
2) By centralizing the implementation of the getAs<Type> logic we can more
smoothly move over to Doug Gregor's proposed canonical type smart pointer
scheme.
Along with this patch:
a) Removed 'Type::getAsPointerType()'; now clients use getAs<PointerType>.
b) Removed 'Type::getAsBlockPointerTypE()'; now clients use getAs<BlockPointerType>.
llvm-svn: 76098 
							
						 
						
							2009-07-16 19:58:26 +00:00  
						
					 
				
					
						
							
							
								 
								Owen Anderson
							
						 
						
							 
							
							
							
							
								
							
							
								a296c03430 
								
							 
						 
						
							
							
								
								Update for LLVM API change.  
							
							 
							
							... 
							
							
							
							llvm-svn: 76090 
							
						 
						
							2009-07-16 18:09:38 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								aa64ca28cb 
								
							 
						 
						
							
							
								
								use CreateRuntimeVariable to get __CFConstantStringClassReference  
							
							 
							
							... 
							
							
							
							instead of doing it manually (which might end up getting auto-renamed),
fixing a FIXME. rdar://7065446
llvm-svn: 76079 
							
						 
						
							2009-07-16 16:48:25 +00:00  
						
					 
				
					
						
							
							
								 
								Steve Naroff
							
						 
						
							 
							
							
							
							
								
							
							
								79d1215d83 
								
							 
						 
						
							
							
								
								Remove ASTContext::isObjCObjectPointerType().  
							
							 
							
							... 
							
							
							
							Convert all clients to use the new predicate on Type.
llvm-svn: 76076 
							
						 
						
							2009-07-16 15:41:00 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								3afa3e1d91 
								
							 
						 
						
							
							
								
								codegen string literals using private linkage now like llvm-gcc, eliminating  
							
							 
							
							... 
							
							
							
							some target hooks.
llvm-svn: 75895 
							
						 
						
							2009-07-16 05:03:48 +00:00  
						
					 
				
					
						
							
							
								 
								Owen Anderson
							
						 
						
							 
							
							
							
							
								
							
							
								9f98d37612 
								
							 
						 
						
							
							
								
								Update for LLVM API change.  
							
							 
							
							... 
							
							
							
							llvm-svn: 75869 
							
						 
						
							2009-07-16 00:14:12 +00:00  
						
					 
				
					
						
							
							
								 
								Ted Kremenek
							
						 
						
							 
							
							
							
							
								
							
							
								3e808edac9 
								
							 
						 
						
							
							
								
								Lexically order files in CMakeLists.txt files.  
							
							 
							
							... 
							
							
							
							llvm-svn: 75832 
							
						 
						
							2009-07-15 21:08:41 +00:00  
						
					 
				
					
						
							
							
								 
								Steve Naroff
							
						 
						
							 
							
							
							
							
								
							
							
								1329fa0ed9 
								
							 
						 
						
							
							
								
								Implement the ObjC pseudo built-in types as clang "BuiltinType's". I say pseudo built-in types, since Sema still injects a typedef for recognition (i.e. they aren't truly built-ins from a parser perspective).  
							
							 
							
							... 
							
							
							
							This removes the static data/methods on ObjCObjectPointerType while preserving the nice API (no need to fiddle with ASTContext:-).
This patch also adds Type::isObjCBuiltinType().
This should be the last fairly large patch related to recrafting the ObjC type system. The follow-on patches should be fairly small.
llvm-svn: 75808 
							
						 
						
							2009-07-15 18:40:39 +00:00  
						
					 
				
					
						
							
							
								 
								Owen Anderson
							
						 
						
							 
							
							
							
							
								
							
							
								170229f68d 
								
							 
						 
						
							
							
								
								Update for LLVM API change, and contextify a bunch of related stuff.  
							
							 
							
							... 
							
							
							
							llvm-svn: 75705 
							
						 
						
							2009-07-14 23:10:40 +00:00  
						
					 
				
					
						
							
							
								 
								Devang Patel
							
						 
						
							 
							
							
							
							
								
							
							
								9be7b20401 
								
							 
						 
						
							
							
								
								Revert 75648 for now. It is causing test failures.  
							
							 
							
							... 
							
							
							
							llvm-svn: 75684 
							
						 
						
							2009-07-14 21:31:22 +00:00  
						
					 
				
					
						
							
							
								 
								Steve Naroff
							
						 
						
							 
							
							
							
							
								
							
							
								6b712a7ba1 
								
							 
						 
						
							
							
								
								Introduce Type::isAnyPointerType() and convert all clients (suggested by Chris).  
							
							 
							
							... 
							
							
							
							I don't love the name, however it simplifies the code and is a worthwhile change. If/when we come up with a better name, we can do a search/replace.
llvm-svn: 75650 
							
						 
						
							2009-07-14 18:25:06 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								ff1ee0d7c9 
								
							 
						 
						
							
							
								
								[llvm up] adjust to match mainline.  
							
							 
							
							... 
							
							
							
							llvm-svn: 75647 
							
						 
						
							2009-07-14 18:18:16 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								466fd0a16d 
								
							 
						 
						
							
							
								
								Rename RecordLayout.h to ASTRecordLayout.h  
							
							 
							
							... 
							
							
							
							llvm-svn: 75641 
							
						 
						
							2009-07-14 17:29:11 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								88719a1dd6 
								
							 
						 
						
							
							
								
								Revert r75614 which depend on r75610 (for LLVM), which was reverted.  
							
							 
							
							... 
							
							
							
							--- Reverse-merging r75614 into '.':
U    lib/CodeGen/CGDebugInfo.cpp
llvm-svn: 75639 
							
						 
						
							2009-07-14 16:40:28 +00:00  
						
					 
				
					
						
							
							
								 
								Alisdair Meredith
							
						 
						
							 
							
							
							
							
								
							
							
								a9ad47d94c 
								
							 
						 
						
							
							
								
								Basic support for C++0x unicode types.  Support for literals will follow in an incremental patch  
							
							 
							
							... 
							
							
							
							llvm-svn: 75622 
							
						 
						
							2009-07-14 06:30:34 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								74d3c61532 
								
							 
						 
						
							
							
								
								use new name for method.  
							
							 
							
							... 
							
							
							
							llvm-svn: 75614 
							
						 
						
							2009-07-14 06:16:43 +00:00  
						
					 
				
					
						
							
							
								 
								Devang Patel
							
						 
						
							 
							
							
							
							
								
							
							
								d6c256696b 
								
							 
						 
						
							
							
								
								Use LLVM mangler to get mangled name for debug info entry.  
							
							 
							
							... 
							
							
							
							llvm-svn: 75589 
							
						 
						
							2009-07-14 02:47:58 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								f5c79709bc 
								
							 
						 
						
							
							
								
								Update debug info generation for ObjCObjectPointer changes.  
							
							 
							
							... 
							
							
							
							- Previously this would crash on recursive types, and it was also incorrectly
   stripping off a level of indirection.
 - I'm not 100% convinced this is all correct, but it should be a monotonic
   improvment.
llvm-svn: 75582 
							
						 
						
							2009-07-14 01:20:56 +00:00  
						
					 
				
					
						
							
							
								 
								Owen Anderson
							
						 
						
							 
							
							
							
							
								
							
							
								2571eb6453 
								
							 
						 
						
							
							
								
								Update for API change.  
							
							 
							
							... 
							
							
							
							llvm-svn: 75569 
							
						 
						
							2009-07-14 00:38:16 +00:00  
						
					 
				
					
						
							
							
								 
								Steve Naroff
							
						 
						
							 
							
							
							
							
								
							
							
								4eed7a16d6 
								
							 
						 
						
							
							
								
								Fix 5 issues from Chris's feedback on  http://llvm.org/viewvc/llvm-project?view=rev&revision=75314 .  
							
							 
							
							... 
							
							
							
							Still more to come...just wanted to get the no-brainers out of the way.
llvm-svn: 75477 
							
						 
						
							2009-07-13 17:19:15 +00:00  
						
					 
				
					
						
							
							
								 
								Devang Patel
							
						 
						
							 
							
							
							
							
								
							
							
								9c3a0188cd 
								
							 
						 
						
							
							
								
								Update debug info type cache after fwd decl is replaced by real decl.  
							
							 
							
							... 
							
							
							
							llvm-svn: 75473 
							
						 
						
							2009-07-13 17:03:14 +00:00  
						
					 
				
					
						
							
							
								 
								Devang Patel
							
						 
						
							 
							
							
							
							
								
							
							
								290b052d43 
								
							 
						 
						
							
							
								
								Fix comment.  
							
							 
							
							... 
							
							
							
							llvm-svn: 75471 
							
						 
						
							2009-07-13 16:15:54 +00:00  
						
					 
				
					
						
							
							
								 
								Owen Anderson
							
						 
						
							 
							
							
							
							
								
							
							
								ae86c19e68 
								
							 
						 
						
							
							
								
								Update for LLVM API change.  
							
							 
							
							... 
							
							
							
							llvm-svn: 75446 
							
						 
						
							2009-07-13 04:10:07 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								7e5f052772 
								
							 
						 
						
							
							
								
								Fix type conversion of ObjCObjectPointerType.  
							
							 
							
							... 
							
							
							
							- Previous code was based on a misunderstanding (on my part) of the type
   representation.
llvm-svn: 75385 
							
						 
						
							2009-07-11 21:12:14 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								9d82da40ec 
								
							 
						 
						
							
							
								
								Generate correct prototype for objc_enumerationMutation.  
							
							 
							
							... 
							
							
							
							- This was a latent bug exposed by the recent objc type changes.
llvm-svn: 75383 
							
						 
						
							2009-07-11 20:32:50 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								55179ca5aa 
								
							 
						 
						
							
							
								
								Fix typo (found by gcc warning).  
							
							 
							
							... 
							
							
							
							llvm-svn: 75325 
							
						 
						
							2009-07-11 00:57:02 +00:00  
						
					 
				
					
						
							
							
								 
								Steve Naroff
							
						 
						
							 
							
							
							
							
								
							
							
								7cae42b07a 
								
							 
						 
						
							
							
								
								This patch includes a conceptually simple, but very intrusive/pervasive change.  
							
							 
							
							... 
							
							
							
							The idea is to segregate Objective-C "object" pointers from general C pointers (utilizing the recently added ObjCObjectPointerType). The fun starts in Sema::GetTypeForDeclarator(), where "SomeInterface *" is now represented by a single AST node (rather than a PointerType whose Pointee is an ObjCInterfaceType). Since a significant amount of code assumed ObjC object pointers where based on C pointers/structs, this patch is very tedious. It should also explain why it is hard to accomplish this in smaller, self-contained patches.
This patch does most of the "heavy lifting" related to moving from PointerType->ObjCObjectPointerType. It doesn't include all potential "cleanups". The good news is additional cleanups can be done later (some are noted in the code). This patch is so large that I didn't want to include any changes that are purely aesthetic.
By making the ObjC types truly built-in, they are much easier to work with (and require fewer "hacks"). For example, there is no need for ASTContext::isObjCIdStructType() or ASTContext::isObjCClassStructType()! We believe this change (and the follow-up cleanups) will pay dividends over time. 
Given the amount of code change, I do expect some fallout from this change (though it does pass all of the clang tests). If you notice any problems, please let us know asap! Thanks.
llvm-svn: 75314 
							
						 
						
							2009-07-10 23:34:53 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								ea1cfb415b 
								
							 
						 
						
							
							
								
								Fix a problem that Eli noticed, and that Doug helped me fix.  
							
							 
							
							... 
							
							
							
							llvm-svn: 75265 
							
						 
						
							2009-07-10 19:20:26 +00:00  
						
					 
				
					
						
							
							
								 
								Owen Anderson
							
						 
						
							 
							
							
							
							
								
							
							
								c9673d5bae 
								
							 
						 
						
							
							
								
								Update for IRBuilder API change.  
							
							 
							
							... 
							
							
							
							llvm-svn: 75041 
							
						 
						
							2009-07-08 20:52:20 +00:00  
						
					 
				
					
						
							
							
								 
								Owen Anderson
							
						 
						
							 
							
							
							
							
								
							
							
								c10c8d3e2b 
								
							 
						 
						
							
							
								
								Update for LLVM API change.  
							
							 
							
							... 
							
							
							
							llvm-svn: 75028 
							
						 
						
							2009-07-08 19:05:04 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								5b2095ce16 
								
							 
						 
						
							
							
								
								Implement code generation of ChooseExpr for aggregate types.  
							
							 
							
							... 
							
							
							
							llvm-svn: 75021 
							
						 
						
							2009-07-08 18:33:14 +00:00  
						
					 
				
					
						
							
							
								 
								Owen Anderson
							
						 
						
							 
							
							
							
							
								
							
							
								9f211fb4fa 
								
							 
						 
						
							
							
								
								Update for LLVM API change.  
							
							 
							
							... 
							
							
							
							llvm-svn: 74986 
							
						 
						
							2009-07-08 01:29:18 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								5f21d2f69a 
								
							 
						 
						
							
							
								
								Implemented memmove_collectable API for Next runtime  
							
							 
							
							... 
							
							
							
							when struct variables with GC'able members are copied into.
Will provide a test case later.
llvm-svn: 74984 
							
						 
						
							2009-07-08 01:18:33 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								2a7deb64c0 
								
							 
						 
						
							
							
								
								reimplement vector comparisons as [fi]cmp+sext instead of using v[if]cmp.  
							
							 
							
							... 
							
							
							
							Also, enable them in sema so that they are tested, and now that the x86 backend
has stablized.
llvm-svn: 74983 
							
						 
						
							2009-07-08 01:08:03 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								04318256b7 
								
							 
						 
						
							
							
								
								Keep track of the Expr used to describe the size of an array type,  
							
							 
							
							... 
							
							
							
							from Enea Zaffanella!
llvm-svn: 74831 
							
						 
						
							2009-07-06 15:59:29 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								bacbed9d75 
								
							 
						 
						
							
							
								
								This fixes the case where the wrong symbol is emitted leading to linking errors when you reference a class before defining it (GNU runtime).  
							
							 
							
							... 
							
							
							
							Patch by David Chisnall.
llvm-svn: 74772 
							
						 
						
							2009-07-03 15:10:14 +00:00  
						
					 
				
					
						
							
							
								 
								Owen Anderson
							
						 
						
							 
							
							
							
							
								
							
							
								ecaeaa81b1 
								
							 
						 
						
							
							
								
								Update for changes in LLVM.  Hopefully this is the last one for a while.  
							
							 
							
							... 
							
							
							
							llvm-svn: 74657 
							
						 
						
							2009-07-01 23:14:14 +00:00  
						
					 
				
					
						
							
							
								 
								Owen Anderson
							
						 
						
							 
							
							
							
							
								
							
							
								03200753ee 
								
							 
						 
						
							
							
								
								Hold the LLVMContext by reference instead of by pointer.  
							
							 
							
							... 
							
							
							
							llvm-svn: 74642 
							
						 
						
							2009-07-01 21:23:16 +00:00  
						
					 
				
					
						
							
							
								 
								Owen Anderson
							
						 
						
							 
							
							
							
							
								
							
							
								d9dd77ff6c 
								
							 
						 
						
							
							
								
								Update for LLVMContext+Module change.  
							
							 
							
							... 
							
							
							
							llvm-svn: 74615 
							
						 
						
							2009-07-01 17:00:06 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								3dd1b4b6f2 
								
							 
						 
						
							
							
								
								use new and simplified LLVM APIs.  Patch by Jay Foad!  
							
							 
							
							... 
							
							
							
							llvm-svn: 74585 
							
						 
						
							2009-07-01 04:13:52 +00:00  
						
					 
				
					
						
							
							
								 
								Argyrios Kyrtzidis
							
						 
						
							 
							
							
							
							
								
							
							
								cfbfe78e9e 
								
							 
						 
						
							
							
								
								De-ASTContext-ify DeclContext.  
							
							 
							
							... 
							
							
							
							Remove ASTContext parameter from DeclContext's methods. This change cascaded down to other Decl's methods and changes to call sites started "escalating".
Timings using pre-tokenized "cocoa.h" showed only a ~1% increase in time run between and after this commit.
llvm-svn: 74506 
							
						 
						
							2009-06-30 02:36:12 +00:00  
						
					 
				
					
						
							
							
								 
								Argyrios Kyrtzidis
							
						 
						
							 
							
							
							
							
								
							
							
								ddcd132a5b 
								
							 
						 
						
							
							
								
								Remove the ASTContext parameter from the getBody() methods of Decl and subclasses.  
							
							 
							
							... 
							
							
							
							Timings showed no significant difference before and after the commit.
llvm-svn: 74504 
							
						 
						
							2009-06-30 02:35:26 +00:00  
						
					 
				
					
						
							
							
								 
								Argyrios Kyrtzidis
							
						 
						
							 
							
							
							
							
								
							
							
								b4b64ca752 
								
							 
						 
						
							
							
								
								Remove the ASTContext parameter from the attribute-related methods of Decl.  
							
							 
							
							... 
							
							
							
							The implementations of these methods can Use Decl::getASTContext() to get the ASTContext.
This commit touches a lot of files since call sites for these methods are everywhere.
I used pre-tokenized "carbon.h" and "cocoa.h" headers to do some timings, and there was no real time difference between before the commit and after it.
llvm-svn: 74501 
							
						 
						
							2009-06-30 02:34:44 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								c61089a6c2 
								
							 
						 
						
							
							
								
								Key decisions about 'bool' vs '_Bool' to be based on a new flag in langoptions.  
							
							 
							
							... 
							
							
							
							This is simple enough, but then I thought it would be nice to make PrintingPolicy
get a LangOptions so that various things can key off "bool" and "C++" independently.
This spiraled out of control.  There are many fixme's, but I think things are slightly
better than they were before.
One thing that can be improved: CFG should probably have an ASTContext pointer in it,
which would simplify its clients.
llvm-svn: 74493 
							
						 
						
							2009-06-30 01:26:17 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								e8925dbc1d 
								
							 
						 
						
							
							
								
								Improve code generation for function template specializations:  
							
							 
							
							... 
							
							
							
							- Track implicit instantiations vs. the not-yet-supported explicit
  specializations
  - Give implicit instantiations of function templates (and member
  functions of class templates) linkonce_odr linkage.
  - Improve name mangling for function template specializations,
  including the template arguments of the instantiation and the return
  type of the function.
Note that our name-mangling is improved, but not correct: we still
don't mangle substitutions, although the manglings we produce can be
demangled.
llvm-svn: 74466 
							
						 
						
							2009-06-29 22:39:32 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								8f5d4423ca 
								
							 
						 
						
							
							
								
								Keep track of function template specializations, to eliminate  
							
							 
							
							... 
							
							
							
							redundant, implicit instantiations of function templates and provide a
place where we can hang function template specializations.
llvm-svn: 74454 
							
						 
						
							2009-06-29 20:59:39 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								70d83e27a4 
								
							 
						 
						
							
							
								
								Move FunctionDecl::TemplateSpecializationInfo out into its own class,  
							
							 
							
							... 
							
							
							
							FunctionTemplateSpecializationInfo, in DeclTemplate.h. No functionality change.
llvm-svn: 74431 
							
						 
						
							2009-06-29 17:30:29 +00:00  
						
					 
				
					
						
							
							
								 
								Bill Wendling
							
						 
						
							 
							
							
							
							
								
							
							
								1835107ed0 
								
							 
						 
						
							
							
								
								Make the StackProtector bitfield use enums instead of obscure numbers.  
							
							 
							
							... 
							
							
							
							llvm-svn: 74414 
							
						 
						
							2009-06-28 23:01:01 +00:00  
						
					 
				
					
						
							
							
								 
								Bill Wendling
							
						 
						
							 
							
							
							
							
								
							
							
								d63bbadbef 
								
							 
						 
						
							
							
								
								Add stack protector support to clang. This generates the 'ssp' and 'sspreq'  
							
							 
							
							... 
							
							
							
							function attributes. There are predefined macros that are defined when stack
protectors are used: __SSP__=1 with -fstack-protector and __SSP_ALL__=2 with
-fstack-protector-all.
llvm-svn: 74405 
							
						 
						
							2009-06-28 07:36:13 +00:00  
						
					 
				
					
						
							
							
								 
								Nate Begeman
							
						 
						
							 
							
							
							
							
								
							
							
								ea12f6ebb5 
								
							 
						 
						
							
							
								
								OpenCL 1.0 Support: fix a bug with lvalue swizzles  
							
							 
							
							... 
							
							
							
							llvm-svn: 74324 
							
						 
						
							2009-06-26 21:12:50 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								082acded44 
								
							 
						 
						
							
							
								
								Implement enough of the 'auto' keyword so we can claim to support N2546.  
							
							 
							
							... 
							
							
							
							llvm-svn: 74307 
							
						 
						
							2009-06-26 18:41:36 +00:00  
						
					 
				
					
						
							
							
								 
								Devang Patel
							
						 
						
							 
							
							
							
							
								
							
							
								2872df839d 
								
							 
						 
						
							
							
								
								typo  
							
							 
							
							... 
							
							
							
							llvm-svn: 74305 
							
						 
						
							2009-06-26 18:33:42 +00:00  
						
					 
				
					
						
							
							
								 
								Devang Patel
							
						 
						
							 
							
							
							
							
								
							
							
								0d425350b2 
								
							 
						 
						
							
							
								
								Revrt PR4228 fix for now.  
							
							 
							
							... 
							
							
							
							llvm-svn: 74304 
							
						 
						
							2009-06-26 18:32:22 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								c7d0e6525d 
								
							 
						 
						
							
							
								
								Simplify, and fix a possible crash (never happens however, because we don't ever  
							
							 
							
							... 
							
							
							
							take this path with non-builtin floating point types).
llvm-svn: 74303 
							
						 
						
							2009-06-26 18:32:06 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								81df7b89de 
								
							 
						 
						
							
							
								
								Add a DecltypeType type.  
							
							 
							
							... 
							
							
							
							llvm-svn: 74099 
							
						 
						
							2009-06-24 19:06:50 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								248c719a68 
								
							 
						 
						
							
							
								
								Patch fixes an obscure bug when 'used' attribute is applied to  
							
							 
							
							... 
							
							
							
							variables in ObjC's Next runtime mode. Next runtime also implicitly applies
'used' attribute on some of its meta-data. This results in two 
'llvm.used' arrays to be generated, and one of them is renamed to
'llvm.used1'.
llvm-svn: 74008 
							
						 
						
							2009-06-23 21:47:46 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								4c8da96ea9 
								
							 
						 
						
							
							
								
								fix PR4423.  
							
							 
							
							... 
							
							
							
							llvm-svn: 73938 
							
						 
						
							2009-06-23 01:38:41 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								fec52635f0 
								
							 
						 
						
							
							
								
								Parsing and AST support for using declarations, from John Thompson!  
							
							 
							
							... 
							
							
							
							llvm-svn: 73812 
							
						 
						
							2009-06-20 00:51:54 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								78bd61f661 
								
							 
						 
						
							
							
								
								Move the static DeclAttrs map into ASTContext. Fixes <rdar://problem/6983177>.  
							
							 
							
							... 
							
							
							
							llvm-svn: 73702 
							
						 
						
							2009-06-18 16:11:24 +00:00  
						
					 
				
					
						
							
							
								 
								Argyrios Kyrtzidis
							
						 
						
							 
							
							
							
							
								
							
							
								c4b766bc65 
								
							 
						 
						
							
							
								
								Move CXXMethodDecl::OutOfLineDefinition into Decl::OutOfLine.  
							
							 
							
							... 
							
							
							
							llvm-svn: 73651 
							
						 
						
							2009-06-17 22:49:50 +00:00  
						
					 
				
					
						
							
							
								 
								Steve Naroff
							
						 
						
							 
							
							
							
							
								
							
							
								fb4330f255 
								
							 
						 
						
							
							
								
								First step toward fixing <rdar://problem/6613046> refactor clang objc type representation.  
							
							 
							
							... 
							
							
							
							Add a type (ObjCObjectPointerType) and remove a type (ObjCQualifiedIdType).
This large/tedious patch is just a first step. Next step is to remove ObjCQualifiedInterfaceType. After that, I will remove the magic TypedefType for 'id' (installed by Sema). This work will enable various simplifications throughout clang (when dealing with ObjC types). 
No functionality change.
llvm-svn: 73649 
							
						 
						
							2009-06-17 22:40:22 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								94dfae248b 
								
							 
						 
						
							
							
								
								Update clang for the add ->add/fadd split.  Likewise for sub and mul.  
							
							 
							
							... 
							
							
							
							llvm-svn: 73604 
							
						 
						
							2009-06-17 06:36:24 +00:00  
						
					 
				
					
						
							
							
								 
								Devang Patel
							
						 
						
							 
							
							
							
							
								
							
							
								9fc4341eec 
								
							 
						 
						
							
							
								
								It is possible that main input file does not have any symbol with debug info. To  handle this edge case, always create main compile unit first.  
							
							 
							
							... 
							
							
							
							This fixes PR 4228.
llvm-svn: 73520 
							
						 
						
							2009-06-16 18:02:02 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								a42ab8f3d5 
								
							 
						 
						
							
							
								
								Handle temporaries in default arguments.  
							
							 
							
							... 
							
							
							
							llvm-svn: 73462 
							
						 
						
							2009-06-16 03:37:31 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								c7d2bfacef 
								
							 
						 
						
							
							
								
								"GCC emits an __objc_class_name_{classname} symbol for every class, and a corresponding reference to this symbol for every compilation unit that references the class.  This causes linker errors when you try linking a program which references some classes but doesn't define them.  The attached patch implements this support in clang, so you can compile a class with clang, reference it in a file compiled with GCC, and have it all work correctly."  
							
							 
							
							... 
							
							
							
							Patch by David Chisnall!
llvm-svn: 73364 
							
						 
						
							2009-06-15 01:09:11 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								6282b3cff8 
								
							 
						 
						
							
							
								
								PR4390: Make sure to handle anonymous unions correctly while building  
							
							 
							
							... 
							
							
							
							static intializers for structs.
llvm-svn: 73349 
							
						 
						
							2009-06-14 21:41:37 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								15ba94987a 
								
							 
						 
						
							
							
								
								Sink the BuiltinInfo object from ASTContext into the  
							
							 
							
							... 
							
							
							
							preprocessor and initialize it early in clang-cc.  This
ensures that __has_builtin works in all modes, not just
when ASTContext is around.
llvm-svn: 73319 
							
						 
						
							2009-06-14 01:54:56 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								5abdec7978 
								
							 
						 
						
							
							
								
								move the various builtins stuff from libast to libbasic.  This  
							
							 
							
							... 
							
							
							
							fixes a layering violation in lib/Basic/Targets.cpp.
llvm-svn: 73318 
							
						 
						
							2009-06-14 01:05:48 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								ecd79c6353 
								
							 
						 
						
							
							
								
								move GetBuiltinType from Builtin::Context to ASTContext.  
							
							 
							
							... 
							
							
							
							llvm-svn: 73316 
							
						 
						
							2009-06-14 00:45:47 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								d50fea52af 
								
							 
						 
						
							
							
								
								Simplify mangleFunctionDecl by unnesting a crazy condition.  This fixes  
							
							 
							
							... 
							
							
							
							the check for extern "c" system headers, which should prevent functiondecls
from being mangled.
llvm-svn: 73311 
							
						 
						
							2009-06-13 23:34:16 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								3192cc8526 
								
							 
						 
						
							
							
								
								Fix the calling convention for structs/unions containing SSE vectors on  
							
							 
							
							... 
							
							
							
							x86-32.  This is slightly messy, but I think it's consistent with gcc.
llvm-svn: 73306 
							
						 
						
							2009-06-13 21:37:10 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								4ca97c3b9e 
								
							 
						 
						
							
							
								
								Fix PR4372, another case where non-prototyped functions can prevent  
							
							 
							
							... 
							
							
							
							always_inline from working.
llvm-svn: 73273 
							
						 
						
							2009-06-13 00:26:38 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								8783543a6f 
								
							 
						 
						
							
							
								
								Don't assert when generating code with static_asserts.  
							
							 
							
							... 
							
							
							
							llvm-svn: 73208 
							
						 
						
							2009-06-11 21:22:55 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								76d864c7e7 
								
							 
						 
						
							
							
								
								Support complex properties, ivars and message expressions.  
							
							 
							
							... 
							
							
							
							llvm-svn: 73158 
							
						 
						
							2009-06-10 04:38:50 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								e9ff191459 
								
							 
						 
						
							
							
								
								Remove a few more vector builtins.  
							
							 
							
							... 
							
							
							
							llvm-svn: 73022 
							
						 
						
							2009-06-07 09:32:56 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								5a996fc0fc 
								
							 
						 
						
							
							
								
								Now that LLVM CodeGen can handle the generic variations a bit better,  
							
							 
							
							... 
							
							
							
							get rid of a few more clang vector builtins.
llvm-svn: 73015 
							
						 
						
							2009-06-07 07:12:56 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								07bbeca406 
								
							 
						 
						
							
							
								
								PR4339: make sure to properly extend/trunc the index of a vector element  
							
							 
							
							... 
							
							
							
							insert/extract; the relevant instructions are defined to take only an 
i32.
llvm-svn: 73005 
							
						 
						
							2009-06-06 19:09:26 +00:00  
						
					 
				
					
						
							
							
								 
								Anton Korobeynikov
							
						 
						
							 
							
							
							
							
								
							
							
								18adbf5f07 
								
							 
						 
						
							
							
								
								Add new ABIArgInfo kind: Extend. This allows target to implement its own argument  
							
							 
							
							... 
							
							
							
							zero/sign extension logic (consider, e.g. target has only 64 bit registers and thus
i32's should be extended as well).
llvm-svn: 72998 
							
						 
						
							2009-06-06 09:36:29 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								6813eb125f 
								
							 
						 
						
							
							
								
								Get rid of a bunch of dead builtins.  
							
							 
							
							... 
							
							
							
							llvm-svn: 72996 
							
						 
						
							2009-06-06 08:31:46 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								cbc2bcaf17 
								
							 
						 
						
							
							
								
								As an optimization, we maintain a cache of generated  
							
							 
							
							... 
							
							
							
							___Block_byref_id_object_dispose and ___Block_byref_id_object_copy
functions so that we can simply reuse instead of creating a new one.
Additionally, add an assert to ensure no one yet tries to align a
__block variable beyond the alignment of a pointer as the codegen is
incomplete.
llvm-svn: 72974 
							
						 
						
							2009-06-05 23:26:36 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								feeeda70e2 
								
							 
						 
						
							
							
								
								weak_import should not make definitions have weak linkage.  
							
							 
							
							... 
							
							
							
							- <rdar://problem/6948703> clang treats weak_import like weak
llvm-svn: 72967 
							
						 
						
							2009-06-05 22:58:34 +00:00  
						
					 
				
					
						
							
							
								 
								Anton Korobeynikov
							
						 
						
							 
							
							
							
							
								
							
							
								5bda50f84e 
								
							 
						 
						
							
							
								
								Update cmake script  
							
							 
							
							... 
							
							
							
							llvm-svn: 72963 
							
						 
						
							2009-06-05 22:08:54 +00:00  
						
					 
				
					
						
							
							
								 
								Anton Korobeynikov
							
						 
						
							 
							
							
							
							
								
							
							
								244360d62b 
								
							 
						 
						
							
							
								
								Factor out TargetABIInfo stuff into separate file. No functionality change.  
							
							 
							
							... 
							
							
							
							llvm-svn: 72962 
							
						 
						
							2009-06-05 22:08:42 +00:00  
						
					 
				
					
						
							
							
								 
								Devang Patel
							
						 
						
							 
							
							
							
							
								
							
							
								9e24386c65 
								
							 
						 
						
							
							
								
								Set function Attribute::NoImplicitFloat appropriately.  
							
							 
							
							... 
							
							
							
							llvm-svn: 72961 
							
						 
						
							2009-06-05 22:05:48 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								4be99ff767 
								
							 
						 
						
							
							
								
								ABI handling: Fix nasty thinko where IRgen could generate an out-of-bounds read  
							
							 
							
							... 
							
							
							
							when generating a coercion for ABI handling purposes.
 - This may only manifest itself when building at -O0, but the practical effect
   is that other arguments may get clobbered.
 - <rdar://problem/6930451> [irgen] ABI coercion clobbers other arguments
llvm-svn: 72932 
							
						 
						
							2009-06-05 07:58:54 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								dd050567c1 
								
							 
						 
						
							
							
								
								Fix -Asserts build warnings.  
							
							 
							
							... 
							
							
							
							llvm-svn: 72910 
							
						 
						
							2009-06-05 02:03:25 +00:00  
						
					 
				
					
						
							
							
								 
								Devang Patel
							
						 
						
							 
							
							
							
							
								
							
							
								6e467b1a46 
								
							 
						 
						
							
							
								
								Set function attribute llvm::Attribute::NoRedZone appropriately.  
							
							 
							
							... 
							
							
							
							llvm-svn: 72902 
							
						 
						
							2009-06-04 23:32:02 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								0261e5c960 
								
							 
						 
						
							
							
								
								Make ReplaceUsesOfNonProtoTypeWithRealFunction verify that a call is *to* the  
							
							 
							
							... 
							
							
							
							function of interest, not an operand of it.
llvm-svn: 72869 
							
						 
						
							2009-06-04 16:47:43 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								43c52cdc29 
								
							 
						 
						
							
							
								
								Use PushConditionalTempDestruction/PopConditionalTempDestruction for the ternary operator.  
							
							 
							
							... 
							
							
							
							llvm-svn: 72842 
							
						 
						
							2009-06-04 03:00:32 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								f47a3de83c 
								
							 
						 
						
							
							
								
								Use conditional temp destruction for || and &&.  
							
							 
							
							... 
							
							
							
							llvm-svn: 72838 
							
						 
						
							2009-06-04 02:53:13 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								7d313fc09b 
								
							 
						 
						
							
							
								
								Make PushCXXTemporary and PopCXXTemporary handle conditional temporaries.  
							
							 
							
							... 
							
							
							
							llvm-svn: 72837 
							
						 
						
							2009-06-04 02:47:33 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								44bfcf0f97 
								
							 
						 
						
							
							
								
								Add PushConditionalTempDestruction/PopConditionalTempDestruction.  
							
							 
							
							... 
							
							
							
							llvm-svn: 72835 
							
						 
						
							2009-06-04 02:22:12 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								ea89e2b813 
								
							 
						 
						
							
							
								
								Make sure to push a cleanup block.  
							
							 
							
							... 
							
							
							
							llvm-svn: 72831 
							
						 
						
							2009-06-04 02:08:08 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								7c80959a97 
								
							 
						 
						
							
							
								
								Cleanup/Refactoring of ivar collection. No change in functionality.  
							
							 
							
							... 
							
							
							
							llvm-svn: 72827 
							
						 
						
							2009-06-04 01:19:09 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								fa0c645bae 
								
							 
						 
						
							
							
								
								Fix cmake builds.  
							
							 
							
							... 
							
							
							
							llvm-svn: 72814 
							
						 
						
							2009-06-03 22:24:28 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								dd27484888 
								
							 
						 
						
							
							
								
								PR4316: Fix IRGen for cast-to-union extension.  
							
							 
							
							... 
							
							
							
							llvm-svn: 72803 
							
						 
						
							2009-06-03 20:45:06 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								4c49bb95f8 
								
							 
						 
						
							
							
								
								More temporary work.  
							
							 
							
							... 
							
							
							
							llvm-svn: 72796 
							
						 
						
							2009-06-03 19:05:16 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								6d36343ed8 
								
							 
						 
						
							
							
								
								Store more information about live temporaries. No functionality change for now.  
							
							 
							
							... 
							
							
							
							llvm-svn: 72793 
							
						 
						
							2009-06-03 18:54:26 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								82aea737a7 
								
							 
						 
						
							
							
								
								Move code generation of C++ temporaries into a new file.  
							
							 
							
							... 
							
							
							
							llvm-svn: 72792 
							
						 
						
							2009-06-03 18:40:21 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								cb9d07caeb 
								
							 
						 
						
							
							
								
								Add support for __builtin_unwind_init.  
							
							 
							
							... 
							
							
							
							Also, committing an #if 0'ed __builtin_setjmp and __builtin_longjmp 
implementation I've had sitting in my tree for a while.  I haven't 
enabled it because the LLVM backend support isn't complete yet.
llvm-svn: 72727 
							
						 
						
							2009-06-02 09:37:50 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								f6bd15038c 
								
							 
						 
						
							
							
								
								If we recognize alloca, treat it as a builtin.  This fixes uses of  
							
							 
							
							... 
							
							
							
							alloca without declaring it.
llvm-svn: 72719 
							
						 
						
							2009-06-02 07:10:30 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								c6d9800564 
								
							 
						 
						
							
							
								
								A corner case of objc2 gc's write-barrier generation  
							
							 
							
							... 
							
							
							
							for the Next runtime.
llvm-svn: 72703 
							
						 
						
							2009-06-01 21:29:32 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								e32c02114f 
								
							 
						 
						
							
							
								
								PR4289: Make sure "&func" has the right LLVM type when "func" is a  
							
							 
							
							... 
							
							
							
							K&R-style definition.
llvm-svn: 72690 
							
						 
						
							2009-06-01 10:04:20 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								fa7c608ecc 
								
							 
						 
						
							
							
								
								Fix a thinko.  
							
							 
							
							... 
							
							
							
							llvm-svn: 72679 
							
						 
						
							2009-06-01 00:26:14 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								ca50119a31 
								
							 
						 
						
							
							
								
								Check for null correctly for new expressions.  
							
							 
							
							... 
							
							
							
							llvm-svn: 72678 
							
						 
						
							2009-06-01 00:05:16 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								cba81fc4de 
								
							 
						 
						
							
							
								
								Improve irgen of 'new' further.  
							
							 
							
							... 
							
							
							
							llvm-svn: 72677 
							
						 
						
							2009-05-31 21:53:59 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								96c012ff8b 
								
							 
						 
						
							
							
								
								...and aggregate POD types.  
							
							 
							
							... 
							
							
							
							llvm-svn: 72676 
							
						 
						
							2009-05-31 21:12:26 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								60d0c2c1c2 
								
							 
						 
						
							
							
								
								Support for complex types.  
							
							 
							
							... 
							
							
							
							llvm-svn: 72675 
							
						 
						
							2009-05-31 21:07:58 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								ec71f61608 
								
							 
						 
						
							
							
								
								Better support for scalar POD types in 'new' expressions.  
							
							 
							
							... 
							
							
							
							llvm-svn: 72674 
							
						 
						
							2009-05-31 20:56:36 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								1832f52b10 
								
							 
						 
						
							
							
								
								Very basic irgen support for new expressions.  
							
							 
							
							... 
							
							
							
							llvm-svn: 72672 
							
						 
						
							2009-05-31 20:21:44 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								0955f20473 
								
							 
						 
						
							
							
								
								Don't try to call getFileCharacteristic if the function declaration has an invalid source location (as is the case for the global allocation functions.  
							
							 
							
							... 
							
							
							
							llvm-svn: 72671 
							
						 
						
							2009-05-31 20:19:23 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								4a7b49b56a 
								
							 
						 
						
							
							
								
								Add a new function for emitting new functions.  
							
							 
							
							... 
							
							
							
							llvm-svn: 72656 
							
						 
						
							2009-05-31 01:40:14 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								8eb93e72f7 
								
							 
						 
						
							
							
								
								Emit destructors correctly for temporaries.  
							
							 
							
							... 
							
							
							
							llvm-svn: 72655 
							
						 
						
							2009-05-31 00:34:10 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								f3f91cee43 
								
							 
						 
						
							
							
								
								When possible, don't emit the cleanup block. Instead, just move the instructions to the current block.  
							
							 
							
							... 
							
							
							
							llvm-svn: 72654 
							
						 
						
							2009-05-31 00:33:20 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								c0092ad333 
								
							 
						 
						
							
							
								
								Implement VisitCXXExprWithTemporaries for complex expressions.  
							
							 
							
							... 
							
							
							
							llvm-svn: 72653 
							
						 
						
							2009-05-31 00:12:05 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								2262b307aa 
								
							 
						 
						
							
							
								
								Call EmitCXXExprWithTemporaries.  
							
							 
							
							... 
							
							
							
							llvm-svn: 72652 
							
						 
						
							2009-05-31 00:09:15 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								fd2af0cf86 
								
							 
						 
						
							
							
								
								Add lvalue irgen support for CXXBindTemporaryExpr.  
							
							 
							
							... 
							
							
							
							llvm-svn: 72649 
							
						 
						
							2009-05-30 23:30:54 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								3be22e27b6 
								
							 
						 
						
							
							
								
								More temporary support.  
							
							 
							
							... 
							
							
							
							llvm-svn: 72648 
							
						 
						
							2009-05-30 23:23:33 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								f7f9f68722 
								
							 
						 
						
							
							
								
								Some small fixes for fields of reference type.  
							
							 
							
							... 
							
							
							
							llvm-svn: 72636 
							
						 
						
							2009-05-30 21:09:44 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								4b2434da54 
								
							 
						 
						
							
							
								
								Remove VarDecl from CXXConstructExpr.  
							
							 
							
							... 
							
							
							
							llvm-svn: 72633 
							
						 
						
							2009-05-30 20:56:46 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								0a63741a3f 
								
							 
						 
						
							
							
								
								Add code for emitting C++ destructors. Not used yet.  
							
							 
							
							... 
							
							
							
							llvm-svn: 72591 
							
						 
						
							2009-05-29 21:03:38 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								7de5966d76 
								
							 
						 
						
							
							
								
								Create a new PrintingPolicy class, which we pass down through the AST  
							
							 
							
							... 
							
							
							
							printing logic to help customize the output. For now, we use this
rather than a special flag to suppress the "struct" when printing
"struct X" and to print the Boolean type as "bool" in C++ but "_Bool"
in C.
llvm-svn: 72590 
							
						 
						
							2009-05-29 20:38:28 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								9444638e4e 
								
							 
						 
						
							
							
								
								Re-add a slightly more general version of the check from r72578; it is  
							
							 
							
							... 
							
							
							
							actually necessary in some obscure cases.
llvm-svn: 72585 
							
						 
						
							2009-05-29 19:23:46 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								a678874975 
								
							 
						 
						
							
							
								
								Oops, the testcase I was thinking of is supposed to error out.  I  
							
							 
							
							... 
							
							
							
							tried other things that might trip, but they all worked.
llvm-svn: 72584 
							
						 
						
							2009-05-29 19:14:13 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								7f12d51a48 
								
							 
						 
						
							
							
								
								Fixup codegen for composition of vla types using a normal array type.  
							
							 
							
							... 
							
							
							
							llvm-svn: 72578 
							
						 
						
							2009-05-29 17:06:45 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								df0fe27b66 
								
							 
						 
						
							
							
								
								Fixup the rest of the trivial cases of the codegen of volatile.  If  
							
							 
							
							... 
							
							
							
							any body can spot codegen bugs with volatile, or knows of any in the
bug database, let me know.
llvm-svn: 72572 
							
						 
						
							2009-05-29 15:46:01 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								2a69547f38 
								
							 
						 
						
							
							
								
								PR4281: Fix bogus CodeGen assertion.  The issue is that  
							
							 
							
							... 
							
							
							
							getUnqualifiedType() doesn't strip off all qualifiers for non-canonical 
types.
llvm-svn: 72552 
							
						 
						
							2009-05-28 23:04:00 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								01c2d0a17c 
								
							 
						 
						
							
							
								
								Not setting all the fields is confusing...  
							
							 
							
							... 
							
							
							
							llvm-svn: 72506 
							
						 
						
							2009-05-28 00:16:27 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								16f422ec86 
								
							 
						 
						
							
							
								
								Fix a use-of-undefined, IRgen expects the RValue for "void" to be a scalar RValue.  
							
							 
							
							... 
							
							
							
							llvm-svn: 72504 
							
						 
						
							2009-05-27 23:45:33 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								7c1baf46d6 
								
							 
						 
						
							
							
								
								No write-barrier for initializations.  
							
							 
							
							... 
							
							
							
							llvm-svn: 72492 
							
						 
						
							2009-05-27 19:54:11 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								7551257f00 
								
							 
						 
						
							
							
								
								Change a confusing variable name.  
							
							 
							
							... 
							
							
							
							llvm-svn: 72491 
							
						 
						
							2009-05-27 19:48:48 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								ddcbfe7b53 
								
							 
						 
						
							
							
								
								IRgen support for calls to functions that return references to aggregate exressions.  
							
							 
							
							... 
							
							
							
							llvm-svn: 72479 
							
						 
						
							2009-05-27 16:45:02 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								751aa72b72 
								
							 
						 
						
							
							
								
								Fix up constant expression handling to deal with the address  
							
							 
							
							... 
							
							
							
							of a reference correctly.
llvm-svn: 72463 
							
						 
						
							2009-05-27 06:04:58 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								55422ad068 
								
							 
						 
						
							
							
								
								Add IRGen support for local variables of reference type.  
							
							 
							
							... 
							
							
							
							llvm-svn: 72462 
							
						 
						
							2009-05-27 05:39:06 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								b909bf4937 
								
							 
						 
						
							
							
								
								Add IRGen support for return statements in functions with reference  
							
							 
							
							... 
							
							
							
							type.
llvm-svn: 72459 
							
						 
						
							2009-05-27 04:56:12 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								4034a95dc8 
								
							 
						 
						
							
							
								
								Handle operator call expressions where the callee is a member function.  
							
							 
							
							... 
							
							
							
							llvm-svn: 72458 
							
						 
						
							2009-05-27 04:18:27 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								d8b7ae205e 
								
							 
						 
						
							
							
								
								Functions that return references can be rvalues as well.  
							
							 
							
							... 
							
							
							
							llvm-svn: 72457 
							
						 
						
							2009-05-27 03:37:57 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								4ae70ff9a3 
								
							 
						 
						
							
							
								
								Add support for emitting calls to functions that return references (as lvalues only for now)  
							
							 
							
							... 
							
							
							
							llvm-svn: 72449 
							
						 
						
							2009-05-27 01:45:47 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								3e97f3b35d 
								
							 
						 
						
							
							
								
								Fix typo.  I also fixed the hard to read case differences, so that no  
							
							 
							
							... 
							
							
							
							one else is tempted to copy the style, incorrectly.
llvm-svn: 72448 
							
						 
						
							2009-05-27 01:42:21 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								3a9463bfda 
								
							 
						 
						
							
							
								
								Rename an EmitCallExpr function to EmitCall to make it clear that it doesn't emit an expr.  
							
							 
							
							... 
							
							
							
							llvm-svn: 72446 
							
						 
						
							2009-05-27 01:22:39 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								ec3cbfe8c6 
								
							 
						 
						
							
							
								
								Fixup codegen for volatile structs in the trivial cases (a a=a and a=a=a).  
							
							 
							
							... 
							
							
							
							llvm-svn: 72439 
							
						 
						
							2009-05-26 22:03:21 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								bee70bd1e7 
								
							 
						 
						
							
							
								
								Use .data() instead of &...[0].  
							
							 
							
							... 
							
							
							
							- Just SmallVectors this time.
llvm-svn: 72432 
							
						 
						
							2009-05-26 19:40:20 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								25306cacc6 
								
							 
						 
						
							
							
								
								Esnure that if we have a volatile structure as the destination, that  
							
							 
							
							... 
							
							
							
							we actually have a destination.
llvm-svn: 72429 
							
						 
						
							2009-05-26 18:57:45 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								1518b64ddc 
								
							 
						 
						
							
							
								
								When trying to pass an argument on the stack, assume LLVM will do the right  
							
							 
							
							... 
							
							
							
							thing for non-aggregate types.
 - Otherwise we unnecessarily pin values to the stack and currently end up
   triggering a backend bug in one case.
 - This loose cooperation with LLVM to implement the ABI is pretty ugly.
 - <rdar://problem/6918722> [irgen] clang miscompile of many pointer varargs on
   x86-64
llvm-svn: 72419 
							
						 
						
							2009-05-26 16:37:37 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								895771aa4b 
								
							 
						 
						
							
							
								
								Handle the edge case of a weak function with incomplete type correctly.  
							
							 
							
							... 
							
							
							
							Found by code inspection; I haven't seen this in real-world code.
llvm-svn: 72408 
							
						 
						
							2009-05-26 01:22:57 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								b9f2518626 
								
							 
						 
						
							
							
								
								Propagate volatile for implicit property refernces.  
							
							 
							
							... 
							
							
							
							llvm-svn: 72353 
							
						 
						
							2009-05-23 23:52:31 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								9afc476d4a 
								
							 
						 
						
							
							
								
								Propagate volatile around for property references.  
							
							 
							
							... 
							
							
							
							llvm-svn: 72352 
							
						 
						
							2009-05-23 23:48:13 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								5e9e61b8d2 
								
							 
						 
						
							
							
								
								Track volatile aggregate copies better.  I'm hoping someone else will decide  
							
							 
							
							... 
							
							
							
							how to get the backend to know that the operation is volatile.
llvm-svn: 72348 
							
						 
						
							2009-05-23 22:29:41 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								332ec2ce81 
								
							 
						 
						
							
							
								
								Fix thinko, and implement aggregate volatile reads.  
							
							 
							
							... 
							
							
							
							llvm-svn: 72347 
							
						 
						
							2009-05-23 22:01:27 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								23abd46b79 
								
							 
						 
						
							
							
								
								More volatile fixes.  Can't testcase these yet as ultimately volatile  
							
							 
							
							... 
							
							
							
							is still ignored.
llvm-svn: 72344 
							
						 
						
							2009-05-23 21:40:07 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								ca9fc09c61 
								
							 
						 
						
							
							
								
								Collapse a few FIXMEs together and refactor to make fixing the code easier.  
							
							 
							
							... 
							
							
							
							llvm-svn: 72342 
							
						 
						
							2009-05-23 20:28:01 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								93700fc988 
								
							 
						 
						
							
							
								
								Add support for volatile RValues.  
							
							 
							
							... 
							
							
							
							llvm-svn: 72341 
							
						 
						
							2009-05-23 20:21:36 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								8673657275 
								
							 
						 
						
							
							
								
								One step to fixing up codegen for a=b, where a is a volatile struct.  
							
							 
							
							... 
							
							
							
							llvm-svn: 72315 
							
						 
						
							2009-05-23 04:13:59 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								223db1c9e5 
								
							 
						 
						
							
							
								
								Initialize Obj-C GC attributes when emitting BlockDeclRefExprs.  
							
							 
							
							... 
							
							
							
							- Otherwise we may incorrectly miss generation of some write barriers.
llvm-svn: 72313 
							
						 
						
							2009-05-23 02:49:02 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								a35af82429 
								
							 
						 
						
							
							
								
								Fix typo.  
							
							 
							
							... 
							
							
							
							llvm-svn: 72308 
							
						 
						
							2009-05-23 02:02:29 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								a4404f21d1 
								
							 
						 
						
							
							
								
								This patch adds support for sender-aware dispatch in Objective-C for the GNU runtime, when  
							
							 
							
							... 
							
							
							
							compiled with -fobjc-sender-dependent-dispatch.  This is used in AOP, COP, implementing object 
planes, and a few other things.
Patch by David Chisnall.
llvm-svn: 72275 
							
						 
						
							2009-05-22 20:17:16 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								c63428b192 
								
							 
						 
						
							
							
								
								Fixup codegen for __block int i; i += rhs();.  Should also slightly  
							
							 
							
							... 
							
							
							
							improve codegen in some cases.
llvm-svn: 72273 
							
						 
						
							2009-05-22 19:07:20 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								499f3f9c5d 
								
							 
						 
						
							
							
								
								x86_64 ABI: Account for sret parameters consuming an integer register.  
							
							 
							
							... 
							
							
							
							- PR4242.
llvm-svn: 72268 
							
						 
						
							2009-05-22 17:33:44 +00:00  
						
					 
				
					
						
							
							
								 
								Sanjiv Gupta
							
						 
						
							 
							
							
							
							
								
							
							
								47e296149e 
								
							 
						 
						
							
							
								
								Targets like PIC16 generate Static decls for automatic variables, emit the appropriate debug descriptor as well in that case.  
							
							 
							
							... 
							
							
							
							llvm-svn: 72261 
							
						 
						
							2009-05-22 13:54:25 +00:00  
						
					 
				
					
						
							
							
								 
								Torok Edwin
							
						 
						
							 
							
							
							
							
								
							
							
								5b34933b90 
								
							 
						 
						
							
							
								
								Set correct calling convention even if there is a bitcast in the way.  
							
							 
							
							... 
							
							
							
							This attempts to fix PR4239.
llvm-svn: 72251 
							
						 
						
							2009-05-22 07:25:06 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								aed08f9929 
								
							 
						 
						
							
							
								
								Fixup blocks codegen for { __block i; i = rhs(); }, we want the rhs  
							
							 
							
							... 
							
							
							
							evaluated first.  This can also improve codegen just a bit as we might
have another register to play with for the evaluation of the rhs.
llvm-svn: 72226 
							
						 
						
							2009-05-21 21:05:15 +00:00  
						
					 
				
					
						
							
							
								 
								Jay Foad
							
						 
						
							 
							
							
							
							
								
							
							
								7d0479f2c2 
								
							 
						 
						
							
							
								
								Use v.data() instead of &v[0] when SmallVector v might be empty.  
							
							 
							
							... 
							
							
							
							llvm-svn: 72210 
							
						 
						
							2009-05-21 09:52:38 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								a6bed8370e 
								
							 
						 
						
							
							
								
								Minor refactoring. Uses an existing API to lookup a class method.  
							
							 
							
							... 
							
							
							
							llvm-svn: 72203 
							
						 
						
							2009-05-21 01:03:45 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								d20a03f308 
								
							 
						 
						
							
							
								
								This patch provides preliminary support for non-fragile instance variables on the GNU runtime.  
							
							 
							
							... 
							
							
							
							It currently requires a patches to GNU libobjc (and so is not enabled by default) which are currently 
being tested and reviewed by GNUstep before being pushed upstream.
This patch does not allow support for synthesized ivars, but does provide the infrastructure 
needed for supporting them.
Patch by David Chisnall
llvm-svn: 72175 
							
						 
						
							2009-05-20 18:41:51 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								c21cb44de2 
								
							 
						 
						
							
							
								
								Handle the remaining unhandled cases in EmitReferenceBindingToExpr.  
							
							 
							
							... 
							
							
							
							It would be nice if someone could write an ObjC++ testcase for the case 
of passing a property returning a struct to a function taking a const
reference.
llvm-svn: 72159 
							
						 
						
							2009-05-20 02:31:19 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								02bb7f0ac8 
								
							 
						 
						
							
							
								
								irgen for references to complex rvales (Very important...)  
							
							 
							
							... 
							
							
							
							llvm-svn: 72157 
							
						 
						
							2009-05-20 01:35:03 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								ad007d44b6 
								
							 
						 
						
							
							
								
								Create a temporary if the lvalue is a bitfield. Reported by Eli.  
							
							 
							
							... 
							
							
							
							llvm-svn: 72155 
							
						 
						
							2009-05-20 01:24:22 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								145eae5224 
								
							 
						 
						
							
							
								
								Add support for binding references to scalar rvalues.  
							
							 
							
							... 
							
							
							
							llvm-svn: 72153 
							
						 
						
							2009-05-20 01:03:17 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								7d4c083c19 
								
							 
						 
						
							
							
								
								Bind references to lvalues correctly.  
							
							 
							
							... 
							
							
							
							llvm-svn: 72150 
							
						 
						
							2009-05-20 00:36:58 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								6f5a015bd9 
								
							 
						 
						
							
							
								
								Add EmitReferenceBindingToExpr. Have EmitCallArg use it for now. Doesn't support anything but at least we don't crash ;)  
							
							 
							
							... 
							
							
							
							llvm-svn: 72147 
							
						 
						
							2009-05-20 00:24:07 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								2d228cef50 
								
							 
						 
						
							
							
								
								Improve support for irgen of references.  
							
							 
							
							... 
							
							
							
							llvm-svn: 72133 
							
						 
						
							2009-05-19 20:40:02 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								29a1be34b7 
								
							 
						 
						
							
							
								
								Only do the bitcast in EmitStoreOfScalar if the type is a boolean.  
							
							 
							
							... 
							
							
							
							llvm-svn: 72125 
							
						 
						
							2009-05-19 19:36:19 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								8370964257 
								
							 
						 
						
							
							
								
								Pass the destination QualType to EmitStoreOfScalar. No functionality change.  
							
							 
							
							... 
							
							
							
							llvm-svn: 72118 
							
						 
						
							2009-05-19 18:50:41 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								775640d248 
								
							 
						 
						
							
							
								
								Don't always zext the result of the not unary operator to an int.  
							
							 
							
							... 
							
							
							
							llvm-svn: 72117 
							
						 
						
							2009-05-19 18:44:53 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								c82b86dfaa 
								
							 
						 
						
							
							
								
								Have AggExprEmitter::VisitCXXConstructExpr make new variables if necessary. Stub out VisitCXXExprWithTemporaries.  
							
							 
							
							... 
							
							
							
							llvm-svn: 72103 
							
						 
						
							2009-05-19 04:48:36 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								cec35d7e6a 
								
							 
						 
						
							
							
								
								Clean up some unnecessary includes.  
							
							 
							
							... 
							
							
							
							llvm-svn: 72101 
							
						 
						
							2009-05-19 04:30:57 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								b27c94199f 
								
							 
						 
						
							
							
								
								This patch allows clang to generate code for declared properties on the GNU runtime.  As with @synchronized, this requires some extra functions that are included with other libraries (not with the GNU runtime itself) and so will cause linker errors when these are not present.  
							
							 
							
							... 
							
							
							
							Patch by David Chisnall.
llvm-svn: 72079 
							
						 
						
							2009-05-19 00:28:43 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								c61d0bd8f1 
								
							 
						 
						
							
							
								
								Debug info: Initialize runtime language field correctly for Objective-C  
							
							 
							
							... 
							
							
							
							interface types.
llvm-svn: 72036 
							
						 
						
							2009-05-18 20:51:58 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								9b02760923 
								
							 
						 
						
							
							
								
								Since we miscompile many cases when declaring a variable with a reference type, make them unsupported for now.  
							
							 
							
							... 
							
							
							
							llvm-svn: 72034 
							
						 
						
							2009-05-18 19:55:29 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								8dd2947696 
								
							 
						 
						
							
							
								
								Remove an unused builtin.  
							
							 
							
							... 
							
							
							
							llvm-svn: 72033 
							
						 
						
							2009-05-18 19:25:54 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								2081200b8c 
								
							 
						 
						
							
							
								
								Add 'cmp' SSE builtins and get rid of a bunch of other builtins.  
							
							 
							
							... 
							
							
							
							llvm-svn: 72032 
							
						 
						
							2009-05-18 19:16:46 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								23ca0b4869 
								
							 
						 
						
							
							
								
								Add support for converting member pointer types to LLVM types. Also mangle pointer to member functions correctly and add tests.  
							
							 
							
							... 
							
							
							
							llvm-svn: 71981 
							
						 
						
							2009-05-17 17:41:20 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								078cd52297 
								
							 
						 
						
							
							
								
								This patch fixes two bugs in the GNU Objective-C runtime implementation.  One is a case in rethrowing exceptions where the C types don't match correctly (I already sent this patch to Daniel Dunbar, who found the bug, so it may have already been committed).  The other fixes the case properties so that the methods generated as property accessors are added to the class structure correctly.  
							
							 
							
							... 
							
							
							
							Patch by David Chisnall.
llvm-svn: 71980 
							
						 
						
							2009-05-17 16:49:27 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								d3a69ceaaf 
								
							 
						 
						
							
							
								
								extern "C" should preserve the 'extern' qualifier for VarDecls. Fixes 6853728.  
							
							 
							
							... 
							
							
							
							llvm-svn: 71957 
							
						 
						
							2009-05-16 21:02:39 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								18bb9284ff 
								
							 
						 
						
							
							
								
								Reflow some comments.  
							
							 
							
							... 
							
							
							
							llvm-svn: 71937 
							
						 
						
							2009-05-16 07:57:57 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								9a017d7fcf 
								
							 
						 
						
							
							
								
								Classes with "+load" methods need to go in the non-lazy class list (or  
							
							 
							
							... 
							
							
							
							else the method will not be found by the runtime at class load time).
llvm-svn: 71904 
							
						 
						
							2009-05-15 22:33:15 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								19573e7d29 
								
							 
						 
						
							
							
								
								Factor code for adding module-level class lists into separate method.  
							
							 
							
							... 
							
							
							
							- No functionality change.
llvm-svn: 71898 
							
						 
						
							2009-05-15 21:48:48 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								37604a0984 
								
							 
						 
						
							
							
								
								A C++ member function always has either weak linkage (if it's inline or defined inline) or strong linkage (other cases).  
							
							 
							
							... 
							
							
							
							llvm-svn: 71873 
							
						 
						
							2009-05-15 18:35:39 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								f6e9ece507 
								
							 
						 
						
							
							
								
								Name mangling for class template specializations and template arguments.  
							
							 
							
							... 
							
							
							
							llvm-svn: 71861 
							
						 
						
							2009-05-15 16:09:15 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								2c002929b2 
								
							 
						 
						
							
							
								
								Fixup debug information for the location information for __block  
							
							 
							
							... 
							
							
							
							variables.  For this to work, the backend needs to handle more complex
forms for locations.
A typical utterance would be:
        %forwarding = getelementptr %0* %use_by_ref, i32 0, i32 1               ; <i8**> [#uses=1]
        %0 = load i8** %forwarding              ; <i8*> [#uses=1]
        %1 = bitcast i8* %0 to %0*              ; <%0*> [#uses=1]
        %x = getelementptr %0* %1, i32 0, i32 4         ; <i32*> [#uses=1]
        %2 = bitcast i32* %x to { }*            ; <{ }*> [#uses=1]
        call void @llvm.dbg.declare({ }* %2, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable to { }*))
Presently when selection finds something it doesn't understand, it
just avoids generating any information, which is safe, just
incomplete.  Radar 6867696
llvm-svn: 71824 
							
						 
						
							2009-05-15 00:29:54 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								0a2171ccd5 
								
							 
						 
						
							
							
								
								Skip the asm prefix when storing the name in block info.  
							
							 
							
							... 
							
							
							
							- Otherwise we emit internal names with embedded '\01' characters,
   which confuses some tools.
 - Ideally all the code which wants to get a "display name" for the
   given function should follow one code path, but this should be a
   monotonic improvement for now.
llvm-svn: 71774 
							
						 
						
							2009-05-14 16:42:16 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								31f099c8c2 
								
							 
						 
						
							
							
								
								Enhance debug information for block literals.  Radar 6867696  
							
							 
							
							... 
							
							
							
							llvm-svn: 71763 
							
						 
						
							2009-05-14 02:03:51 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								7911002bf9 
								
							 
						 
						
							
							
								
								We need to specify the "linkage name" to the subprogram now that we  
							
							 
							
							... 
							
							
							
							emit the correct "display name". I suspect we need more work here, see
FIXME for example.
llvm-svn: 71761 
							
						 
						
							2009-05-14 01:45:24 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								0beb7894c4 
								
							 
						 
						
							
							
								
								Make sure not to include the LLVM asm prefix in function names for  
							
							 
							
							... 
							
							
							
							debug info.
llvm-svn: 71736 
							
						 
						
							2009-05-13 23:08:57 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								ffdb8439d7 
								
							 
						 
						
							
							
								
								ABI handling: Fix invalid assertion, it is possible for a valid  
							
							 
							
							... 
							
							
							
							coercion to be specified which truncates padding bits. It would be
nice to still have the assert, but we don't have any API call for the
unpadding size of a type yet.
llvm-svn: 71695 
							
						 
						
							2009-05-13 18:54:26 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								1880136520 
								
							 
						 
						
							
							
								
								Removed 4-letter :) word in comment.  
							
							 
							
							... 
							
							
							
							Used simple array for Selector build.
llvm-svn: 71674 
							
						 
						
							2009-05-13 16:19:02 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								afde259240 
								
							 
						 
						
							
							
								
								implement __sync_synchronize and __sync_lock_release,  
							
							 
							
							... 
							
							
							
							rdar://6880573
llvm-svn: 71637 
							
						 
						
							2009-05-13 04:46:13 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								94578cba76 
								
							 
						 
						
							
							
								
								add support for __sync_nand_and_fetch and __sync_fetch_and_nand,  
							
							 
							
							... 
							
							
							
							rdar://6880573
llvm-svn: 71636 
							
						 
						
							2009-05-13 04:37:52 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								46813bbfa2 
								
							 
						 
						
							
							
								
								Fix rdar://6880259 - invalid function name in block call (__NSConcreteGlobalBlock2)  
							
							 
							
							... 
							
							
							
							by using the appropriate CGM interface instead of directly creating a global.
llvm-svn: 71617 
							
						 
						
							2009-05-13 02:50:56 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								e541ea3a61 
								
							 
						 
						
							
							
								
								implement l-value codegen of comma expr  
							
							 
							
							... 
							
							
							
							llvm-svn: 71595 
							
						 
						
							2009-05-12 21:28:12 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								e0be0dfced 
								
							 
						 
						
							
							
								
								push GlobalDecl through enough of the CodeGenModule interfaces  
							
							 
							
							... 
							
							
							
							to allow us to support generation of deferred ctors/dtors.
It looks like codegen isn't emitting a call to the dtor in 
member-functions.cpp:test2, but when it does, its body should
get emitted.
llvm-svn: 71594 
							
						 
						
							2009-05-12 21:21:08 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								d035ebda2f 
								
							 
						 
						
							
							
								
								add an initial stab at emitting deferred c++ inline functions.  This handles static  
							
							 
							
							... 
							
							
							
							functions and methods declared inline, but not ctors/dtors or methods not declared
inline (apparently my previous patch wasn't good enough).
llvm-svn: 71591 
							
						 
						
							2009-05-12 21:02:27 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								eb7466d24a 
								
							 
						 
						
							
							
								
								cleanups, no functionality change.  
							
							 
							
							... 
							
							
							
							llvm-svn: 71590 
							
						 
						
							2009-05-12 20:58:15 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								bea5b622be 
								
							 
						 
						
							
							
								
								static methods don't get this pointers.  
							
							 
							
							... 
							
							
							
							llvm-svn: 71586 
							
						 
						
							2009-05-12 20:27:19 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								e7834115eb 
								
							 
						 
						
							
							
								
								revert my previous patch, I committed the wrong file.  
							
							 
							
							... 
							
							
							
							llvm-svn: 71585 
							
						 
						
							2009-05-12 20:26:52 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								cd74ffa3eb 
								
							 
						 
						
							
							
								
								static methods don't get this pointers.  
							
							 
							
							... 
							
							
							
							llvm-svn: 71583 
							
						 
						
							2009-05-12 20:21:39 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								e4128642a7 
								
							 
						 
						
							
							
								
								Fixed typos, used DenseSet for keeping track of  
							
							 
							
							... 
							
							
							
							selectors which need use Nonfrgile API for
message dispatch.
llvm-svn: 71578 
							
						 
						
							2009-05-12 20:06:41 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								0f44d81a4c 
								
							 
						 
						
							
							
								
								Patch to implement ivar synthesis of properties declared in protocols  
							
							 
							
							... 
							
							
							
							only and used in class imllementations (objc2 Nonfragile ABI specific).
llvm-svn: 71571 
							
						 
						
							2009-05-12 18:14:29 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								bbfd054746 
								
							 
						 
						
							
							
								
								Darwin x86-32 ABI: Now that structure passing is farther along, we  
							
							 
							
							... 
							
							
							
							don't need special treatment for unions.
llvm-svn: 71559 
							
						 
						
							2009-05-12 17:00:20 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								203e2e8dd8 
								
							 
						 
						
							
							
								
								x86-64 ABI: clang incorrectly passes union { long double, float } in  
							
							 
							
							... 
							
							
							
							register.
 - Merge algorithm was returning MEMORY as it should.
llvm-svn: 71556 
							
						 
						
							2009-05-12 15:22:40 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								bd7d11f770 
								
							 
						 
						
							
							
								
								Factor code that's common to EmitCXXMemberCallExpr and EmitCXXConstructorCall out into a EmitCXXMemberCall function.  
							
							 
							
							... 
							
							
							
							llvm-svn: 71514 
							
						 
						
							2009-05-11 23:37:08 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								097353cbb5 
								
							 
						 
						
							
							
								
								Darwin x86-32: Multi-dimensional arrays were not handled correctly,  
							
							 
							
							... 
							
							
							
							spotted by Eli!
llvm-svn: 71490 
							
						 
						
							2009-05-11 23:01:34 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								5d5ed2d800 
								
							 
						 
						
							
							
								
								Patch to allow Nonfragile ABI to use 32-bit style legacy  
							
							 
							
							... 
							
							
							
							message dispage API for all but a few messages. This is 
a runtime performance improvement and there is not meant
to be a functional change.
llvm-svn: 71467 
							
						 
						
							2009-05-11 19:25:47 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								2ce6b3f91c 
								
							 
						 
						
							
							
								
								Darwin x86_32: Treat records with unnamed bit-fields as "empty".  
							
							 
							
							... 
							
							
							
							llvm-svn: 71461 
							
						 
						
							2009-05-11 18:58:49 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								9fea944f26 
								
							 
						 
						
							
							
								
								More improvements for GNU runtime objc EH, patch by David Chisnall!  
							
							 
							
							... 
							
							
							
							llvm-svn: 71451 
							
						 
						
							2009-05-11 18:16:28 +00:00  
						
					 
				
					
						
							
							
								 
								Sebastian Redl
							
						 
						
							 
							
							
							
							
								
							
							
								576fd424df 
								
							 
						 
						
							
							
								
								Implement C++0x nullptr.  
							
							 
							
							... 
							
							
							
							llvm-svn: 71405 
							
						 
						
							2009-05-10 18:38:11 +00:00  
						
					 
				
					
						
							
							
								 
								Duncan Sands
							
						 
						
							 
							
							
							
							
								
							
							
								c76fe8b611 
								
							 
						 
						
							
							
								
								Correct for renaming PaddedSize -> AllocSize in  
							
							 
							
							... 
							
							
							
							LLVM.
llvm-svn: 71350 
							
						 
						
							2009-05-09 07:08:47 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								b997f3bcc3 
								
							 
						 
						
							
							
								
								x86_64 ABI: Ignore padding bit-fields during classification.  
							
							 
							
							... 
							
							
							
							- {return-types,single-args}-{32,64} pass the first 1k ABI tests with
   bit-fields enabled.
llvm-svn: 71272 
							
						 
						
							2009-05-08 22:26:44 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								4752783057 
								
							 
						 
						
							
							
								
								Darwin x86_32: When coercing a "single element" structure, make sure  
							
							 
							
							... 
							
							
							
							to use a wide enough type. This might be wider than the "single
element"'s type in the presence of padding bit-fields.
 - Darwin x86_32 now passes the first 1k ABI tests with bit-field
   generation enabled.
llvm-svn: 71270 
							
						 
						
							2009-05-08 21:30:11 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								fdda3501a0 
								
							 
						 
						
							
							
								
								Darwin x86_32: Ignore padding bit-fields when looking for "single  
							
							 
							
							... 
							
							
							
							element" structures.
llvm-svn: 71266 
							
						 
						
							2009-05-08 21:04:47 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								4861346c44 
								
							 
						 
						
							
							
								
								Darwin x86_32: Improve bit-field handling for returning records.  
							
							 
							
							... 
							
							
							
							- This turns out to be a no-op now that most of the handling for
   everything else is in place.
llvm-svn: 71261 
							
						 
						
							2009-05-08 20:55:49 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								85f4028f2e 
								
							 
						 
						
							
							
								
								Darwin x86_32: Ignore arrays of empty structures inside records.  
							
							 
							
							... 
							
							
							
							- This eliminates 5/1000 failures on return-types-32, on the current
   ABITest config.
llvm-svn: 71250 
							
						 
						
							2009-05-08 20:21:04 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								96afab520b 
								
							 
						 
						
							
							
								
								further improvements to gnu objc EH stuff, patch by David Chisnall!  
							
							 
							
							... 
							
							
							
							llvm-svn: 71227 
							
						 
						
							2009-05-08 17:36:08 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								a02cb80f99 
								
							 
						 
						
							
							
								
								"This patch fixes message sends to super in categories for the GNU runtime.  This used to work, but I broke it when I modified the code to emit the same thing as GCC for message sends to super in classes."  
							
							 
							
							... 
							
							
							
							Patch by David Chisnall!
llvm-svn: 71220 
							
						 
						
							2009-05-08 15:39:58 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								dc04654697 
								
							 
						 
						
							
							
								
								reimplement __sync_* builtins to be variadic and to follow the same  
							
							 
							
							... 
							
							
							
							semantic rules that gcc and icc use.  This implements the variadic
and concrete versions as builtins and has sema do the 
disambiguation.  There are probably a bunch of details to finish up
but this seems like a large monotonic step forward :)
llvm-svn: 71212 
							
						 
						
							2009-05-08 06:58:22 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								b6e9eb6956 
								
							 
						 
						
							
							
								
								initial support for ObjC exceptions with the GNU runtime:  
							
							 
							
							... 
							
							
							
							"This patch is a first pass at adding support for exceptions for the GNU runtime.  There are a few limitations at present:
- @synchronized() is not yet supported at all.  gcc currently emits calls to runtime library functions that don't exist for this directive.
- Only id @catch  statements are currently working.  This is enough for NS_DURING and friends, but I need to spend more time reading the output from gcc -S to work out how it finds the class pointer to make arbitrary class type catch statements work.
- I've tested it with a few common cases[1] and the clang test suite (which doesn't test exceptions for the GNU runtime, but shows I haven't broken anything else), but there are probably a lot of cases I've missed."
Patch by David Chisnall!
llvm-svn: 71198 
							
						 
						
							2009-05-08 00:11:50 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								7ce29a18e1 
								
							 
						 
						
							
							
								
								Fix crash with constant initialization of bit-fields in unions.  
							
							 
							
							... 
							
							
							
							llvm-svn: 71194 
							
						 
						
							2009-05-07 23:42:42 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								f3648b8913 
								
							 
						 
						
							
							
								
								Patch to support Gnu runtime's typed selectors.  
							
							 
							
							... 
							
							
							
							Patch by David Chisnall.
llvm-svn: 71023 
							
						 
						
							2009-05-05 21:36:57 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								36797ab251 
								
							 
						 
						
							
							
								
								When defining a function whose type has no prototype, make an effort  
							
							 
							
							... 
							
							
							
							to go back and clean up existing uses of the bitcasted function.  This
is not just an optimization: it is required for correctness to get
always inline functions to work, see testcases in function-attributes.c.
llvm-svn: 70971 
							
						 
						
							2009-05-05 06:16:31 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								448a228521 
								
							 
						 
						
							
							
								
								fix some more cases where we'd emit a file with a line of 0 for implicit  
							
							 
							
							... 
							
							
							
							types.  In this case, it was objc_selector and objc_class.  This fixes
rdar://6852754 - clang sometimes generates incorrect/unknown file/line info for DW_TAG__structure_type dies
llvm-svn: 70969 
							
						 
						
							2009-05-05 05:16:17 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								f216fd96fe 
								
							 
						 
						
							
							
								
								Do not generate bogus location info for DW_TAG_inheritance  
							
							 
							
							... 
							
							
							
							DIEs.  We were generating a loc with line of 0 and a file.
These tags do not need locations at all, just remove it.
this fixes rdar://6852792 - Clang generates incorrect (and unnecessary) file and line info for DW_TAG_inheritance dies
llvm-svn: 70966 
							
						 
						
							2009-05-05 05:05:36 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								362d8ae328 
								
							 
						 
						
							
							
								
								Fix generated debug info for decls with no location (which include self/_cmd  
							
							 
							
							... 
							
							
							
							in ObjC) to not emit file/line location information.  Previously
we would output a file with bogus line information.  This fixes:
rdar://6852814 - Clang generates incorrect file & line info for automatic/understood formal parameters for objc-programs
llvm-svn: 70965 
							
						 
						
							2009-05-05 04:57:08 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								dae1abc7ac 
								
							 
						 
						
							
							
								
								Refactor global decls to hold either a regular Decl or a CXXConstructorDecl + ctor type or a CXXDestructorDecl + dtor type.  
							
							 
							
							... 
							
							
							
							llvm-svn: 70962 
							
						 
						
							2009-05-05 04:44:02 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								3f86b9cb06 
								
							 
						 
						
							
							
								
								Remove an unneeded lookup routine.  
							
							 
							
							... 
							
							
							
							llvm-svn: 70951 
							
						 
						
							2009-05-05 00:36:57 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								32ff7aeefa 
								
							 
						 
						
							
							
								
								Provide basic support for generation of objc2's  
							
							 
							
							... 
							
							
							
							objc_assign_global API when assigning to global
objective-c object pointer.
llvm-svn: 70939 
							
						 
						
							2009-05-04 23:27:20 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								9b042e06ee 
								
							 
						 
						
							
							
								
								Fix the field count in interface record layout (it was incorrectly  
							
							 
							
							... 
							
							
							
							compensating for super classes). This was making the reported class
sizes for empty classes very, very wrong.
 - Also, we now report the size info for an empty class like gcc (as
   the offset of the start, not as 0, 0).
 - Add a few more test cases we were mishandling before (padding bit
   field at end of struct, for example).
llvm-svn: 70938 
							
						 
						
							2009-05-04 23:23:09 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								9252ee1779 
								
							 
						 
						
							
							
								
								Compute interface instanceStart and instanceSize using the record  
							
							 
							
							... 
							
							
							
							layout.
 - This is much simpler / more efficient.
 - This also properly computes the size in the presence of bit-fields.
llvm-svn: 70916 
							
						 
						
							2009-05-04 21:26:30 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								23d5a39195 
								
							 
						 
						
							
							
								
								"Fix" a problem with debug info in the presence of always_inline  
							
							 
							
							... 
							
							
							
							function calls.  For a program like this:
#include <stdio.h>
static __inline__ __attribute__((always_inline)) 
int bar(int x) { return 4; }
int main() { 
  int X = bar(4);
  printf("%d\n", X);
}
clang was not outputing any debug info for the body of main().  This is
because the backend is getting confused by the region_start/end that clang
is emitting for block scopes.  For now, just disable these (matching llvm-gcc),
this stuff is in progress of rework anyway.
llvm-svn: 70889 
							
						 
						
							2009-05-04 18:27:04 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								bef2ee4322 
								
							 
						 
						
							
							
								
								"The attached diff fixes the //FIXME in message send to super.  This should now be faster, and works in the presence of class posing.  This is now the same approach as used in GCC (the earlier code was a quick hack to get something working)."  
							
							 
							
							... 
							
							
							
							Patch by David Chisnall!
llvm-svn: 70877 
							
						 
						
							2009-05-04 16:56:33 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								566421c8a3 
								
							 
						 
						
							
							
								
								Patch from David Chisnall:  
							
							 
							
							... 
							
							
							
							The attached diff fixes the //FIXME in message send to super.  This
should now be faster, and works in the presence of class posing.  This
is now the same approach as used in GCC (the earlier code was a quick
hack to get something working).
llvm-svn: 70868 
							
						 
						
							2009-05-04 15:31:17 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								d53e07b396 
								
							 
						 
						
							
							
								
								Remove unnecessary copy of constraint info.  
							
							 
							
							... 
							
							
							
							llvm-svn: 70835 
							
						 
						
							2009-05-04 06:56:16 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								2ad7e17096 
								
							 
						 
						
							
							
								
								PR4143: don't crash generating debug info for incomplete enum types.  
							
							 
							
							... 
							
							
							
							llvm-svn: 70825 
							
						 
						
							2009-05-04 04:39:55 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								33955dd28f 
								
							 
						 
						
							
							
								
								Remove unnecessary push_back (at least, I think it's unnecessary);  
							
							 
							
							... 
							
							
							
							hopefully, this fixes PR4144 without any regressions.
llvm-svn: 70823 
							
						 
						
							2009-05-04 04:12:48 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								98ba964e5c 
								
							 
						 
						
							
							
								
								Don't allow clients to traverse into superclass synthesized properties  
							
							 
							
							... 
							
							
							
							via CollectObjCIvars.
 - In places where we need them, we should have the implementation and
   access the properties through it.
This is a fairly substantial functionality change: 
 1. @encode no longer encodes synthesized ivars, ever.
 2. The ivar layout bitmap no longer encodes information for
    synthesized ivars in superclasses. Well, actually I had already
    broken that, but it is intentional now.
We are now differing substantially from llvm-gcc and gcc
here. However, in my opinion this fundamentally *must* work if
non-fragile classes are to work. Without this change, the result of
@encode and the ivar layout depend on the order that the
implementation is seen in a file (if it is in the same file with its
superclass). Since both scenarios should work the same, our behavior
is now consistent with gcc behavior as if an implementation is never
seen following an implementation of its superclass.
Note that #2  is only a functionality change when (A) an
implementation appears in the same translation unit with the
implementation of its superclass, and (B) the superclass has
synthesized ivars. My belief is that this situation does not occur in
practice.
I am not yet sure of the role/semantics of @encode when synthesized
ivars are present... it's use is fairly unsound in a non-fragile world.
llvm-svn: 70822 
							
						 
						
							2009-05-04 04:10:48 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								62b1070fa2 
								
							 
						 
						
							
							
								
								Inline GetFieldBaseOffset into sole callsite.  
							
							 
							
							... 
							
							
							
							llvm-svn: 70813 
							
						 
						
							2009-05-03 23:35:23 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								5b743915c3 
								
							 
						 
						
							
							
								
								Avoid recomputing field offsets.  
							
							 
							
							... 
							
							
							
							llvm-svn: 70812 
							
						 
						
							2009-05-03 23:31:46 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								d22aa4a5e5 
								
							 
						 
						
							
							
								
								Normalize formatting  
							
							 
							
							... 
							
							
							
							llvm-svn: 70810 
							
						 
						
							2009-05-03 23:21:22 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								36e2a1eea3 
								
							 
						 
						
							
							
								
								Use the implementation decl for looking up offset while building the  
							
							 
							
							... 
							
							
							
							ivar layout.
 - The layout needs access to synthesized ivars.
llvm-svn: 70798 
							
						 
						
							2009-05-03 21:05:10 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								5b73b5e197 
								
							 
						 
						
							
							
								
								PR4134: Implement __builtin_extract_return_addr.  
							
							 
							
							... 
							
							
							
							llvm-svn: 70794 
							
						 
						
							2009-05-03 19:23:23 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								5a3b1b0f7a 
								
							 
						 
						
							
							
								
								Fix comment to account for r70786.  
							
							 
							
							... 
							
							
							
							llvm-svn: 70789 
							
						 
						
							2009-05-03 19:01:39 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								c0042d804c 
								
							 
						 
						
							
							
								
								PR4133: fix always_inline implementation to be consistent with gcc.  
							
							 
							
							... 
							
							
							
							llvm-svn: 70786 
							
						 
						
							2009-05-03 18:13:43 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								1619a5041c 
								
							 
						 
						
							
							
								
								Make codegen for constructors work again.  
							
							 
							
							... 
							
							
							
							llvm-svn: 70785 
							
						 
						
							2009-05-03 17:47:16 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								4c78596182 
								
							 
						 
						
							
							
								
								assert that mangleName is not called for C++ ctors/dtors.  
							
							 
							
							... 
							
							
							
							llvm-svn: 70783 
							
						 
						
							2009-05-03 16:51:04 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								3434d492b3 
								
							 
						 
						
							
							
								
								It turns out BuildAggrIvarLayout wasn't even using the shadow struct,  
							
							 
							
							... 
							
							
							
							just computing it!
llvm-svn: 70779 
							
						 
						
							2009-05-03 14:22:14 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								94f46dc056 
								
							 
						 
						
							
							
								
								Lift common subexpression, remove dead "base" variable.  
							
							 
							
							... 
							
							
							
							llvm-svn: 70778 
							
						 
						
							2009-05-03 14:17:18 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								15bd88860c 
								
							 
						 
						
							
							
								
								Factor out BuildAggrIvarRecordLayout routine.  
							
							 
							
							... 
							
							
							
							llvm-svn: 70777 
							
						 
						
							2009-05-03 14:10:34 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								7abf83cc86 
								
							 
						 
						
							
							
								
								Lift out GetGCAttrTypeForType routine.  
							
							 
							
							... 
							
							
							
							llvm-svn: 70776 
							
						 
						
							2009-05-03 13:55:09 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								7b89ace186 
								
							 
						 
						
							
							
								
								Add constructors for GC_IVAR and SKIP_SCAN, tighten up uses.  
							
							 
							
							... 
							
							
							
							Lift up a size calculation and note some asymmetries.
llvm-svn: 70775 
							
						 
						
							2009-05-03 13:44:42 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								22007d345f 
								
							 
						 
						
							
							
								
								Normalize style, remove a dead assert.  
							
							 
							
							... 
							
							
							
							llvm-svn: 70771 
							
						 
						
							2009-05-03 13:32:01 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								80b4eef686 
								
							 
						 
						
							
							
								
								Use ASTRecordLayout for computing ivar offsets instead of shadow  
							
							 
							
							... 
							
							
							
							struct.
 - We still need to do more lookup than necessary because ivars don't
   live in a reasonable DeclContext.
 - The only remaining client of the interface shadow struct is the
   ivar layout bitmap.
llvm-svn: 70756 
							
						 
						
							2009-05-03 13:15:50 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								961202372f 
								
							 
						 
						
							
							
								
								Add a ComputeIvarBaseOffset overload taking an implementation  
							
							 
							
							... 
							
							
							
							decl. Only this routine will be suitable for computing the offset of a
synthesized ivar.
 - No functionality change.
llvm-svn: 70696 
							
						 
						
							2009-05-03 12:57:56 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								12119b959b 
								
							 
						 
						
							
							
								
								Compute Objective-C metadata size information from the record layout,  
							
							 
							
							... 
							
							
							
							not the shadow structure.
llvm-svn: 70691 
							
						 
						
							2009-05-03 10:46:44 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								61af27860d 
								
							 
						 
						
							
							
								
								look at the right operand when increasing the size of an asm output,  
							
							 
							
							... 
							
							
							
							this fixes http://llvm.org/bugs/show_bug.cgi?id=3373#c20 
llvm-svn: 70685 
							
						 
						
							2009-05-03 09:05:53 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								ccf6183687 
								
							 
						 
						
							
							
								
								Remove unused argument.  
							
							 
							
							... 
							
							
							
							llvm-svn: 70684 
							
						 
						
							2009-05-03 08:56:52 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								0cec95f86a 
								
							 
						 
						
							
							
								
								Coalesce the ivar offset calculation further.  
							
							 
							
							... 
							
							
							
							llvm-svn: 70683 
							
						 
						
							2009-05-03 08:55:17 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								99837deeaf 
								
							 
						 
						
							
							
								
								don't shadow 'i'  
							
							 
							
							... 
							
							
							
							llvm-svn: 70680 
							
						 
						
							2009-05-03 08:38:58 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								59c3a9cd54 
								
							 
						 
						
							
							
								
								add support for tying asm operands where the  result is smaller than  
							
							 
							
							... 
							
							
							
							the input.  This is part of PR3373.
llvm-svn: 70677 
							
						 
						
							2009-05-03 08:21:20 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								10f221f321 
								
							 
						 
						
							
							
								
								implement support for asm outputs targetting non-simple lvalue destinations  
							
							 
							
							... 
							
							
							
							like bitfields.  incidentally llvm-gcc crashes on this sort of thing also. :)
llvm-svn: 70675 
							
						 
						
							2009-05-03 07:53:25 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								d09551a376 
								
							 
						 
						
							
							
								
								Use type from ivar instead of from shadow struct field.  
							
							 
							
							... 
							
							
							
							- No functionality change.
llvm-svn: 70674 
							
						 
						
							2009-05-03 07:52:00 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								b65933eaa2 
								
							 
						 
						
							
							
								
								handle codegen of asms where a small input is tied to a large output.  
							
							 
							
							... 
							
							
							
							llvm-svn: 70672 
							
						 
						
							2009-05-03 07:27:51 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								17769a34da 
								
							 
						 
						
							
							
								
								refactor some code to get the input/output constraint info before  
							
							 
							
							... 
							
							
							
							processing the outputs, no functionality change.
llvm-svn: 70671 
							
						 
						
							2009-05-03 07:05:00 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								c6ad258a6b 
								
							 
						 
						
							
							
								
								When creating a dwarf record type for an objc interface, make sure to propagate  
							
							 
							
							... 
							
							
							
							the runtime version number onto it, so that the debugger knows it's an objc
interface, not a C struct.  rdar://6848435
llvm-svn: 70618 
							
						 
						
							2009-05-02 01:13:16 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								44f3ea7339 
								
							 
						 
						
							
							
								
								capture whether optimizations are enabled or not in debug info  
							
							 
							
							... 
							
							
							
							llvm-svn: 70617 
							
						 
						
							2009-05-02 01:04:13 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								5912de15d0 
								
							 
						 
						
							
							
								
								encode the version of the objc runtime into the dwarf compile unit.  rdar://6848435,  
							
							 
							
							... 
							
							
							
							several other fixes coming.
llvm-svn: 70616 
							
						 
						
							2009-05-02 01:00:04 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								4ac533dc90 
								
							 
						 
						
							
							
								
								We can now call member functions where the base is a pointer.  
							
							 
							
							... 
							
							
							
							llvm-svn: 70579 
							
						 
						
							2009-05-01 21:55:16 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								d898026e8a 
								
							 
						 
						
							
							
								
								Don't assert when we think we need copy/dispose, but don't need them.  
							
							 
							
							... 
							
							
							
							Radar 6838889
llvm-svn: 70525 
							
						 
						
							2009-05-01 01:31:57 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								b4e463287e 
								
							 
						 
						
							
							
								
								Don't use indirect memory destinations for inline asm. Fixes 6841383.  
							
							 
							
							... 
							
							
							
							llvm-svn: 70523 
							
						 
						
							2009-05-01 00:16:04 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								e29b4f0785 
								
							 
						 
						
							
							
								
								Remove a warning when this file is compiled optimized.  
							
							 
							
							... 
							
							
							
							llvm-svn: 70518 
							
						 
						
							2009-04-30 23:08:58 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								18c435a17d 
								
							 
						 
						
							
							
								
								API for message dispatch of methods returning floats  
							
							 
							
							... 
							
							
							
							to match gcc's closely.
llvm-svn: 70493 
							
						 
						
							2009-04-30 16:31:11 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								902fddd1cf 
								
							 
						 
						
							
							
								
								Fix for PR4108: be a bit looser with the casts that we accept in  
							
							 
							
							... 
							
							
							
							constant initializers.
llvm-svn: 70483 
							
						 
						
							2009-04-30 07:03:22 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								b822fad20f 
								
							 
						 
						
							
							
								
								fix i128 to return in 2 64-bit registers (rax/rdx on x86-64)  
							
							 
							
							... 
							
							
							
							llvm-svn: 70481 
							
						 
						
							2009-04-30 06:22:07 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								f122cef4df 
								
							 
						 
						
							
							
								
								initial support for __[u]int128_t, which should be basically  
							
							 
							
							... 
							
							
							
							compatible with VC++ and GCC.  The codegen/mangling angle hasn't
been fully ironed out yet.  Note that we accept int128_t even in
32-bit mode, unlike gcc.
llvm-svn: 70464 
							
						 
						
							2009-04-30 02:43:43 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								4b4ef86369 
								
							 
						 
						
							
							
								
								Undid setting of the flag for msg_Send for 32bit code gen.  
							
							 
							
							... 
							
							
							
							It seems to effect code gen. Add a FIXME instead.
llvm-svn: 70423 
							
						 
						
							2009-04-29 22:47:27 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								e55f8660be 
								
							 
						 
						
							
							
								
								Export lazy references of .objc_class_name of class names  
							
							 
							
							... 
							
							
							
							referenced in a category implementation meta-data
(Next objc 32bit abi).
llvm-svn: 70407 
							
						 
						
							2009-04-29 20:40:05 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								e27b929809 
								
							 
						 
						
							
							
								
								Type of msgSend message dispatch API is a vararg.  
							
							 
							
							... 
							
							
							
							llvm-svn: 70404 
							
						 
						
							2009-04-29 19:14:43 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								76fe50c654 
								
							 
						 
						
							
							
								
								Improve compatibility with GCC regarding inline semantics in GNU89  
							
							 
							
							... 
							
							
							
							mode and in the presence of __gnu_inline__ attributes. This should fix
both PR3989 and PR4069.
As part of this, we now keep track of all of the attributes attached
to each declaration even after we've performed declaration
merging. This fixes PR3264.
llvm-svn: 70292 
							
						 
						
							2009-04-28 06:37:30 +00:00  
						
					 
				
					
						
							
							
								 
								Devang Patel
							
						 
						
							 
							
							
							
							
								
							
							
								df348f10b6 
								
							 
						 
						
							
							
								
								While generating debug info ignore unnamed fields.  
							
							 
							
							... 
							
							
							
							llvm-svn: 70266 
							
						 
						
							2009-04-27 22:40:36 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								01910a50c4 
								
							 
						 
						
							
							
								
								x86-32 ABI: Fix crash on return of structure with flexible array  
							
							 
							
							... 
							
							
							
							member.
Also, spell bitfield more consistently as bit-field.
llvm-svn: 70220 
							
						 
						
							2009-04-27 18:31:32 +00:00  
						
					 
				
					
						
							
							
								 
								Sebastian Redl
							
						 
						
							 
							
							
							
							
								
							
							
								a7b98a772c 
								
							 
						 
						
							
							
								
								Implement function-try-blocks. However, there's a very subtle bug that I can't track down.  
							
							 
							
							... 
							
							
							
							llvm-svn: 70155 
							
						 
						
							2009-04-26 20:35:05 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								1c4a175aef 
								
							 
						 
						
							
							
								
								Remove getIntegerConstantExprValue in favor of using EvaluateAsInt.  
							
							 
							
							... 
							
							
							
							llvm-svn: 70145 
							
						 
						
							2009-04-26 19:19:15 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								c16d476b30 
								
							 
						 
						
							
							
								
								pull operands names "[foo]" into ConstraintInfo.  
							
							 
							
							... 
							
							
							
							llvm-svn: 70136 
							
						 
						
							2009-04-26 17:57:12 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								c3f4c7b1c5 
								
							 
						 
						
							
							
								
								pull the constraint string into the ConstraintInfo struct  
							
							 
							
							... 
							
							
							
							instead of passing it around in addition to it.
llvm-svn: 70135 
							
						 
						
							2009-04-26 17:19:08 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								d9725f7041 
								
							 
						 
						
							
							
								
								change TargetInfo::ConstraintInfo to be a struct that contains  
							
							 
							
							... 
							
							
							
							the enum along with some other data.
llvm-svn: 70114 
							
						 
						
							2009-04-26 07:16:29 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								f0b64d73a8 
								
							 
						 
						
							
							
								
								split ObjC and C++ Statements out into their own headers.  
							
							 
							
							... 
							
							
							
							llvm-svn: 70105 
							
						 
						
							2009-04-26 01:32:48 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								6f5c15688d 
								
							 
						 
						
							
							
								
								When calling the cleanup function specified by __attribute__((cleanup)), make sure to bitcast the argument so it has the same type as the first argument of the cleanup function. Fixes <rdar://problem/6827047>.  
							
							 
							
							... 
							
							
							
							llvm-svn: 70098 
							
						 
						
							2009-04-26 00:34:20 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								c06ce0f710 
								
							 
						 
						
							
							
								
								"This fixes message sends to super in a way that both works with real code and passes the test in the test suite.  It also fixes a crash when using recent versions of GNU libobjc and compiling modules that do not contain any constant strings but do contain a declaration of the constant string class and possible some other corner cases (thanks to Pete French for providing me with a test case for that one)."  
							
							 
							
							... 
							
							
							
							Patch by David Chisnall!
llvm-svn: 70093 
							
						 
						
							2009-04-25 23:19:45 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								50322773b7 
								
							 
						 
						
							
							
								
								Minor simplification.  
							
							 
							
							... 
							
							
							
							llvm-svn: 70091 
							
						 
						
							2009-04-25 22:44:54 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								a4185c543e 
								
							 
						 
						
							
							
								
								fix PR4067: [Linux kernel] cannot aggregate codegen stmtexpr as lvalue  
							
							 
							
							... 
							
							
							
							llvm-svn: 70067 
							
						 
						
							2009-04-25 19:35:26 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								ef2ffbc390 
								
							 
						 
						
							
							
								
								Fix pointer addressing and array subscripting of Objective-C interface  
							
							 
							
							... 
							
							
							
							types.
 - I broke this in the switch to representing interfaces with opaque
   types.
 - <rdar://problem/6822660> clang crashes on subscript of interface in
   32-bit mode
llvm-svn: 70009 
							
						 
						
							2009-04-25 05:08:32 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								969bc68195 
								
							 
						 
						
							
							
								
								Minor refactoring. No intended change in behavior.  
							
							 
							
							... 
							
							
							
							llvm-svn: 69988 
							
						 
						
							2009-04-24 21:07:43 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								ce567657fd 
								
							 
						 
						
							
							
								
								Minor refactoring. No change in functionality.  
							
							 
							
							... 
							
							
							
							llvm-svn: 69979 
							
						 
						
							2009-04-24 17:15:27 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								a123b64218 
								
							 
						 
						
							
							
								
								Some code clean up of objc2's bitmap layout.  
							
							 
							
							... 
							
							
							
							llvm-svn: 69970 
							
						 
						
							2009-04-24 16:17:09 +00:00  
						
					 
				
					
						
							
							
								 
								Sanjiv Gupta
							
						 
						
							 
							
							
							
							
								
							
							
								4742515771 
								
							 
						 
						
							
							
								
								Clang part of r69947. Reverting back 69574 as it is no longer needed.  
							
							 
							
							... 
							
							
							
							llvm-svn: 69949 
							
						 
						
							2009-04-24 02:40:57 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								89c8e000cf 
								
							 
						 
						
							
							
								
								Fix handling of C99 "extern inline" semantics when dealing with  
							
							 
							
							... 
							
							
							
							multiple declarations of the function. Should fix PR3989 and
<rdar://problem/6818429>.
llvm-svn: 69905 
							
						 
						
							2009-04-23 18:22:55 +00:00  
						
					 
				
					
						
							
							
								 
								Devang Patel
							
						 
						
							 
							
							
							
							
								
							
							
								a6acb390e7 
								
							 
						 
						
							
							
								
								Handle corner case where clang-cc is invoked directly to compile preprocessed source file without -main-file-name. In this case, CDDebugInfo is not able identify correct main source file becase SM.isFromMainFile() returns true for locations from header files as well as locations from main source file.  
							
							 
							
							... 
							
							
							
							This patch takes conservative approach by not emitting more then one compile unit with isMain bit set.
llvm-svn: 69902 
							
						 
						
							2009-04-23 18:09:16 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								80672fce8f 
								
							 
						 
						
							
							
								
								Removed bunch of FIXMEs no longer needed.  
							
							 
							
							... 
							
							
							
							llvm-svn: 69896 
							
						 
						
							2009-04-23 16:27:20 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								f0a8344bac 
								
							 
						 
						
							
							
								
								Mark IMAGE_INFO as constant on x86_64-darwin.  
							
							 
							
							... 
							
							
							
							- This shouldn't change anything, we never actually access it, but
   this is consistent with llvm-gcc (and 32-bit)
llvm-svn: 69880 
							
						 
						
							2009-04-23 08:03:21 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								324f80b12a 
								
							 
						 
						
							
							
								
								fix a problem producing debug info with global blocks.  
							
							 
							
							... 
							
							
							
							llvm-svn: 69875 
							
						 
						
							2009-04-23 07:18:56 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								7b0344f656 
								
							 
						 
						
							
							
								
								implement debug info for _Complex.  
							
							 
							
							... 
							
							
							
							llvm-svn: 69873 
							
						 
						
							2009-04-23 06:13:01 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								28ec0cf86c 
								
							 
						 
						
							
							
								
								the logic for computing __func__ and friends is really broken:  
							
							 
							
							... 
							
							
							
							the type assigned by sema (and is visible with sizeof(__func__) for
example) has nothing to do with what codegen ends up producing.
We should eventually add a method on PredefinedExpr to handle this.
In the meantime, just set up some framework and add some fixme's.
llvm-svn: 69872 
							
						 
						
							2009-04-23 05:30:27 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								22b0ada8cf 
								
							 
						 
						
							
							
								
								Use std::sort instead of qsort.  
							
							 
							
							... 
							
							
							
							- Notably, there was a memory error here, SkipIvars does not have to
   be the same size as IvarsInfo.
 - Fariborz, please check.
llvm-svn: 69850 
							
						 
						
							2009-04-23 01:29:05 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								29bd76fd04 
								
							 
						 
						
							
							
								
								Eliminate the three SmallVectors in ObjCImplDecl (for instance  
							
							 
							
							... 
							
							
							
							methods, class methods, and property implementations) and instead
place all of these entities into the DeclContext.
This eliminates more linear walks when looking for class or instance
methods and should make PCH (de-)serialization of ObjCDecls trivial
(and lazy).
llvm-svn: 69849 
							
						 
						
							2009-04-23 01:02:12 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								6df69867c3 
								
							 
						 
						
							
							
								
								ivar layout bitmap is alive!  
							
							 
							
							... 
							
							
							
							llvm-svn: 69838 
							
						 
						
							2009-04-22 23:00:43 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								e4f25b706b 
								
							 
						 
						
							
							
								
								Reapply r69771, with updates & fixes:  
							
							 
							
							... 
							
							
							
							Rework the shadow struct that is layed out for Objective-C classes.
 - Superclasses are now always laid out in their shadow structure at
   the first field.
 - Prior to this, the entire class heirarchy was flattened into a
   single structure which meant that alignment, padding, and bitfields
   were incorrect (the ASTRecordLayout was correct however, which
   meant our debug info didn't coincide with ivar offsets, for
   example).
 - This is still very suboptimal (for example, ivar are looked up
   recursively, but I believe the ivar layout itself is now at least
   close to correct.
 - <rdar://problem/6773388> error: objc[29823]: layout bitmap sliding
   backwards
llvm-svn: 69811 
							
						 
						
							2009-04-22 17:43:55 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								202f3dc5b3 
								
							 
						 
						
							
							
								
								Remove lookupFieldDeclFromIvar from ObjCIvarDecl interface.  
							
							 
							
							... 
							
							
							
							- This is only used by CGObjCRuntime now.
llvm-svn: 69800 
							
						 
						
							2009-04-22 12:00:04 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								7d4e1c5e4a 
								
							 
						 
						
							
							
								
								Don't convert interface types (to structs) as part of CodeGenTypes.  
							
							 
							
							... 
							
							
							
							- This has pros and cons, but for now the pros seem to significantly
   outway the con.
The con is that we will always need to cast in the runtime
implementation to a struct type, if we wish to access an interface
directly.
The pros are:
 - Avoid the cost of generating types which are used. Most
   manipulation of Objective-C objects is done through messages, and
   only the implementation of a class will directly access
   memory. Previously, we would convert the type even if it only
   appear as a function parameter, for example.
 - We don't need to worry about incomplete types, and
   UpdateCompletedType for interfaces is gone.
 - It becomes easier to narrow the interface to the shadow struct for
   Objective-C interfaces (so it can be eliminated).
Currently the runtimes still use the CodeGenTypes machinery to
generate the LLVM structure they need via ConvertTagDecl, but this can
eventually be replaced.
llvm-svn: 69797 
							
						 
						
							2009-04-22 10:28:39 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								7b4dfc8b78 
								
							 
						 
						
							
							
								
								Add CGObjCRuntime::GetConcreteClassStruct to encapsulate access to the  
							
							 
							
							... 
							
							
							
							underlying llvm::StructType for an interface.
llvm-svn: 69796 
							
						 
						
							2009-04-22 09:39:34 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								83a66f78d2 
								
							 
						 
						
							
							
								
								Simplify.  
							
							 
							
							... 
							
							
							
							llvm-svn: 69793 
							
						 
						
							2009-04-22 08:50:59 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								725dc2c5bb 
								
							 
						 
						
							
							
								
								Emit meta data using the Ivar, not a looked up FieldDecl.  
							
							 
							
							... 
							
							
							
							llvm-svn: 69790 
							
						 
						
							2009-04-22 08:22:17 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								89623deca1 
								
							 
						 
						
							
							
								
								Use ComputeIvarBaseOffset instead of looking up by hand.  
							
							 
							
							... 
							
							
							
							llvm-svn: 69789 
							
						 
						
							2009-04-22 08:20:31 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								9fd114d577 
								
							 
						 
						
							
							
								
								Merge ivar access amongst the three runtimes.  
							
							 
							
							... 
							
							
							
							- For now, this means we are always doing the address computations by
   hand instead of constructing a proper GEP. Right now, however, this
   is less important than having fewer entry points to dealing with
   Objective-C interface layout.
llvm-svn: 69787 
							
						 
						
							2009-04-22 07:32:20 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								43e6f8c08b 
								
							 
						 
						
							
							
								
								implement debug info support for id<proto> and interface<proto>  
							
							 
							
							... 
							
							
							
							llvm-svn: 69784 
							
						 
						
							2009-04-22 06:58:56 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								ad8f750f71 
								
							 
						 
						
							
							
								
								ObjCQualifiedClass is dead, remove it.  
							
							 
							
							... 
							
							
							
							llvm-svn: 69783 
							
						 
						
							2009-04-22 06:50:37 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								722f424178 
								
							 
						 
						
							
							
								
								Make ObjCInterfaceDecl's const in some more places.  
							
							 
							
							... 
							
							
							
							llvm-svn: 69775 
							
						 
						
							2009-04-22 05:08:15 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								658ba85820 
								
							 
						 
						
							
							
								
								Revert r69771, I missed some (obvious) details. :/  
							
							 
							
							... 
							
							
							
							llvm-svn: 69773 
							
						 
						
							2009-04-22 04:39:47 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								aefc2b9be3 
								
							 
						 
						
							
							
								
								Mark another TypeForDecl const and make getObjCInterfaceType's argument const.  
							
							 
							
							... 
							
							
							
							llvm-svn: 69772 
							
						 
						
							2009-04-22 04:34:53 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								25b81ef847 
								
							 
						 
						
							
							
								
								Rework the shadow struct that is layed out for Objective-C classes.  
							
							 
							
							... 
							
							
							
							- Superclasses are now always laid out their shadow structure at the
   first field.
 - Prior to this, the entire class heirarchy was flattened into a
   single structure which meant that alignment, padding, and bitfields
   weren't packed correctly (the ASTRecordLayout was correct however,
   which meant our debug info didn't coincide with ivar offsets, for
   example).
 - This is still very suboptimal, but I believe the ivar layout itself
   is now at least close to correct.
 - <rdar://problem/6773388> error: objc[29823]: layout bitmap sliding
   backwards
llvm-svn: 69771 
							
						 
						
							2009-04-22 03:45:12 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								2dfdb3ea94 
								
							 
						 
						
							
							
								
								move 64-bit abi functions to lazy model, everything is lazy now, yay.  
							
							 
							
							... 
							
							
							
							llvm-svn: 69767 
							
						 
						
							2009-04-22 02:53:24 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								ce8754edac 
								
							 
						 
						
							
							
								
								remove the last of the non-lazy objc runtime functions for the 32-bit ABI,  
							
							 
							
							... 
							
							
							
							7 left for 64-bit ABI.
llvm-svn: 69766 
							
						 
						
							2009-04-22 02:44:54 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								0a696a42fe 
								
							 
						 
						
							
							
								
								number of non-lazy runtime functions from 9 -> 4.  
							
							 
							
							... 
							
							
							
							llvm-svn: 69765 
							
						 
						
							2009-04-22 02:38:11 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								095ac38f1c 
								
							 
						 
						
							
							
								
								make message send functions lazy, we're down from 14 non-lazy functions to 9.  
							
							 
							
							... 
							
							
							
							llvm-svn: 69764 
							
						 
						
							2009-04-22 02:32:31 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								c6406dbf7f 
								
							 
						 
						
							
							
								
								move more EH stuff to being lazily created.  An empty .m file now  
							
							 
							
							... 
							
							
							
							produces just 14 dead "declares" in llvm ir instead of 19.
llvm-svn: 69763 
							
						 
						
							2009-04-22 02:26:14 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								a7c00b4c4c 
								
							 
						 
						
							
							
								
								make try/catch objc runtime functions be lazily generated.  
							
							 
							
							... 
							
							
							
							rdar://6809612
llvm-svn: 69762 
							
						 
						
							2009-04-22 02:15:23 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								f8dc07369a 
								
							 
						 
						
							
							
								
								Fix some mishandling of the attr(gnu_inline) mode when used with  
							
							 
							
							... 
							
							
							
							extern.  Previously we would warn about it and ignore the attribute.
This is incorrect, it should be handled as a c89 "extern inline" 
function.  Many thanks to Matthieu Castet for pointing this out and
beating me over the head until I got it.
PR3988: extern inline function are not externally visible
llvm-svn: 69756 
							
						 
						
							2009-04-22 00:03:30 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								2f343dd5c8 
								
							 
						 
						
							
							
								
								fix PR4026: Clang can't codegen __func__ without implicit cast  
							
							 
							
							... 
							
							
							
							llvm-svn: 69747 
							
						 
						
							2009-04-21 23:00:09 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								d1148a7f72 
								
							 
						 
						
							
							
								
								Make sure to mark the interface as completed when we see an  
							
							 
							
							... 
							
							
							
							@implementation that closes a @class delcaration.
 - I don't know how to make a test case for this, but this strengthens
   the invariants that hold internally. The functionality change here
   is the edit to SemaDeclObjC.cpp.
llvm-svn: 69728 
							
						 
						
							2009-04-21 21:41:56 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								fa9ab53d95 
								
							 
						 
						
							
							
								
								Fix emission of static tentative definitions referenced from other static functions  
							
							 
							
							... 
							
							
							
							llvm-svn: 69699 
							
						 
						
							2009-04-21 19:28:58 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								f5fec02d0c 
								
							 
						 
						
							
							
								
								More objc2's ivar layout bitmap. No change in functionality.  
							
							 
							
							... 
							
							
							
							llvm-svn: 69695 
							
						 
						
							2009-04-21 18:33:06 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								b534f6a601 
								
							 
						 
						
							
							
								
								don't bother emitting a zero byte memset at all.  We used to get them  
							
							 
							
							... 
							
							
							
							in cases like this:
typedef struct {
  short instance;
  char name[0];
} ATTR_LIST_ENTRY2;
void test() {
  ATTR_LIST_ENTRY2 X = (ATTR_LIST_ENTRY2) { .instance = 7, };
}  
While it is safe to emit them, it is pretty silly.
llvm-svn: 69687 
							
						 
						
							2009-04-21 17:59:23 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								beecd58e21 
								
							 
						 
						
							
							
								
								Explictly track tentative definitions within Sema, then hand those  
							
							 
							
							... 
							
							
							
							tentative definitions off to the ASTConsumer at the end of the
translation unit. 
Eliminate CodeGen's internal tracking of tentative definitions, and
instead hook into ASTConsumer::CompleteTentativeDefinition. Also,
tweak the definition-deferal logic for C++, where there are no
tentative definitions.
Fixes <rdar://problem/6808352>, and will make it much easier for
precompiled headers to cope with tentative definitions in the future.
llvm-svn: 69681 
							
						 
						
							2009-04-21 17:11:58 +00:00  
						
					 
				
					
						
							
							
								 
								Sanjiv Gupta
							
						 
						
							 
							
							
							
							
								
							
							
								4c5dfd3c45 
								
							 
						 
						
							
							
								
								Pass and return aggregate types directly to function calls.  
							
							 
							
							... 
							
							
							
							llvm-svn: 69668 
							
						 
						
							2009-04-21 06:01:16 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								a9aeea9f27 
								
							 
						 
						
							
							
								
								use of predefined identifiers like __func__ at global scope warn in sema,  
							
							 
							
							... 
							
							
							
							but crashed codegen.  Fix this to report the name of the llvm function.
This fixes rdar://6808051
llvm-svn: 69658 
							
						 
						
							2009-04-21 04:41:23 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								e000df6882 
								
							 
						 
						
							
							
								
								Remove unnused variable.  
							
							 
							
							... 
							
							
							
							llvm-svn: 69650 
							
						 
						
							2009-04-21 01:32:46 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								9ebf9516af 
								
							 
						 
						
							
							
								
								Kill ASTContext::[gs]etFieldForDecl, instead we just lookup things  
							
							 
							
							... 
							
							
							
							when we need them -- which is exactly what some code was already
doing!
 - No intended functionality change.
llvm-svn: 69648 
							
						 
						
							2009-04-21 01:19:28 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								be9dae80b3 
								
							 
						 
						
							
							
								
								Remove LateBoundIVars() runtime interface, it is unused.  
							
							 
							
							... 
							
							
							
							llvm-svn: 69641 
							
						 
						
							2009-04-21 00:49:20 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								e03f005d30 
								
							 
						 
						
							
							
								
								Assert on a few conditions that (I believe) should hold  
							
							 
							
							... 
							
							
							
							w.r.t. ASTContext::[gs]etFieldDecl, and the Field argument to
EmitObjCValueForIvar).
llvm-svn: 69639 
							
						 
						
							2009-04-21 00:41:40 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								80c9ce2c4a 
								
							 
						 
						
							
							
								
								ObjC2's Ivar bitmap layout work. No change in functionality.  
							
							 
							
							... 
							
							
							
							llvm-svn: 69629 
							
						 
						
							2009-04-20 22:03:45 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								e3f5cfc0b8 
								
							 
						 
						
							
							
								
								Move countInheritedIvars to within striking distance of  
							
							 
							
							... 
							
							
							
							GetClassSizeInfo
Reduce nesting in GetInterfaceDeclStructLayout.
Tweak some comments.
No functionality change.
llvm-svn: 69621 
							
						 
						
							2009-04-20 20:18:54 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								ddf6ca0355 
								
							 
						 
						
							
							
								
								the __gnuc_inline__ attribute is actually named __gnu_inline__,  
							
							 
							
							... 
							
							
							
							PR4023
llvm-svn: 69618 
							
						 
						
							2009-04-20 19:12:28 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								be1f26df5d 
								
							 
						 
						
							
							
								
								Inline GetFirstIvarInRecord into sole caller.  
							
							 
							
							... 
							
							
							
							- No functionality change.
llvm-svn: 69582 
							
						 
						
							2009-04-20 07:18:49 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								75e909f5e0 
								
							 
						 
						
							
							
								
								Set a bit in IMAGE_INFO to indicate that we don't contain any  
							
							 
							
							... 
							
							
							
							@synthesized ivars for superclasses.
 - <rdar://problem/6806371> [clang] Mark code without miscompiled
   @synthesized properties
llvm-svn: 69581 
							
						 
						
							2009-04-20 07:11:47 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								f5c18461e3 
								
							 
						 
						
							
							
								
								Lift out GetNamedIvarList.  
							
							 
							
							... 
							
							
							
							Drop uses of GetFirstInvarInRecord, instead we lookup the ivars we
know are in the record.
 - This is somewhat less efficient, but I need to detangle this code
   first...
llvm-svn: 69579 
							
						 
						
							2009-04-20 06:54:31 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								caec0238bc 
								
							 
						 
						
							
							
								
								Don't emit ivar offsets for unnamed bit fields.  
							
							 
							
							... 
							
							
							
							Also, added assertion that the field matches what would be looked up.
llvm-svn: 69572 
							
						 
						
							2009-04-20 05:53:40 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								bc633beda4 
								
							 
						 
						
							
							
								
								PR3247: Handle a couple of cases where we weren't emitting VLA sizes (and  
							
							 
							
							... 
							
							
							
							subsequently crashed).
llvm-svn: 69567 
							
						 
						
							2009-04-20 03:54:15 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								3253e189c6 
								
							 
						 
						
							
							
								
								PR3248: Make sure the evaluate the operand of a sizeof when it has a VLA type.  
							
							 
							
							... 
							
							
							
							Adapted from patch by Tim Northover.
llvm-svn: 69566 
							
						 
						
							2009-04-20 03:21:44 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								5d5dbb1754 
								
							 
						 
						
							
							
								
								Remove non-const form of lookupFieldDeclForIvar.  
							
							 
							
							... 
							
							
							
							llvm-svn: 69563 
							
						 
						
							2009-04-20 00:37:55 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								ae03226bc6 
								
							 
						 
						
							
							
								
								Comment fixes.  
							
							 
							
							... 
							
							
							
							llvm-svn: 69562 
							
						 
						
							2009-04-20 00:33:43 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								554fd79b38 
								
							 
						 
						
							
							
								
								Lift GetClassSizeInfo out of GenerateClass, add a FIXME.  
							
							 
							
							... 
							
							
							
							- No functionality change.
llvm-svn: 69561 
							
						 
						
							2009-04-19 23:41:48 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								4f856744e5 
								
							 
						 
						
							
							
								
								PR3853: Add CodeGen support for __thread.  
							
							 
							
							... 
							
							
							
							llvm-svn: 69545 
							
						 
						
							2009-04-19 21:05:03 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								fe92e701aa 
								
							 
						 
						
							
							
								
								Silence gcc warning.  
							
							 
							
							... 
							
							
							
							llvm-svn: 69541 
							
						 
						
							2009-04-19 20:21:56 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								5f65cc8215 
								
							 
						 
						
							
							
								
								silence a warning, it isn't clear what the right answer is here,  
							
							 
							
							... 
							
							
							
							will talk to steve.
llvm-svn: 69519 
							
						 
						
							2009-04-19 06:59:18 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								96adcd5e74 
								
							 
						 
						
							
							
								
								silence a warning, I need to talk to Devang about this code.  
							
							 
							
							... 
							
							
							
							llvm-svn: 69517 
							
						 
						
							2009-04-19 06:50:29 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								b433b279f3 
								
							 
						 
						
							
							
								
								Fix rdar://6804402 - crash on objc implementations declared with  
							
							 
							
							... 
							
							
							
							@class  but no implementation.  This was broken in all 3 runtime
impls.
llvm-svn: 69512 
							
						 
						
							2009-04-19 06:02:28 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								9a7a78b0ae 
								
							 
						 
						
							
							
								
								Fix bug in computation of ivar offsets for (adjacent) bitfields.  
							
							 
							
							... 
							
							
							
							- The confusing IRgen bitfield interface is partly to blame here;
   fixing the functional error for now, cleanups to the interface to
   follow.
llvm-svn: 69503 
							
						 
						
							2009-04-19 02:03:42 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								cd3bb8f7e4 
								
							 
						 
						
							
							
								
								revert david's patch, which causes a testsuite failure.  
							
							 
							
							... 
							
							
							
							llvm-svn: 69501 
							
						 
						
							2009-04-19 01:33:30 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								bf90b33665 
								
							 
						 
						
							
							
								
								Reuse ObjcIvarOffsetVariable instead of duplicating code.  
							
							 
							
							... 
							
							
							
							- No functionality change (but added a FIXME).
llvm-svn: 69496 
							
						 
						
							2009-04-19 00:44:02 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								a106052090 
								
							 
						 
						
							
							
								
								Remove some unnecessary complexity.  
							
							 
							
							... 
							
							
							
							- No functionality change.
llvm-svn: 69495 
							
						 
						
							2009-04-19 00:31:15 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								c1b96c3590 
								
							 
						 
						
							
							
								
								"This patch fixes message sends to super in class methods for the GNU runtime (currently an instance method lookup is being performed)."  
							
							 
							
							... 
							
							
							
							Patch by David Chisnall!
llvm-svn: 69493 
							
						 
						
							2009-04-18 23:12:40 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								623dcae172 
								
							 
						 
						
							
							
								
								Use EmitCallArgs in EmitObjCMessageExpr.  
							
							 
							
							... 
							
							
							
							llvm-svn: 69471 
							
						 
						
							2009-04-18 20:29:27 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								603d6aff8b 
								
							 
						 
						
							
							
								
								Make CodeGenFunction::EmitCallArgs a template function that takes a generic "Type Info" parameter. The type info parameter knows how to iterate over its arguments.  
							
							 
							
							... 
							
							
							
							llvm-svn: 69469 
							
						 
						
							2009-04-18 20:20:22 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								41595d43d5 
								
							 
						 
						
							
							
								
								Use getAsPointerType instead of using getCanonicalType directly.  
							
							 
							
							... 
							
							
							
							- <rdar://problem/6803995>
llvm-svn: 69435 
							
						 
						
							2009-04-18 08:54:40 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								508a7dda4a 
								
							 
						 
						
							
							
								
								Fix a bug found by inspection, class/meta references could be emitted  
							
							 
							
							... 
							
							
							
							into the wrong section (they shared the same lookup table).
llvm-svn: 69433 
							
						 
						
							2009-04-18 08:51:00 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								c2e868fd14 
								
							 
						 
						
							
							
								
								fix incorrect lowering of __builtin_ia32_shufpd, rdar://6803924  
							
							 
							
							... 
							
							
							
							llvm-svn: 69428 
							
						 
						
							2009-04-18 07:01:54 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								e3dcb2ddd1 
								
							 
						 
						
							
							
								
								FunctionDecl::getBody() is getting an ASTContext argument for use in  
							
							 
							
							... 
							
							
							
							lazy PCH deserialization. Propagate that argument wherever it needs to
be. No functionality change, except that I've tightened up a few PCH
tests in preparation.
llvm-svn: 69406 
							
						 
						
							2009-04-18 00:02:19 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								6fdd57cba8 
								
							 
						 
						
							
							
								
								fix a crash compiling code with its own definition of objc_assign_weak.  
							
							 
							
							... 
							
							
							
							rdar://6800430
llvm-svn: 69392 
							
						 
						
							2009-04-17 22:12:36 +00:00  
						
					 
				
					
						
							
							
								 
								Devang Patel
							
						 
						
							 
							
							
							
							
								
							
							
								12f0dea922 
								
							 
						 
						
							
							
								
								Use PresumedLoc to record line number in debug info entries.  
							
							 
							
							... 
							
							
							
							llvm-svn: 69389 
							
						 
						
							2009-04-17 21:35:15 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								66b13dac0a 
								
							 
						 
						
							
							
								
								Don't put msgrefs in used globals (in particular, we don't want  
							
							 
							
							... 
							
							
							
							no-dead-strip set on them).
llvm-svn: 69388 
							
						 
						
							2009-04-17 21:10:58 +00:00  
						
					 
				
					
						
							
							
								 
								Devang Patel
							
						 
						
							 
							
							
							
							
								
							
							
								75009454e3 
								
							 
						 
						
							
							
								
								Appropriately set file name and directory name in debug info compile units.  
							
							 
							
							... 
							
							
							
							llvm-svn: 69387 
							
						 
						
							2009-04-17 21:06:59 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								10dae30049 
								
							 
						 
						
							
							
								
								Fix rdar://6800926 - crash compiling non-fragile _Bool bitfield ivar,  
							
							 
							
							... 
							
							
							
							the functional change here is changing ConvertType -> ConvertTypeForMem
so that we handle i1 fields properly as memory.
llvm-svn: 69361 
							
						 
						
							2009-04-17 17:46:19 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								c4688d21f7 
								
							 
						 
						
							
							
								
								tidy some code.  
							
							 
							
							... 
							
							
							
							llvm-svn: 69360 
							
						 
						
							2009-04-17 17:44:48 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								eaa28f7e18 
								
							 
						 
						
							
							
								
								Add support for generating (very basic) C++ destructors. These aren't called by anything yet.  
							
							 
							
							... 
							
							
							
							llvm-svn: 69343 
							
						 
						
							2009-04-17 01:58:57 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								c3e7cff6d3 
								
							 
						 
						
							
							
								
								Attributes on block functions were not being set.  
							
							 
							
							... 
							
							
							
							- <rdar://problem/6800351> clang not producing correct large struct
   return code for Blocks
llvm-svn: 69337 
							
						 
						
							2009-04-17 00:48:04 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								b7f8f594f3 
								
							 
						 
						
							
							
								
								Implement basic code generation of constructor calls. We can now compile:  
							
							 
							
							... 
							
							
							
							struct S {
S(int, int);
};
void f() {
S s(10, 10);
}
llvm-svn: 69330 
							
						 
						
							2009-04-17 00:06:03 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								e8eeffdf16 
								
							 
						 
						
							
							
								
								Add GetAddrOfCXXConstructor and use it.  
							
							 
							
							... 
							
							
							
							llvm-svn: 69328 
							
						 
						
							2009-04-16 23:57:24 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								68c4c61be8 
								
							 
						 
						
							
							
								
								Removed a no longer needed FIXME comment.  
							
							 
							
							... 
							
							
							
							llvm-svn: 69315 
							
						 
						
							2009-04-16 21:49:16 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								bcf548760e 
								
							 
						 
						
							
							
								
								Category method synbols must be qualified by gategory name to  
							
							 
							
							... 
							
							
							
							match gcc's.
llvm-svn: 69305 
							
						 
						
							2009-04-16 18:34:20 +00:00  
						
					 
				
					
						
							
							
								 
								Sebastian Redl
							
						 
						
							 
							
							
							
							
								
							
							
								1a99f441e6 
								
							 
						 
						
							
							
								
								Fix a crash bug when comparing overload quality of conversion operators with conversion constructors.  
							
							 
							
							... 
							
							
							
							Remove an atrocious amount of trailing whitespace in the overloaded operator mangler. Sorry, couldn't help myself.
Change the DeclType parameter of Sema::CheckReferenceInit to be passed by value instead of reference. It wasn't changed anywhere.
Let the parser handle C++'s irregular grammar around assignment-expression and conditional-expression.
And finally, the reason for all this stuff: implement C++ semantics for the conditional operator. The implementation is complete except for determining lvalueness.
llvm-svn: 69299 
							
						 
						
							2009-04-16 17:51:27 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								426b5cf16a 
								
							 
						 
						
							
							
								
								Ensure that the most recent declaration of a tentative definition wins  
							
							 
							
							... 
							
							
							
							when generating a common definition.
llvm-svn: 69287 
							
						 
						
							2009-04-16 15:34:14 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								3b65ac2696 
								
							 
						 
						
							
							
								
								Fixup codegen for copy/dispose for block literals.  Radar 6791245  
							
							 
							
							... 
							
							
							
							llvm-svn: 69232 
							
						 
						
							2009-04-15 22:11:36 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								7dd749e6fd 
								
							 
						 
						
							
							
								
								Defer generation of tentative definitions.  
							
							 
							
							... 
							
							
							
							- PR3980.
 - <rdar://problem/6762287> [irgen] crash when generating tentative
   definition of incomplete structure
 - This also avoids creating common definitions for things which are
   later overwritten.
 - XFAIL'ed external-defs.c, it isn't completing types properly yet.
llvm-svn: 69231 
							
						 
						
							2009-04-15 22:08:45 +00:00  
						
					 
				
					
						
							
							
								 
								Devang Patel
							
						 
						
							 
							
							
							
							
								
							
							
								9074ed8c6a 
								
							 
						 
						
							
							
								
								Set DebugInfo at the beginning of GenerateBlockFunction().  
							
							 
							
							... 
							
							
							
							llvm-svn: 69228 
							
						 
						
							2009-04-15 21:51:44 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								617482c666 
								
							 
						 
						
							
							
								
								Actually generate code for the simple constructors we know we can generate code for.  
							
							 
							
							... 
							
							
							
							llvm-svn: 69222 
							
						 
						
							2009-04-15 21:02:13 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								4b68d26a93 
								
							 
						 
						
							
							
								
								Don't use \01 in symbol name if unnecessary.  
							
							 
							
							... 
							
							
							
							- This was particularly bad since I fixed one instance of this name
   and not another, meaning we got an LLVM module with the same
   effective name in two different globals!
llvm-svn: 69205 
							
						 
						
							2009-04-15 19:52:32 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								24645c9ff4 
								
							 
						 
						
							
							
								
								Fix alignment on obj_msgrefs to match llvm-gcc.  
							
							 
							
							... 
							
							
							
							llvm-svn: 69199 
							
						 
						
							2009-04-15 19:04:46 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								e60aa05d34 
								
							 
						 
						
							
							
								
								Add test case for superrefs section (and make spacing consistent).  
							
							 
							
							... 
							
							
							
							llvm-svn: 69198 
							
						 
						
							2009-04-15 19:03:14 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								f5e8ddd550 
								
							 
						 
						
							
							
								
								__objc_superrefs belongs to __DATA segment.  
							
							 
							
							... 
							
							
							
							llvm-svn: 69170 
							
						 
						
							2009-04-15 16:31:36 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								f747524819 
								
							 
						 
						
							
							
								
								Start attempting to generate code for C++ ctors.  
							
							 
							
							... 
							
							
							
							llvm-svn: 69168 
							
						 
						
							2009-04-15 15:55:24 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								e4c40c8baf 
								
							 
						 
						
							
							
								
								Add support for mangling C++ constructors. Review appreciated (I'm looking at you, Doug)  
							
							 
							
							... 
							
							
							
							llvm-svn: 69150 
							
						 
						
							2009-04-15 05:36:58 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								375d6beb6c 
								
							 
						 
						
							
							
								
								Add CGCXX.h with ctor/dtor type enumerations. No functionality change.  
							
							 
							
							... 
							
							
							
							llvm-svn: 69137 
							
						 
						
							2009-04-15 04:36:55 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								c483bd0724 
								
							 
						 
						
							
							
								
								Simplify CodeGenFunction::GenerateCode.  
							
							 
							
							... 
							
							
							
							llvm-svn: 69134 
							
						 
						
							2009-04-15 04:10:19 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								b25452a98e 
								
							 
						 
						
							
							
								
								Tweaks to Objective-C metadata (32 & 64-bit) to match llvm-gcc.  
							
							 
							
							... 
							
							
							
							- Set alignment on property lists.
 - 32-bit:
   o Set section on property lists.
   o Fix section name for category class methods.
   o Fix symbol name for property lists.
   o Fix section name for class method.
   o Set alignment and section on class extension structure.
   o Set alignment on a number of things: instance variables, methods,
   method descriptions, the symbols structure.
 - 64-bit:
   o Fix section flags for protocol list.
I doubt most of these were problems in practice, but it is nice to
match llvm-gcc.
llvm-svn: 69132 
							
						 
						
							2009-04-15 02:56:18 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								3241fae46c 
								
							 
						 
						
							
							
								
								Set alignment on __cstring metadata variables to 1 (matching  
							
							 
							
							... 
							
							
							
							llvm-gcc).
llvm-svn: 69097 
							
						 
						
							2009-04-14 23:14:47 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								729df96bf5 
								
							 
						 
						
							
							
								
								Avoid use of magic \01 prefix when unneeded.  
							
							 
							
							... 
							
							
							
							llvm-svn: 69093 
							
						 
						
							2009-04-14 22:44:26 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								346892aafc 
								
							 
						 
						
							
							
								
								Comment fix.  
							
							 
							
							... 
							
							
							
							llvm-svn: 69091 
							
						 
						
							2009-04-14 22:41:13 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								28549de12c 
								
							 
						 
						
							
							
								
								remove dead enum  
							
							 
							
							... 
							
							
							
							llvm-svn: 69070 
							
						 
						
							2009-04-14 20:30:29 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								bae0e68930 
								
							 
						 
						
							
							
								
								Fix PR3988: extern inline functions get strong symbol definitions in  
							
							 
							
							... 
							
							
							
							C99 mode.  This is a regression from an earlier patch of mine.
This also simplifies the linkage enums a bit.
llvm-svn: 69069 
							
						 
						
							2009-04-14 20:25:53 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								899e7eb6c7 
								
							 
						 
						
							
							
								
								Do not dead code strip global meta-data objects.  
							
							 
							
							... 
							
							
							
							This will match gcc's behavior in the arena.
llvm-svn: 69061 
							
						 
						
							2009-04-14 18:41:56 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								d73e4419f5 
								
							 
						 
						
							
							
								
								Fixup whitespacing.  
							
							 
							
							... 
							
							
							
							llvm-svn: 69055 
							
						 
						
							2009-04-14 18:24:37 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								4527d30c3d 
								
							 
						 
						
							
							
								
								Fix comment.  
							
							 
							
							... 
							
							
							
							llvm-svn: 69053 
							
						 
						
							2009-04-14 17:42:51 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								a5d077df73 
								
							 
						 
						
							
							
								
								Support code generation of 'this' exprs  
							
							 
							
							... 
							
							
							
							llvm-svn: 69050 
							
						 
						
							2009-04-14 16:58:56 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								02e987f3e8 
								
							 
						 
						
							
							
								
								implement codegen support for __attribute((__gnuc_inline__)),  
							
							 
							
							... 
							
							
							
							pulling some attribute munging stuff into GetLinkageForFunction.
This should fix PR3986
llvm-svn: 69045 
							
						 
						
							2009-04-14 16:44:36 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								389325715b 
								
							 
						 
						
							
							
								
								Refactor how attributes are set on values.  
							
							 
							
							... 
							
							
							
							- Pull out SetCommonAttributes, which handles the things common to
   aliases, methods, functions, and variables.
 - Pull out SetLLVMFunctionAttributesForDefinition, which handles the
   LLVM attributes which we only want to apply to a definition (like
   noinline and alwaysinline).
 - Kill SetGVDeclarationAttributes (inlined into SetFunctionAttributes
   and specialized).
 - Kill SetFunctionAttributesForDefinition (inlined into sole caller).
 - Inline SetGVDefinitionAttributes into SetMethodAttributes and
   specialize.
 - Rename SetGVDefinitionAttributes to SetFunctionDefinitionAttributes.
This is supposed to be a no functionality change commit, but I may
have made a mistake.
llvm-svn: 69036 
							
						 
						
							2009-04-14 08:05:55 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								81a3f1bdf3 
								
							 
						 
						
							
							
								
								Split SetGlobalValueAttributes into definition/declaration halves.  
							
							 
							
							... 
							
							
							
							- No functionality change.
llvm-svn: 69035 
							
						 
						
							2009-04-14 07:19:20 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								aeddffc99d 
								
							 
						 
						
							
							
								
								Rename (one) SetFunctionAttributes to SetLLVMFunctionAttributes to  
							
							 
							
							... 
							
							
							
							disambiguate it.
 - No functionality change.
llvm-svn: 69034 
							
						 
						
							2009-04-14 07:08:30 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								64a41cb39e 
								
							 
						 
						
							
							
								
								Reduce indentation, no functionality change.  
							
							 
							
							... 
							
							
							
							llvm-svn: 69033 
							
						 
						
							2009-04-14 07:02:17 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								92028dad66 
								
							 
						 
						
							
							
								
								defer emission of always_inline, extern_inline, and inline functions (when  
							
							 
							
							... 
							
							
							
							not in c89 mode).
llvm-svn: 69032 
							
						 
						
							2009-04-14 06:44:48 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								169a5c963f 
								
							 
						 
						
							
							
								
								give always_inline functions internal linkage.  If they cannot be  
							
							 
							
							... 
							
							
							
							inlined for some reason, then we don't want a strong or even weak
definition.
llvm-svn: 69031 
							
						 
						
							2009-04-14 06:32:05 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								256c9507c8 
								
							 
						 
						
							
							
								
								set the linkage of an inline function according to its language rules.  
							
							 
							
							... 
							
							
							
							llvm-svn: 69030 
							
						 
						
							2009-04-14 06:27:57 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								29eff88fc8 
								
							 
						 
						
							
							
								
								Add a comment on SetGlobalValueAttributes.  
							
							 
							
							... 
							
							
							
							llvm-svn: 69029 
							
						 
						
							2009-04-14 06:19:49 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								3e031f4121 
								
							 
						 
						
							
							
								
								add a new enum type for linkage, no functionality change.  
							
							 
							
							... 
							
							
							
							llvm-svn: 69028 
							
						 
						
							2009-04-14 06:04:17 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								f5f359fb73 
								
							 
						 
						
							
							
								
								Clean up handling of visibility.  
							
							 
							
							... 
							
							
							
							llvm-svn: 69027 
							
						 
						
							2009-04-14 06:00:08 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								73920ce565 
								
							 
						 
						
							
							
								
								reduce indentation, no functionality change.  
							
							 
							
							... 
							
							
							
							llvm-svn: 69026 
							
						 
						
							2009-04-14 05:33:52 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								6a0f907a5e 
								
							 
						 
						
							
							
								
								do not set visibility on "private" or "available externally" linkage objects.  
							
							 
							
							... 
							
							
							
							llvm-svn: 69025 
							
						 
						
							2009-04-14 05:27:13 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								4c0dc0e48a 
								
							 
						 
						
							
							
								
								Use hasAttr instead of getAttr for conditionals.  
							
							 
							
							... 
							
							
							
							llvm-svn: 69021 
							
						 
						
							2009-04-14 02:45:29 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								0ca1660129 
								
							 
						 
						
							
							
								
								Audit __private_extern__ handling.  
							
							 
							
							... 
							
							
							
							- Exposed quite a few Sema issues and a CodeGen crash.
 - See FIXMEs in test case, and in SemaDecl.cpp (PR3983).
I'm skeptical that __private_extern__ should actually be a storage
class value. I think that __private_extern__ basically amounts to
  extern A __attribute__((visibility("hidden")))
and would be better off handled (a) as that, or (b) with an extra bit
in the VarDecl.
llvm-svn: 69020 
							
						 
						
							2009-04-14 02:25:56 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								ca5ae66122 
								
							 
						 
						
							
							
								
								Fixup CodeGen for __weak __block variables.  Radar 6756266  
							
							 
							
							... 
							
							
							
							llvm-svn: 69010 
							
						 
						
							2009-04-14 00:57:29 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								20bb5e02a5 
								
							 
						 
						
							
							
								
								Minor work related to removing the assumption that value initialization  
							
							 
							
							... 
							
							
							
							implies an all-zero bit pattern.
llvm-svn: 68994 
							
						 
						
							2009-04-13 21:47:26 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								c08711e840 
								
							 
						 
						
							
							
								
								Minor simplification.  
							
							 
							
							... 
							
							
							
							llvm-svn: 68992 
							
						 
						
							2009-04-13 21:41:57 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								4184ac847f 
								
							 
						 
						
							
							
								
								Update to use hasAttr() instead of getAttr().  
							
							 
							
							... 
							
							
							
							- No functionality change.
llvm-svn: 68987 
							
						 
						
							2009-04-13 21:08:27 +00:00  
						
					 
				
					
						
							
							
								 
								Steve Naroff
							
						 
						
							 
							
							
							
							
								
							
							
								fb46e8658c 
								
							 
						 
						
							
							
								
								Move/update recent FIXME (wrt UTF-8 checking for ObjC @-strings).  
							
							 
							
							... 
							
							
							
							llvm-svn: 68982 
							
						 
						
							2009-04-13 20:26:29 +00:00  
						
					 
				
					
						
							
							
								 
								Steve Naroff
							
						 
						
							 
							
							
							
							
								
							
							
								84073ec51f 
								
							 
						 
						
							
							
								
								Fixed crasher in <rdar://problem/6780904> [irgen] Assertion failed: (Result == conversionOK && "UTF-8 to UTF-16 conversion failed"), function GetAddrOfConstantCFString, file CodeGenModule.cpp, line 1063.  
							
							 
							
							... 
							
							
							
							Still a diagnostic related FIXME (will discuss with Daniel/Fariborz offline).
llvm-svn: 68975 
							
						 
						
							2009-04-13 19:08:08 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								1235bbce7e 
								
							 
						 
						
							
							
								
								Use the new guard variable mangling function and get rid of the old code.  
							
							 
							
							... 
							
							
							
							llvm-svn: 68971 
							
						 
						
							2009-04-13 18:03:33 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								0c08f6fdde 
								
							 
						 
						
							
							
								
								Add support for mangling guard variables.  
							
							 
							
							... 
							
							
							
							llvm-svn: 68969 
							
						 
						
							2009-04-13 18:02:10 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								a4f6b6b180 
								
							 
						 
						
							
							
								
								Minor refactoring of my last patch.  
							
							 
							
							... 
							
							
							
							llvm-svn: 68870 
							
						 
						
							2009-04-11 18:54:57 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								aae4349df9 
								
							 
						 
						
							
							
								
								Fixes a ir-gen crash for K&R style blocks.  
							
							 
							
							... 
							
							
							
							llvm-svn: 68865 
							
						 
						
							2009-04-11 17:55:15 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								d8281f1589 
								
							 
						 
						
							
							
								
								Don't mangle variables that are at translation unit scope.  
							
							 
							
							... 
							
							
							
							llvm-svn: 68853 
							
						 
						
							2009-04-11 01:19:45 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								d8e39bbb84 
								
							 
						 
						
							
							
								
								Add support for generating reference initialization code.  
							
							 
							
							... 
							
							
							
							llvm-svn: 68852 
							
						 
						
							2009-04-11 01:08:03 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								d352fd3699 
								
							 
						 
						
							
							
								
								Fixup copy/dispose helpers for Objective-C.  Radar 6756504  
							
							 
							
							... 
							
							
							
							llvm-svn: 68837 
							
						 
						
							2009-04-10 23:09:55 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								7f96b360f2 
								
							 
						 
						
							
							
								
								Remove asserts that weren't really useful, and that would fire in case the CleanupEntries vector needed to be reallocated.  
							
							 
							
							... 
							
							
							
							llvm-svn: 68835 
							
						 
						
							2009-04-10 22:49:13 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								8c920c9220 
								
							 
						 
						
							
							
								
								Don't set both readnone and readonly.  
							
							 
							
							... 
							
							
							
							llvm-svn: 68833 
							
						 
						
							2009-04-10 22:14:52 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								d272cca527 
								
							 
						 
						
							
							
								
								Internal variables could mistakenly have "hidden" visibility when  
							
							 
							
							... 
							
							
							
							their emission was deferred.
 - <rdar://problem/6775234> variables with internal linkage should not
   be exposed with -fvisibility=hidden.
llvm-svn: 68818 
							
						 
						
							2009-04-10 20:26:50 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								6764593098 
								
							 
						 
						
							
							
								
								Fixup codegen for nested blocks that use copy/dispose in the inner  
							
							 
							
							... 
							
							
							
							blocks, so that the outer blocks use it as well.  Radar 6762279
llvm-svn: 68811 
							
						 
						
							2009-04-10 18:52:28 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								464423dce4 
								
							 
						 
						
							
							
								
								Patch to generate meta-data for prtocol used  
							
							 
							
							... 
							
							
							
							in @protocol expression.
llvm-svn: 68806 
							
						 
						
							2009-04-10 18:47:34 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								6ef4ea499f 
								
							 
						 
						
							
							
								
								Rename variables to avoid conflict.  
							
							 
							
							... 
							
							
							
							llvm-svn: 68764 
							
						 
						
							2009-04-10 04:59:59 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								6bc4aaa2eb 
								
							 
						 
						
							
							
								
								Make messages consistent.  
							
							 
							
							... 
							
							
							
							llvm-svn: 68756 
							
						 
						
							2009-04-10 00:37:08 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								5286e774ee 
								
							 
						 
						
							
							
								
								reject codegen of __thread variables as unimplemented, rdar://6775265  
							
							 
							
							... 
							
							
							
							llvm-svn: 68755 
							
						 
						
							2009-04-10 00:35:59 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								bcced4ec31 
								
							 
						 
						
							
							
								
								Propagate the ASTContext to various AST traversal and lookup functions.  
							
							 
							
							... 
							
							
							
							No functionality change (really).
llvm-svn: 68726 
							
						 
						
							2009-04-09 21:40:53 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								479e6fc7a7 
								
							 
						 
						
							
							
								
								Use the new EmitCallArgs function. No indented functionality change.  
							
							 
							
							... 
							
							
							
							llvm-svn: 68652 
							
						 
						
							2009-04-08 23:13:16 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								60ce3fe140 
								
							 
						 
						
							
							
								
								Add code for emitting call arguments (not used yet).  
							
							 
							
							... 
							
							
							
							llvm-svn: 68639 
							
						 
						
							2009-04-08 20:47:54 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								03a409feda 
								
							 
						 
						
							
							
								
								We weren't generating correct code for calls to variadic member functions.  
							
							 
							
							... 
							
							
							
							llvm-svn: 68635 
							
						 
						
							2009-04-08 20:31:57 +00:00  
						
					 
				
					
						
							
							
								 
								Devang Patel
							
						 
						
							 
							
							
							
							
								
							
							
								2ac33a08d5 
								
							 
						 
						
							
							
								
								Use presumed location to get line number info.  
							
							 
							
							... 
							
							
							
							llvm-svn: 68630 
							
						 
						
							2009-04-08 19:47:04 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								d92123fd2a 
								
							 
						 
						
							
							
								
								Make sure value is initialized when built w/o asserts.  
							
							 
							
							... 
							
							
							
							llvm-svn: 68615 
							
						 
						
							2009-04-08 16:23:09 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								3b358a3d83 
								
							 
						 
						
							
							
								
								Make debug info work when using -save-temps.  
							
							 
							
							... 
							
							
							
							- This is pretty ugly, but the most obvious solution. Chime in if you
   have a nicer one.
 - The problem is that with -save-temps, clang-cc has no idea what the
   name of the original input file is. However, the user expects to be
   able to set breakpoints based on the input file name.
 - We support this by providing a new option -main-file-name (similar
   to -dumpbase used by gcc) which allows the driver to pass in the
   original file name.
 - <rdar://problem/6753383> building with clang using --save-temps
   gets the compile unit name from the .i file...
llvm-svn: 68595 
							
						 
						
							2009-04-08 05:11:16 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								80f97ab08f 
								
							 
						 
						
							
							
								
								Add a destination type argument to EmitConstantExpr. This will be used for when the destination has a reference type. (No functionality change yet)  
							
							 
							
							... 
							
							
							
							llvm-svn: 68593 
							
						 
						
							2009-04-08 04:48:15 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								8f28d01126 
								
							 
						 
						
							
							
								
								Implementation definition of interfaces with __objc_exception attribute.  
							
							 
							
							... 
							
							
							
							- Complete <rdar://problem/6635883> Support __objc_exception__
   attribute
llvm-svn: 68591 
							
						 
						
							2009-04-08 04:21:03 +00:00  
						
					 
				
					
						
							
							
								 
								Sanjiv Gupta
							
						 
						
							 
							
							
							
							
								
							
							
								562d68e8db 
								
							 
						 
						
							
							
								
								Pointer width on targets like PIC16 is 16-bit, while the valid index size to GEP is only 32 or 64. So promote index to 32 in such cases.  
							
							 
							
							... 
							
							
							
							llvm-svn: 68590 
							
						 
						
							2009-04-08 04:16:39 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								a60cbcdfe6 
								
							 
						 
						
							
							
								
								Don't assume that a block always has a FunctionProtoType. Fixes rdar://6768379.  
							
							 
							
							... 
							
							
							
							llvm-svn: 68583 
							
						 
						
							2009-04-08 02:55:55 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								ea10ab668f 
								
							 
						 
						
							
							
								
								Visibility attributes should only be set on definition.  
							
							 
							
							... 
							
							
							
							llvm-svn: 68561 
							
						 
						
							2009-04-07 22:36:33 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								5f50c651e9 
								
							 
						 
						
							
							
								
								Shuffle some call code around. No functionality change.  
							
							 
							
							... 
							
							
							
							llvm-svn: 68557 
							
						 
						
							2009-04-07 22:10:22 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								57eb2e021e 
								
							 
						 
						
							
							
								
								Propagte -fvisibility to objc2's class symbols.  
							
							 
							
							... 
							
							
							
							llvm-svn: 68543 
							
						 
						
							2009-04-07 20:26:30 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								d8db853243 
								
							 
						 
						
							
							
								
								Remove some dead code.  
							
							 
							
							... 
							
							
							
							llvm-svn: 68532 
							
						 
						
							2009-04-07 18:53:02 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								d7beeea228 
								
							 
						 
						
							
							
								
								Handle use side of __objc_exception__ attribute; when using an  
							
							 
							
							... 
							
							
							
							exception with this attribute we don't need to emit a weak definition
for the exception type information.
llvm-svn: 68513 
							
						 
						
							2009-04-07 06:43:45 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								15894b791b 
								
							 
						 
						
							
							
								
								Various fixes to symbols used for Obj-C x86_64 metadata.  
							
							 
							
							... 
							
							
							
							- Changed method names to match gcc (categories names still aren't
   mangled in).
 - Expose correct name for class and metadata symbols (although
   -fvisibility=hidden isn't yet correct).
 - Remove several things from llvm.used that didn't need to be there
   (I suspect this can still be trimmed).
 - Don't use asm-prefix extension for _objc_empty_{cache,vtable} (not
   needed).
 - Hide EH type class info with -fvisibility=hidden
 - Change setGlobal[Option]Visibility to not change the visibility of
   functions with internal linkage.
llvm-svn: 68510 
							
						 
						
							2009-04-07 05:48:37 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								4fab57ddea 
								
							 
						 
						
							
							
								
								Implement __sync_{add,sub,and,or,xor}_and_fetch and  
							
							 
							
							... 
							
							
							
							__sync_bool_compare_and_swap.
 - <rdar://problem/6762223> [sema/irgen] support
   __sync_bool_compare_and_swap and __sync_add_and_fetch
llvm-svn: 68482 
							
						 
						
							2009-04-07 00:55:51 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								350da60733 
								
							 
						 
						
							
							
								
								Use the new getFunctionInfo that takes a BlockPointerType parameter, and get rid of getBlockFunctionType from CGBlocks.cpp  
							
							 
							
							... 
							
							
							
							llvm-svn: 68478 
							
						 
						
							2009-04-07 00:20:24 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								bc3c77b881 
								
							 
						 
						
							
							
								
								Fixed visibility issues related to objc2's synthesized  
							
							 
							
							... 
							
							
							
							ivars.
llvm-svn: 68453 
							
						 
						
							2009-04-06 18:30:00 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								6f811f149b 
								
							 
						 
						
							
							
								
								Add a getFunctionInfo that takes a BlockPointerType.  
							
							 
							
							... 
							
							
							
							llvm-svn: 68452 
							
						 
						
							2009-04-06 18:05:26 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								2266e244b5 
								
							 
						 
						
							
							
								
								Simplify C++ member function calls.  
							
							 
							
							... 
							
							
							
							llvm-svn: 68451 
							
						 
						
							2009-04-06 17:45:20 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								dcceee734c 
								
							 
						 
						
							
							
								
								Fix a couple of cases where Constant* pointers can dangle in  
							
							 
							
							... 
							
							
							
							ObjCNonFragileABITypesHelper by converting them to dynamic
getters.  This fixes a crash on rdar://6757213.  The others
should be converted over as well.
llvm-svn: 68445 
							
						 
						
							2009-04-06 16:53:45 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								468fa6366b 
								
							 
						 
						
							
							
								
								Add some basic support for generating C++ member functions.  
							
							 
							
							... 
							
							
							
							llvm-svn: 68425 
							
						 
						
							2009-04-04 20:47:02 +00:00  
						
					 
				
					
						
							
							
								 
								Anton Korobeynikov
							
						 
						
							 
							
							
							
							
								
							
							
								c847824e8e 
								
							 
						 
						
							
							
								
								Basic support for regparm codegen  
							
							 
							
							... 
							
							
							
							llvm-svn: 68414 
							
						 
						
							2009-04-04 00:49:24 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								e5fd6f2227 
								
							 
						 
						
							
							
								
								Add support for calling C++ member functions.  
							
							 
							
							... 
							
							
							
							llvm-svn: 68412 
							
						 
						
							2009-04-03 22:50:24 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								b15b55c2d0 
								
							 
						 
						
							
							
								
								Add a getFunctionInfo that takes a CXXMethodDecl.  
							
							 
							
							... 
							
							
							
							llvm-svn: 68411 
							
						 
						
							2009-04-03 22:48:58 +00:00  
						
					 
				
					
						
							
							
								 
								Steve Naroff
							
						 
						
							 
							
							
							
							
								
							
							
								55a719835d 
								
							 
						 
						
							
							
								
								Add a comment/FIXME so Eli can sleep better:-))  
							
							 
							
							... 
							
							
							
							llvm-svn: 68379 
							
						 
						
							2009-04-03 09:44:50 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								befc9dfbff 
								
							 
						 
						
							
							
								
								Implement -fvisibility.  
							
							 
							
							... 
							
							
							
							llvm-svn: 68369 
							
						 
						
							2009-04-03 03:28:57 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								fd6cfcffa2 
								
							 
						 
						
							
							
								
								Add target hook for setting symbol prefix and section of unicode  
							
							 
							
							... 
							
							
							
							string literals.
llvm-svn: 68363 
							
						 
						
							2009-04-03 00:57:44 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								38a5c9650e 
								
							 
						 
						
							
							
								
								Fix up lookup rules for properties declared in  
							
							 
							
							... 
							
							
							
							objc's continuation class.
llvm-svn: 68339 
							
						 
						
							2009-04-02 18:44:20 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								d3e3885f2d 
								
							 
						 
						
							
							
								
								Remove -ftrapu.  
							
							 
							
							... 
							
							
							
							llvm-svn: 68330 
							
						 
						
							2009-04-02 18:15:54 +00:00  
						
					 
				
					
						
							
							
								 
								Sanjiv Gupta
							
						 
						
							 
							
							
							
							
								
							
							
								639f2d92f8 
								
							 
						 
						
							
							
								
								Don't use static globals for params as it confuses the optimzer that their values are never being used in the function.  
							
							 
							
							... 
							
							
							
							llvm-svn: 68328 
							
						 
						
							2009-04-02 17:51:27 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								4eca109941 
								
							 
						 
						
							
							
								
								Implement mangling of declarations inside functions.  
							
							 
							
							... 
							
							
							
							llvm-svn: 68321 
							
						 
						
							2009-04-02 16:24:45 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								f2125a02db 
								
							 
						 
						
							
							
								
								Mangle VarDecls correctly.  
							
							 
							
							... 
							
							
							
							llvm-svn: 68320 
							
						 
						
							2009-04-02 16:05:20 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								810679c37a 
								
							 
						 
						
							
							
								
								Move the function decl mangling code out into its own function. No functionality change.  
							
							 
							
							... 
							
							
							
							llvm-svn: 68319 
							
						 
						
							2009-04-02 15:51:53 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								cbaeb9e633 
								
							 
						 
						
							
							
								
								Emit code for linkage specifications.  
							
							 
							
							... 
							
							
							
							llvm-svn: 68300 
							
						 
						
							2009-04-02 05:55:18 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								f7e01ffa4a 
								
							 
						 
						
							
							
								
								When compiling C++ code, always mangle the names of static block var decls.  
							
							 
							
							... 
							
							
							
							llvm-svn: 68280 
							
						 
						
							2009-04-02 03:29:47 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								40968598c7 
								
							 
						 
						
							
							
								
								Fixup -ftrapv to be more gcc compatible.  -ftrapu (for want of a  
							
							 
							
							... 
							
							
							
							better name) is the option that SmallTalk can use to intercept all
overflows, including unsigned.  I added some testcases so we don't
break anything.
Also included is another patch from David for += and friends.
llvm-svn: 68267 
							
						 
						
							2009-04-02 01:03:55 +00:00  
						
					 
				
					
						
							
							
								 
								Steve Naroff
							
						 
						
							 
							
							
							
							
								
							
							
								8d816d6cb5 
								
							 
						 
						
							
							
								
								CodeGenModule::GetAddrOfConstantCFString():  
							
							 
							
							... 
							
							
							
							- Finish up support for converting UTF8->UTF16 to support ObjC @"string" constants.
Remove warning from CheckObjCString.
As the FIXME in the test case indicates, I still have a bug to work out (apparently with \u handling).
llvm-svn: 68245 
							
						 
						
							2009-04-01 21:16:31 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								0c61b7322a 
								
							 
						 
						
							
							
								
								Add -ftrapv support, patch from David Chisnall; well all except the  
							
							 
							
							... 
							
							
							
							clang option code that is and two bug fixes.
llvm-svn: 68240 
							
						 
						
							2009-04-01 20:28:16 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								c2d5618083 
								
							 
						 
						
							
							
								
								Fixes a problem where the compiler is reporting the wrong size to the Gnu  
							
							 
							
							... 
							
							
							
							runtime on 64-bit architectures.
Patch by David Chisnall
llvm-svn: 68238 
							
						 
						
							2009-04-01 19:49:42 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								78be1651e2 
								
							 
						 
						
							
							
								
								Nonfragile ivar synthesis with property is in a continuation  
							
							 
							
							... 
							
							
							
							class.
llvm-svn: 68234 
							
						 
						
							2009-04-01 19:37:34 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								b4b81d8ab1 
								
							 
						 
						
							
							
								
								Revert r68221, -ftrapv support, which causes several regressions in  
							
							 
							
							... 
							
							
							
							Clang's test suite.
llvm-svn: 68230 
							
						 
						
							2009-04-01 18:59:55 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								fbc8c132ba 
								
							 
						 
						
							
							
								
								Add -ftrapv support, patch from David Chisnall; well all except the  
							
							 
							
							... 
							
							
							
							clang option code that is.
llvm-svn: 68221 
							
						 
						
							2009-04-01 18:19:33 +00:00  
						
					 
				
					
						
							
							
								 
								Steve Naroff
							
						 
						
							 
							
							
							
							
								
							
							
								29cae66bde 
								
							 
						 
						
							
							
								
								Add ConvertUTF module from  http://www.unicode.org/Public/PROGRAMS/CVTUTF .  
							
							 
							
							... 
							
							
							
							#ifdef'd out the 5 conversion routines that we don't currently need.
Still need a bit more work in GetAddrOfConstantCFString(). Added a FIXME to indicate this.
Expect to remove the FIXME today...
llvm-svn: 68208 
							
						 
						
							2009-04-01 15:50:34 +00:00  
						
					 
				
					
						
							
							
								 
								Steve Naroff
							
						 
						
							 
							
							
							
							
								
							
							
								e14b368fa9 
								
							 
						 
						
							
							
								
								More "prep" work for handling UTF16 CFString.  
							
							 
							
							... 
							
							
							
							Patch by Jean-Daniel Dupas. Thanks!
llvm-svn: 68203 
							
						 
						
							2009-04-01 13:55:36 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								e80bd1897c 
								
							 
						 
						
							
							
								
								x86-32 Darwin ABI: Handle small structures correctly.  
							
							 
							
							... 
							
							
							
							- Small structures are returned in a register if: 
    1. They fit nicely in a  register.
    2. All fields fit nicely in a register.
   (more or less)
 - We now pass the first 5000 ABITests if unions are disabled.
 - <rdar://problem/6497882> [irgen] x86-32 ABI compatibility with
   small structs
llvm-svn: 68197 
							
						 
						
							2009-04-01 07:45:00 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								58e2971bb0 
								
							 
						 
						
							
							
								
								x86-32 Darwin ABI: Single element arrays can be part of "single  
							
							 
							
							... 
							
							
							
							element structures", which have different ABI rules.
 - Current return-arguments-32 status is: 1 out of 1000 failures (-7)
 - Also, vectors inside "single element structs" require special
   handling.
llvm-svn: 68196 
							
						 
						
							2009-04-01 07:08:38 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								3088a31e96 
								
							 
						 
						
							
							
								
								remove ASTContext::buildObjCInterfaceType, which breaks canonical  
							
							 
							
							... 
							
							
							
							types.  It is no longer needed now that the code generator 
re-lays-out interfaces if they are defines after being laid out
from a forward decl.
llvm-svn: 68194 
							
						 
						
							2009-04-01 06:23:52 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								cd76e673eb 
								
							 
						 
						
							
							
								
								x86-32 Darwin ABI: Handle direct return of vectors.  
							
							 
							
							... 
							
							
							
							- Current return-arguments-32 status is: 8 out of 1000 failures (-7)
llvm-svn: 68192 
							
						 
						
							2009-04-01 06:13:08 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								f77e292a0f 
								
							 
						 
						
							
							
								
								Fix a subtle bug where the cleanup scope entries had a dangling block reference  
							
							 
							
							... 
							
							
							
							- <rdar://problem/6732143> Crash when generating @synchronize for
   zero-cost exception
 - Thanks to Anders for helping track down the problem.
llvm-svn: 68186 
							
						 
						
							2009-04-01 04:37:47 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								d18136a644 
								
							 
						 
						
							
							
								
								fix the two xfails I added with a previous patch by making ObjC interface  
							
							 
							
							... 
							
							
							
							types get completed when their definition is seen if previously laid out by
the code generator.
llvm-svn: 68177 
							
						 
						
							2009-04-01 02:36:43 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								6483908957 
								
							 
						 
						
							
							
								
								move trivial forwarding function inline.  
							
							 
							
							... 
							
							
							
							llvm-svn: 68176 
							
						 
						
							2009-04-01 02:08:13 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								87bc387f8f 
								
							 
						 
						
							
							
								
								tidy some code.  
							
							 
							
							... 
							
							
							
							llvm-svn: 68174 
							
						 
						
							2009-04-01 02:00:48 +00:00  
						
					 
				
					
						
							
							
								 
								Mike Stump
							
						 
						
							 
							
							
							
							
								
							
							
								cafa0a9746 
								
							 
						 
						
							
							
								
								Fix block comparisons.  Radar 6732116.  
							
							 
							
							... 
							
							
							
							llvm-svn: 68171 
							
						 
						
							2009-04-01 01:17:39 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								237f349073 
								
							 
						 
						
							
							
								
								Implement code generation of namespaces and add mangling tests.  
							
							 
							
							... 
							
							
							
							llvm-svn: 68170 
							
						 
						
							2009-04-01 00:58:25 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								12edad2c50 
								
							 
						 
						
							
							
								
								Fix a bug (that I thought I had fixed already) where mangling a prefix could get us into an infinite loop  
							
							 
							
							... 
							
							
							
							llvm-svn: 68168 
							
						 
						
							2009-04-01 00:42:16 +00:00  
						
					 
				
					
						
							
							
								 
								Anders Carlsson
							
						 
						
							 
							
							
							
							
								
							
							
								7a6f8b9281 
								
							 
						 
						
							
							
								
								Fix a mangling bug where functions with no arguments weren't getting the 'v' parameter specifier.  
							
							 
							
							... 
							
							
							
							llvm-svn: 68162 
							
						 
						
							2009-04-01 00:15:23 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								08b216abf1 
								
							 
						 
						
							
							
								
								Add Target hooks for IRgen of [cf]string literals.  
							
							 
							
							... 
							
							
							
							- Notably, set section on cfstring literal string data (for now, this
   is done everywhere because it matches what we were already doing
   for the CFString data itself)
 - <rdar://problem/6599098> [irgen] linker requires objc string data
   to go into cstring
llvm-svn: 68160 
							
						 
						
							2009-03-31 23:42:16 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								f41e87f4cd 
								
							 
						 
						
							
							
								
								Change UsedArray to be a vector of WeakVH to fix a dangling pointer problem that occurs when  
							
							 
							
							... 
							
							
							
							attribute(used) and asm renaming are used together.
llvm-svn: 68155 
							
						 
						
							2009-03-31 22:37:52 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								2739d2bbe6 
								
							 
						 
						
							
							
								
								remove some obsolete comments, use an AssertingVH.  
							
							 
							
							... 
							
							
							
							llvm-svn: 68151 
							
						 
						
							2009-03-31 22:17:44 +00:00  
						
					 
				
					
						
							
							
								 
								Daniel Dunbar
							
						 
						
							 
							
							
							
							
								
							
							
								35579146aa 
								
							 
						 
						
							
							
								
								x86_32 Darwin ABI: Treat empty unions like empty structures.  
							
							 
							
							... 
							
							
							
							- Current return-arguments-32 status: 15/1000 failures
llvm-svn: 68132 
							
						 
						
							2009-03-31 19:01:39 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								89d239796a 
								
							 
						 
						
							
							
								
								Patch to fix proptocol reference ir-gen for GNU runtime.  
							
							 
							
							... 
							
							
							
							Patch by David Chisnal.
llvm-svn: 68125 
							
						 
						
							2009-03-31 18:27:22 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								63a224ad59 
								
							 
						 
						
							
							
								
								ir-gen support for nonfragile abi's synthesized ivars.  
							
							 
							
							... 
							
							
							
							llvm-svn: 68122 
							
						 
						
							2009-03-31 18:11:23 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								3254a6f94c 
								
							 
						 
						
							
							
								
								More toward nonfragile abi's synthesized ivars.  
							
							 
							
							... 
							
							
							
							llvm-svn: 68115 
							
						 
						
							2009-03-31 17:00:52 +00:00  
						
					 
				
					
						
							
							
								 
								Steve Naroff
							
						 
						
							 
							
							
							
							
								
							
							
								66afeb5968 
								
							 
						 
						
							
							
								
								Some "prep" work for handling ObjC @-string constants that contain UTF-8. No functionality change.  
							
							 
							
							... 
							
							
							
							Changed GenerateConstantString() to take an ObjCStringLiteral (instead of a std::string). While this isn't strictly necessary, it seems cleaner and allows us to cache to "containsNonAscii" if necessary (to avoid checking in both Sema and CodeGen).
llvm-svn: 68114 
							
						 
						
							2009-03-31 16:53:37 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								05aa49128c 
								
							 
						 
						
							
							
								
								remove a dead prototype  
							
							 
							
							... 
							
							
							
							llvm-svn: 68105 
							
						 
						
							2009-03-31 09:07:15 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								733dc19be6 
								
							 
						 
						
							
							
								
								remove the warning.  We don't control what users do, and this code  
							
							 
							
							... 
							
							
							
							is run for perfectly reasonable things like NSString* because type
layout is recursive.
llvm-svn: 68104 
							
						 
						
							2009-03-31 09:04:50 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								3e2f36e905 
								
							 
						 
						
							
							
								
								do not *copy* objc interface types, just use their reference.  
							
							 
							
							... 
							
							
							
							llvm-svn: 68102 
							
						 
						
							2009-03-31 08:55:07 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								5b36ddb1ad 
								
							 
						 
						
							
							
								
								fill in temporary smallvectors instead of vectors for performance.  
							
							 
							
							... 
							
							
							
							Fix BuildAggrIvarLayout to not access vectors out of range.
llvm-svn: 68101 
							
						 
						
							2009-03-31 08:48:01 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								06ae0e2c3b 
								
							 
						 
						
							
							
								
								small cleanups.  
							
							 
							
							... 
							
							
							
							llvm-svn: 68095 
							
						 
						
							2009-03-31 08:33:16 +00:00  
						
					 
				
					
						
							
							
								 
								Douglas Gregor
							
						 
						
							 
							
							
							
							
								
							
							
								dc572a3266 
								
							 
						 
						
							
							
								
								Improve the representation of template names in the AST. This  
							
							 
							
							... 
							
							
							
							representation handles the various ways in which one can name a
template, including unqualified references ("vector"), qualified
references ("std::vector"), and dependent template names
("MetaFun::template apply").
One immediate effect of this change is that the representation of
nested-name-specifiers in type names for class template
specializations (e.g., std::vector<int>) is more accurate. Rather than
representing std::vector<int> as
  std::(vector<int>)
we represent it as
  (std::vector)<int>
which more closely follows the C++ grammar. 
Additionally, templates are no longer represented as declarations
(DeclPtrTy) in Parse-Sema interactions. Instead, I've introduced a new
OpaquePtr type (TemplateTy) that holds the representation of a
TemplateName. This will simplify the handling of dependent
template-names, once we get there.
llvm-svn: 68074 
							
						 
						
							2009-03-30 22:58:21 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								ed308a94da 
								
							 
						 
						
							
							
								
								Code gen does not yet supports __asm__ on a variable  
							
							 
							
							... 
							
							
							
							declaration. Reject it.
llvm-svn: 68058 
							
						 
						
							2009-03-30 20:32:06 +00:00  
						
					 
				
					
						
							
							
								 
								Fariborz Jahanian
							
						 
						
							 
							
							
							
							
								
							
							
								3b636c15e0 
								
							 
						 
						
							
							
								
								Use CodeGenModule API for ObjC runtime function references.  
							
							 
							
							... 
							
							
							
							Patch by David Chisnall.
llvm-svn: 68043 
							
						 
						
							2009-03-30 18:02:14 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								5bbb3c8ad9 
								
							 
						 
						
							
							
								
								Push DeclGroup much farther throughout the compiler.  Now the various  
							
							 
							
							... 
							
							
							
							productions (except the already broken ObjC cases like @class  X,Y;) in 
the parser that can produce more than one Decl return a DeclGroup instead
of a Decl, etc.
This allows elimination of the Decl::NextDeclarator field, and exposes
various clients that should look at all decls in a group, but which were
only looking at one (such as the dumper, printer, etc).  These have been
fixed.
Still TODO:
1) there are some FIXME's in the code about potentially using
DeclGroup for better location info.
2) ParseObjCAtDirectives should return a DeclGroup due to @class  etc.
3) I'm not sure what is going on with StmtIterator.cpp, or if it can
   be radically simplified now.
4) I put a truly horrible hack in ParseTemplate.cpp.
I plan to bring up #3/4 on the mailing list, but don't plan to tackle
#1/2 in the short term.
llvm-svn: 68002 
							
						 
						
							2009-03-29 16:50:03 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								bbcf49e410 
								
							 
						 
						
							
							
								
								Initial implementation of ARM ABI.  Mostly untested.  Note that I'm not  
							
							 
							
							... 
							
							
							
							really intending to take ownership of this; I wrote this mostly because 
I was curious about how the ARM ABI works.  It should be a decent start, 
though.
llvm-svn: 67969 
							
						 
						
							2009-03-29 00:15:25 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								529efc74ad 
								
							 
						 
						
							
							
								
								rename some methods.  
							
							 
							
							... 
							
							
							
							llvm-svn: 67923 
							
						 
						
							2009-03-28 06:33:19 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								cf16983179 
								
							 
						 
						
							
							
								
								change HandleTranslationUnit to take an ASTContext instead of TranslationUnit  
							
							 
							
							... 
							
							
							
							llvm-svn: 67910 
							
						 
						
							2009-03-28 04:11:33 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								754d5ac658 
								
							 
						 
						
							
							
								
								Trivial cleanup.  
							
							 
							
							... 
							
							
							
							llvm-svn: 67899 
							
						 
						
							2009-03-28 03:27:06 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								09a9b6e335 
								
							 
						 
						
							
							
								
								Move where block-related variables are initialized so that block  
							
							 
							
							... 
							
							
							
							types don't get generated when blocks aren't used.
llvm-svn: 67898 
							
						 
						
							2009-03-28 03:24:54 +00:00  
						
					 
				
					
						
							
							
								 
								Eli Friedman
							
						 
						
							 
							
							
							
							
								
							
							
								9127aa1caf 
								
							 
						 
						
							
							
								
								Minor cleanup.  
							
							 
							
							... 
							
							
							
							llvm-svn: 67896 
							
						 
						
							2009-03-28 03:10:45 +00:00