6c59132241 
								
							 
						 
						
							
							
								
								Handle a couple missing builtins that will go away eventually when the various  
							
							... 
							
							
							
							intrin.h files are finished
llvm-svn: 51137 
							
						 
						
							2008-05-15 07:38:03 +00:00  
				
					
						
							
							
								 
						
							
								a1b4ed8003 
								
							 
						 
						
							
							
								
								Implementation of __builtin_shufflevector, a portable builtin capable of  
							
							... 
							
							
							
							expressing the full flexibility of the LLVM shufflevector instruction.  
The expected immediate usage is in *mmintrin.h, so that they don't 
depend on the mess of gcc-inherited (and not completely implemented)
shuffle builtins.
llvm-svn: 51113 
							
						 
						
							2008-05-14 19:38:39 +00:00  
				
					
						
							
							
								 
						
							
								9fd8b68568 
								
							 
						 
						
							
							
								
								Add codegen support for block-level compound literals.  
							
							... 
							
							
							
							llvm-svn: 51081 
							
						 
						
							2008-05-13 23:18:27 +00:00  
				
					
						
							
							
								 
						
							
								dd7406e65c 
								
							 
						 
						
							
							
								
								Add support for init lists for complex variables.  
							
							... 
							
							
							
							llvm-svn: 51080 
							
						 
						
							2008-05-13 23:11:35 +00:00  
				
					
						
							
							
								 
						
							
								d386215916 
								
							 
						 
						
							
							
								
								Remove AST dependency on VMCore by switching ExtVectorElementExpr off Constant.  
							
							... 
							
							
							
							llvm-svn: 51068 
							
						 
						
							2008-05-13 21:03:02 +00:00  
				
					
						
							
							
								 
						
							
								1a5754a26a 
								
							 
						 
						
							
							
								
								Detabify.  
							
							... 
							
							
							
							llvm-svn: 51042 
							
						 
						
							2008-05-13 14:40:48 +00:00  
				
					
						
							
							
								 
						
							
								6a7087e455 
								
							 
						 
						
							
							
								
								Emit basic block for switch body; fixes PR2307.  
							
							... 
							
							
							
							llvm-svn: 50968 
							
						 
						
							2008-05-12 16:08:04 +00:00  
				
					
						
							
							
								 
						
							
								6e31321043 
								
							 
						 
						
							
							
								
								Don't try to take the address of a bitfield; fixes PR2310.  
							
							... 
							
							
							
							llvm-svn: 50966 
							
						 
						
							2008-05-12 15:06:05 +00:00  
				
					
						
							
							
								 
						
							
								b84407d6ec 
								
							 
						 
						
							
							
								
								Added support to generate some atomic operators (add, sub, and, or etc..)  
							
							... 
							
							
							
							llvm-svn: 50919 
							
						 
						
							2008-05-09 22:40:52 +00:00  
				
					
						
							
							
								 
						
							
								f322eabbce 
								
							 
						 
						
							
							
								
								Extend vector member references to include {.hi, .lo, .e, .o} which return a  
							
							... 
							
							
							
							vector of the same element type and half the width, with the high, low, even,
and odd elements respectively.
Allow member references to member references, so that .hi.hi gives you the high
quarter of a vector.  This is fairly convenient syntax for some insert/extract
operations.
Remove some unnecessary methods/types in the ExtVectorElementExpr class.
llvm-svn: 50892 
							
						 
						
							2008-05-09 06:41:27 +00:00  
				
					
						
							
							
								 
						
							
								15cb669039 
								
							 
						 
						
							
							
								
								Added -g command line options to clang for generating source level debug information. This patch currently enables generation of line number debug information (stoppoints) and region begin/end debug information. The new files CGDebugInfo.h and CGDebugInfo.cpp implements the debug info manager class CGDebugInfo.  
							
							... 
							
							
							
							llvm-svn: 50848 
							
						 
						
							2008-05-08 08:54:20 +00:00  
				
					
						
							
							
								 
						
							
								b781dc79aa 
								
							 
						 
						
							
							
								
								Add basic support for the pic-* target triples and add support for  
							
							... 
							
							
							
							targets that do not support recursion (and thus codegen stack variables
as globals).
Patch contributed by Alireza Moshtaghi!
llvm-svn: 50844 
							
						 
						
							2008-05-08 05:58:21 +00:00  
				
					
						
							
							
								 
						
							
								ac25fc6f2e 
								
							 
						 
						
							
							
								
								Begin handling union bitfields.  
							
							... 
							
							
							
							Note, this is just beginning.
