summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
* Fix for PR3246: an empty clobber list is the empty string, not a null Eli Friedman2008-12-211-2/+3
| | | | | | | | | | string. That said, we should probably try and track down the correct clobber lists for the targets that don't have them (PPC, ARM, and Sparc), so that we can generate correct code. llvm-svn: 61298
* Handle VLA indexingAnders Carlsson2008-12-211-2/+19
| | | | llvm-svn: 61295
* Add support for member references (E1.E2, E1->E2) with C++ semantics,Douglas Gregor2008-12-202-2/+7
| | | | | | | | | | which can refer to static data members, enumerators, and member functions as well as to non-static data members. Implement correct lvalue computation for member references in C++. Compute the result type of non-static data members of reference type properly. llvm-svn: 61294
* Extend the unsupported error to include break and continue, and fix a Eli Friedman2008-12-201-8/+12
| | | | | | warning by using an unsigned index. llvm-svn: 61292
* Make VLAs usable, and make basic usage work correctly. Also, add a Eli Friedman2008-12-202-19/+9
| | | | | | | | | | simple test that actually does VLA codegen. Note that despite the fact that the alloca isn't in the entry block, it should dominate all uses; this is guaranteed by the restrictions on goto into VLA scope in C99. llvm-svn: 61291
* Handle typedefs to VLAs (Emit the size expr when we encounter the typedefAnders Carlsson2008-12-202-16/+23
| | | | llvm-svn: 61290
* Check the entire StackSaveValues stack for VLAs when dealing with goto and ↵Anders Carlsson2008-12-201-6/+10
| | | | | | return statements. Noticed by Eli Friedman. llvm-svn: 61289
* Make sure to generate code for arguments that have a variably modified type.Anders Carlsson2008-12-201-0/+10
| | | | llvm-svn: 61288
* Change EmitVLASize to take a QualType that must be a variably modified type.Anders Carlsson2008-12-203-27/+40
| | | | | | | | | | | | Emit the size even if the declared type is a variably modified type. This lets us handle void f(int n) { int (*a)[n]; printf("size: %d\n", sizeof(*a)); } llvm-svn: 61285
* Split up emitting of VLA sizes and getting the size of a VLA.Anders Carlsson2008-12-203-19/+31
| | | | llvm-svn: 61284
* Add some ErrorUnsupported calls and turn on VLA codegen again.Anders Carlsson2008-12-202-10/+21
| | | | llvm-svn: 61283
* More encoding support. This time forFariborz Jahanian2008-12-191-1/+1
| | | | | | @encode of classes and bitfields. llvm-svn: 61268
* Removed a slot in ObjCMemRegExpr used inFariborz Jahanian2008-12-182-4/+4
| | | | | | code gen which did not belong there. llvm-svn: 61203
* Allow ABI to use StructRet even for scalar values.Daniel Dunbar2008-12-181-9/+17
| | | | | | | | | | - Update comment to reflect fact that StructRet is now supported for any type (modulo LLVM support). - No functionality change, no scalar types currently use this feature. llvm-svn: 61192
* This patch will build the Records lazily per Steve's comments.Fariborz Jahanian2008-12-171-7/+1
| | | | | | | Note that one test duplicate-ivar-check.m will fail because I need to re-implement duplicate ivar checking. llvm-svn: 61154
* Warning fixes to operator precedence warnings.Eli Friedman2008-12-161-1/+1
| | | | | | | Someone should double-check that I didn't somehow break ObjC serialization; I think the change there actually changes the semantics. llvm-svn: 61098
* Remove tabs.Nate Begeman2008-12-162-4/+4
| | | | llvm-svn: 61097
* Name of addLayoutToClass is confusing as no layout calculationFariborz Jahanian2008-12-151-1/+1
| | | | | | | is done. Layout is calculated lazily at code gen type. This patch changes the name. llvm-svn: 61054
* Code gen. for ivar references; including bitfieldFariborz Jahanian2008-12-157-70/+61
| | | | | | ivars. llvm-svn: 61043
* Store the size of the EH stack inside each BreakContinue struct so we know ↵Anders Carlsson2008-12-133-10/+16
| | | | | | when a break/continue won't cross a try block. llvm-svn: 60998
* Patch for ObjCIvarRefExpr containing the fieldFariborz Jahanian2008-12-131-1/+3
| | | | | | matching the storage layout for this ivar llvm-svn: 60996
* disable Anders' recent VLA patch, this fixes PR3209.Chris Lattner2008-12-132-2/+11
| | | | llvm-svn: 60989
* Implement allocation and sizeof VLAs. This is very basic for now.Anders Carlsson2008-12-122-6/+38
| | | | llvm-svn: 60943
* Add map of VLA types and their sizesAnders Carlsson2008-12-122-0/+36
| | | | llvm-svn: 60939
* Work in preparation for VLAs. Make sure to restore the stack if necessary ↵Anders Carlsson2008-12-122-14/+34
| | | | | | (Saving the stack isn't implemented right now :) llvm-svn: 60925
* Fix rdar://6095061 - gcc allows __builtin_choose_expr as an lvalueChris Lattner2008-12-121-0/+6
| | | | llvm-svn: 60924
* add codegen support for __func__ and friends, producing the sameChris Lattner2008-12-121-0/+10
| | | | | | output that GCC does. rdar://6440297 llvm-svn: 60922
* Address some comments on the name lookup/DeclContext patch from ChrisDouglas Gregor2008-12-111-1/+1
| | | | llvm-svn: 60897
* Actually distinguish between RecordDecl::field_iterator and ↵Douglas Gregor2008-12-112-7/+8
| | | | | | RecordDecl::field_const_iterator, propagating the constness down to the FieldDecls. llvm-svn: 60883
* Unifies the name-lookup mechanisms used in various parts of the ASTDouglas Gregor2008-12-116-55/+79
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and separates lexical name lookup from qualified name lookup. In particular: * Make DeclContext the central data structure for storing and looking up declarations within existing declarations, e.g., members of structs/unions/classes, enumerators in C++0x enums, members of C++ namespaces, and (later) members of Objective-C interfaces/implementations. DeclContext uses a lazily-constructed data structure optimized for fast lookup (array for small contexts, hash table for larger contexts). * Implement C++ qualified name lookup in terms of lookup into DeclContext. * Implement C++ unqualified name lookup in terms of qualified+unqualified name lookup (since unqualified lookup is not purely lexical in C++!) * Limit the use of the chains of declarations stored in IdentifierInfo to those names declared lexically. * Eliminate CXXFieldDecl, collapsing its behavior into FieldDecl. (FieldDecl is now a ScopedDecl). * Make RecordDecl into a DeclContext and eliminates its Members/NumMembers fields (since one can just iterate through the DeclContext to get the fields). llvm-svn: 60878
* Append an extra newline to the module inline asm if it's not empty.Anders Carlsson2008-12-101-0/+5
| | | | llvm-svn: 60827
* Support for implementation of property in the case whereFariborz Jahanian2008-12-093-10/+17
| | | | | | | the synthesis is in an implementation of s subclass of a super class where the property has been declared. llvm-svn: 60792
* Fix a serious null termination bug found by David Chisnall!Chris Lattner2008-12-091-1/+1
| | | | llvm-svn: 60778
* Change condition under which 'retain'/'copy' are directly evaluated.Fariborz Jahanian2008-12-081-4/+6
| | | | llvm-svn: 60729
* Introduce basic support for dependent types, type-dependentDouglas Gregor2008-12-051-0/+1
| | | | | | | | | | | | expressions, and value-dependent expressions. This permits us to parse some template definitions. This is not a complete solution; we're missing type- and value-dependent computations for most of the expression types, and we're missing checks for dependent types and type-dependent expressions throughout Sema. llvm-svn: 60615
* Representation of template type parameters and non-type templateDouglas Gregor2008-12-051-0/+1
| | | | | | | | | | | | | | | parameters, with some semantic analysis: - Template parameters are introduced into template parameter scope - Complain about template parameter shadowing (except in Microsoft mode) Note that we leak template parameter declarations like crazy, a problem we'll remedy once we actually create proper declarations for templates. Next up: dependent types and value-dependent/type-dependent expressions. llvm-svn: 60597
* Mention an optimization opportunity pointed out by Chris.Daniel Dunbar2008-12-041-0/+12
| | | | llvm-svn: 60535
* Correct CodeGen assumption that LongTy == Int32Ty in a few places. This ↵Sebastian Redl2008-12-041-2/+2
| | | | | | makes several CodeGenObjC tests pass on 64-bit by fixing assertions. This doesn't mean that the result is actually what the GNU runtime expects, though. llvm-svn: 60515
* If a global var decl has an initializer, make sure to always set its linkage ↵Anders Carlsson2008-12-031-0/+2
| | | | | | to external. llvm-svn: 60462
* Fix for PR3150: obvious copy-paste bug in Eli Friedman2008-12-021-2/+2
| | | | | | ScalarExprEmitter::VisitBinLOr. llvm-svn: 60415
* Disabling this code due to regression on test/CodeGen/bitfield.c. See Eli Friedman2008-12-021-1/+5
| | | | | | PR3152. llvm-svn: 60389
* Change more code over to using the new Expr::EvaluateAnders Carlsson2008-12-011-6/+4
| | | | llvm-svn: 60324
* Change more code over to using the new Expr::EvaluateAnders Carlsson2008-12-011-16/+19
| | | | llvm-svn: 60323
* Use the new Expr::EvaluateAnders Carlsson2008-12-011-5/+5
| | | | llvm-svn: 60321
* Fix for PR2969: generate a memcpy from a constant for constant Eli Friedman2008-11-301-8/+17
| | | | | | | | initializers. llvm-gcc appears to be more aggressive, but incorrect, for constructs like "const int a[] = {1,2,3};"; that said, current optimizers will do the appropriate optimizations when safe. llvm-svn: 60270
* Test commit.Daniel Dunbar2008-11-271-0/+1
| | | | llvm-svn: 60147
* Code gen for aggregate-valued properties and a test case.Fariborz Jahanian2008-11-261-4/+7
| | | | llvm-svn: 60122
* Convert incomplete array types before emitting debug info for them, fixes ↵Anders Carlsson2008-11-261-2/+15
| | | | | | PR3134. llvm-svn: 60109
* Handle returning complex types that get coerced. Fixes PR3131Anders Carlsson2008-11-251-1/+4
| | | | llvm-svn: 60058
* Fix 80-col violations.Daniel Dunbar2008-11-251-2/+4
| | | | llvm-svn: 60051
OpenPOWER on IntegriCloud