llvm-svn: 50835 
							
						 
						
							2008-05-07 22:28:29 +00:00  
				
					
						
							
							
								 
						
							
								243d5cd283 
								
							 
						 
						
							
							
								
								Fix PR2101 - Codegen crash during bitfield initialization.  
							
							... 
							
							
							
							llvm-svn: 50769 
							
						 
						
							2008-05-06 19:57:59 +00:00  
				
					
						
							
							
								 
						
							
								dbcc2ca6b2 
								
							 
						 
						
							
							
								
								simplify some builder calls.  
							
							... 
							
							
							
							llvm-svn: 50694 
							
						 
						
							2008-05-06 00:56:42 +00:00  
				
					
						
							
							
								 
						
							
								222c6123df 
								
							 
						 
						
							
							
								
								remove a stray printout  
							
							... 
							
							
							
							llvm-svn: 50691 
							
						 
						
							2008-05-06 00:44:00 +00:00  
				
					
						
							
							
								 
						
							
								1e151816b2 
								
							 
						 
						
							
							
								
								use simplified API for making fp constants.  
							
							... 
							
							
							
							llvm-svn: 50623 
							
						 
						
							2008-05-04 18:23:51 +00:00  
				
					
						
							
							
								 
						
							
								7b9293ba20 
								
							 
						 
						
							
							
								
								Simplify FunctionDecl::AddRedeclaration a bit by using std::swap.  
							
							... 
							
							
							
							Fix 'swapping' of attributes to not insert null values into the 
DeclAttrs map.
llvm-svn: 50612 
							
						 
						
							2008-05-04 02:29:49 +00:00  
				
					
						
							
							
								 
						
							
								bc22b5b327 
								
							 
						 
						
							
							
								
								if a decl is both 'static' and weak or static and inline, its linkage  
							
							... 
							
							
							
							type should be internal, not weak/linkonce.
llvm-svn: 50611 
							
						 
						
							2008-05-04 01:44:26 +00:00  
				
					
						
							
							
								 
						
							
								dd477ce32b 
								
							 
						 
						
							
							
								
								Verify the whole module after codegen to catch silly IR bugs.  
							
							... 
							
							
							
							llvm-svn: 50485 
							
						 
						
							2008-04-30 16:05:42 +00:00  
				
					
						
							
							
								 
						
							
								73669defed 
								
							 
						 
						
							
							
								
								remove the 'unused static' diagnostic from codegen.  This should be  
							
							... 
							
							
							
							reimplemented in Sema someday.  This is tracked in PR2236.  Until then
disabling it removes some bogus diagnostics (see 2236).
llvm-svn: 50263 
							
						 
						
							2008-04-25 15:47:13 +00:00  
				
					
						
							
							
								 
						
							
								1c906206b8 
								
							 
						 
						
							
							
								
								Fix PR2236  
							
							... 
							
							
							
							Add test
Implement feedback from Chris re: PR1998
llvm-svn: 50001 
							
						 
						
							2008-04-20 20:38:08 +00:00  
				
					
						
							
							
								 
						
							
								8e8d498d34 
								
							 
						 
						
							
							
								
								Only generate code for static functions and global variables that are actually used.  
							
							... 
							
							
							
							Warn about unused static functions and variables.
This fixes PR1998.
llvm-svn: 49987 
							
						 
						
							2008-04-20 06:29:50 +00:00  
				
					
						
							
							
								 
						
							
								ff2367c0c9 
								
							 
						 
						
							
							
								
								implement a fixme, add support for ++/-- on long double.  
							
							... 
							
							
							
							llvm-svn: 49980 
							
						 
						
							2008-04-20 00:50:39 +00:00  
				
					
						
							
							
								 
						
							
								1886e71e47 
								
							 
						 
						
							
							
								
								use simplified ConstantFP:get method.  
							
							... 
							
							
							
							llvm-svn: 49979 
							
						 
						
							2008-04-20 00:45:53 +00:00  
				
					
						
							
							
								 
						
							
								faae081131 
								
							 
						 
						
							
							
								
								Generate code for annotation attributes.  
							
							... 
							
							
							
							llvm-svn: 49951 
							
						 
						
							2008-04-19 04:17:09 +00:00  
				
					
						
							
							
								 
						
							
								7fab578b0d 
								
							 
						 
						
							
							
								
								Add support to module codegen for adding and emitting annotations  
							
							... 
							
							
							
							llvm-svn: 49944 
							
						 
						
							2008-04-18 23:43:57 +00:00  
				
					
						
							
							
								 
						
							
								ce4d7fce6b 
								
							 
						 
						
							
							
								
								OCUVector -> ExtVector, shorthand for extended vector, per feedback from Chris.  
							
							... 
							
							
							
							llvm-svn: 49942 
							
						 
						
							2008-04-18 23:10:10 +00:00  
				
					
						
							
							
								 
						
							
								26ed25253e 
								
							 
						 
						
							
							
								
								Allow targets to override double size, alignment, and semantics, and tie this  
							
							... 
							
							
							
							information into the IR type codegen.  This allows a target to codegen the C
'double' type as either double or float.
llvm-svn: 49898 
							
						 
						
							2008-04-18 05:41:31 +00:00  
				
					
						
							
							
								 
						
							
								08899ff85d 
								
							 
						 
						
							
							
								
								Remove FileVarDecl and BlockVarDecl. They are replaced by VarDecl::isBlockVarDecl() and VarDecl::isFileVarDecl().  
							
							... 
							
							
							
							This is a fairly mechanical/large change. As a result, I avoided making any changes/simplifications that weren't directly related. I did break two Analysis tests. I also have a couple FIXME's in UninitializedValues.cpp. Ted, can you take a look? If the bug isn't obvious, I am happy to dig in and fix it (since I broke it).
llvm-svn: 49748 
							
						 
						
							2008-04-15 22:42:06 +00:00  
				
					
						
							
							
								 
						
							
								91f40e3680 
								
							 
						 
						
							
							
								
								Enable clang to codegen emmintrin.h until we have our own emmintrin.h  
							
							... 
							
							
							
							llvm-svn: 49633 
							
						 
						
							2008-04-14 04:49:57 +00:00  
				
					
						
							
							
								 
						
							
								61705c1a6e 
								
							 
						 
						
							
							
								
								update to follow mainline llvm API change.  
							
							... 
							
							
							
							llvm-svn: 49607 
							
						 
						
							2008-04-13 07:32:11 +00:00  
				
					
						
							
							
								 
						
							
								43e0633048 
								
							 
						 
						
							
							
								
								The dtor CGObjCRuntime::~CGObjCRuntime() was implemented twice, once  
							
							... 
							
							
							
							in CGObjCGNU.cpp and once in CGObjCEtoile.cpp.  Moved its definition to
CGObjC.cpp.  This resolves a build error in Xcode, and also cleans things up.
llvm-svn: 49429 
							
						 
						
							2008-04-09 15:51:31 +00:00  
				
					
						
							
							
								 
						
							
								aa9c7aed0f 
								
							 
						 
						
							
							
								
								Add support for C++ default arguments, and rework Parse-Sema  
							
							... 
							
							
							
							interaction for function parameters, fixing PR2046.
Patch by Doug Gregor!
llvm-svn: 49369 
							
						 
						
							2008-04-08 04:40:51 +00:00  
				
					
						
							
							
								 
						
							
								fc4379f916 
								
							 
						 
						
							
							
								
								remove the Decl::getCanonicalType() method.  
							
							... 
							
							
							
							llvm-svn: 49295 
							
						 
						
							2008-04-06 23:10:54 +00:00  
				
					
						
							
							
								 
						
							
								d36afd7d65 
								
							 
						 
						
							
							
								
								tracking API changes arising from r49277  
							
							... 
							
							
							
							llvm-svn: 49279 
							
						 
						
							2008-04-06 20:42:52 +00:00  
				
					
						
							
							
								 
						
							
								579a05d767 
								
							 
						 
						
							
							
								
								Fix PR2049, updating Eli's patch that fixes to mainline.  This produces incorrect  
							
							... 
							
							
							
							code, but the codegen doesn't crash.  I'll file a bugzilla for the AST being wrong.
llvm-svn: 49226 
							
						 
						
							2008-04-04 18:42:16 +00:00  
				
					
						
							
							
								 
						
							
								f3bc75afcf 
								
							 
						 
						
							
							
								
								Since isComplexType() no longer returns true for _Complex integers, the code  
							
							... 
							
							
							
							generator needs to call isAnyComplexType().  This fixes PR1960.
llvm-svn: 49220 
							
						 
						
							2008-04-04 16:54:41 +00:00  
				
					
						
							
							
								 
						
							
								019193acea 
								
							 
						 
						
							
							
								
								updates from David.  
							
							... 
							
							
							
							llvm-svn: 49217 
							
						 
						
							2008-04-04 15:59:59 +00:00  
				
					
						
							
							
								 
						
							
								15c6b7c948 
								
							 
						 
						
							
							
								
								various bug fixes, add to xcode project.  
							
							... 
							
							
							
							llvm-svn: 49216 
							
						 
						
							2008-04-04 15:47:22 +00:00  
				
					
						
							
							
								 
						
							
								6175bbbee2 
								
							 
						 
						
							
							
								
								initial checkin of Étoilé runtime support, patch by David Chisnall  
							
							... 
							
							
							
							llvm-svn: 49215 
							
						 
						
							2008-04-04 15:45:52 +00:00  
				
					
						
							
							
								 
						
							
								602647aa70 
								
							 
						 
						
							
							
								
								fix build error: add missing braces.  
							
							... 
							
							
							
							llvm-svn: 49209 
							
						 
						
							2008-04-04 06:16:25 +00:00  
				
					
						
							
							
								 
						
							
								5506f8cf4c 
								
							 
						 
						
							
							
								
								Codegen assignment to self correctly, patch by David Chisnall!  
							
							... 
							
							
							
							llvm-svn: 49201 
							
						 
						
							2008-04-04 04:07:35 +00:00  
				
					
						
							
							
								 
						
							
								11b6bb408e 
								
							 
						 
						
							
							
								
								Teach clang how to codegen punpcklbw and punpcklwd  
							
							... 
							
							
							
							llvm-svn: 49186 
							
						 
						
							2008-04-03 19:58:06 +00:00  
				
					
						
							
							
								 
						
							
								e799eb5daa 
								
							 
						 
						
							
							
								
								Fix PR2081 (problems codegen'ing some recursive structures) patch  
							
							... 
							
							
							
							by Lauro Venancio!
llvm-svn: 49144 
							
						 
						
							2008-04-03 05:50:42 +00:00  
				
					
						
							
							
								 
						
							
								182f660d8d 
								
							 
						 
						
							
							
								
								simplify some code by using PointerLikeType.  
							
							... 
							
							
							
							llvm-svn: 49101 
							
						 
						
							2008-04-02 17:45:06 +00:00  
				
					
						
							
							
								 
						
							
								db5f1fa3d8 
								
							 
						 
						
							
							
								
								add a common base class "PointerLikeType" for PointerType and ReferenceType,  
							
							... 
							
							
							
							allowing them to be treated the same in some contexts.  A suggestion for a
better name is welcome :)
llvm-svn: 49100 
							
						 
						
							2008-04-02 17:35:06 +00:00  
				
					
						
							
							
								 
						
							
								c00c35a857 
								
							 
						 
						
							
							
								
								some cleanups on top of David's patch.  There are still two  
							
							... 
							
							
							
							remaining open issues I've communicated to him:
1) self can be assigned to, and his patch didn't handle it correctly.
2) CollectObjCIvarTypes is N^2 (because each subclass reprocesses
   all parent class ivars) and flattens classes.  If A derives from B, 
   and both have an int, I'd expect to get { {i32}, i32}, not { i32, i32}.
David, please review.
llvm-svn: 48970 
							
						 
						
							2008-03-30 23:25:33 +00:00  
				
					
						
							
							
								 
						
							
								4bd5596d08 
								
							 
						 
						
							
							
								
								Add initial support for objc codegen for methods, ivars, and the  
							
							... 
							
							
							
							etoile runtime, patch by David Chisnall!
llvm-svn: 48969 
							
						 
						
							2008-03-30 23:03:07 +00:00  
				
					
						
							
							
								 
						
							
								554221e9fb 
								
							 
						 
						
							
							
								
								simplify code by using the variadic StructType::get method.  
							
							... 
							
							
							
							llvm-svn: 48535 
							
						 
						
							2008-03-19 05:24:56 +00:00  
				
					
						
							
							
								 
						
							
								3e593cdb98 
								
							 
						 
						
							
							
								
								simplify the clang codegen by using the new Builder.CreateStructGEP method.  
							
							... 
							
							
							
							llvm-svn: 48534 
							
						 
						
							2008-03-19 05:19:41 +00:00  
				
					
						
							
							
								 
						
							
								7a51313d8a 
								
							 
						 
						
							
							
								
								Make a major restructuring of the clang tree: introduce a top-level  
							
							... 
							
							
							
							lib dir and move all the libraries into it.  This follows the main
llvm tree, and allows the libraries to be built in parallel.  The
top level now enforces that all the libs are built before Driver,
but we don't care what order the libs are built in.  This speeds
up parallel builds, particularly incremental ones.
llvm-svn: 48402 
							
						 
						
							2008-03-15 23:59:48 +00:00