summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
* Remove the #ifdeffed out code.Anders Carlsson2008-11-251-241/+0
| | | | llvm-svn: 60032
* Rename NamedDecl::getName() to getNameAsString(). Replace a bunch of Chris Lattner2008-11-246-47/+41
| | | | | | | | | | | uses of getName() with uses of getDeclName(). This upgrades a bunch of diags to take DeclNames instead of std::strings. This also tweaks a couple of diagnostics to be cleaner and changes CheckInitializerTypes/PerformInitializationByConstructor to pass around DeclarationNames instead of std::strings. llvm-svn: 59947
* Migrate some stuff from NamedDecl::getName() to Chris Lattner2008-11-242-5/+5
| | | | | | NamedDecl::getNameAsString() to make it more explicit. llvm-svn: 59937
* Rename NamedDecl::getIdentifierName() to ::getNameAsCString() and make itChris Lattner2008-11-245-27/+27
| | | | | | | | | assert if the name is not an identifier. Update callers to do the right thing and avoid this method in unsafe cases. This also fixes an objc warning that was missing a space, and migrates a couple more to taking IdentifierInfo and QualTypes instead of std::strings. llvm-svn: 59936
* Rename Selector::getName() to Selector::getAsString(), and addChris Lattner2008-11-243-25/+22
| | | | | | | | | | | | | a new NamedDecl::getAsString() method. Change uses of Selector::getName() to just pass in a Selector where possible (e.g. to diagnostics) instead of going through an std::string. This also adds new formatters for objcinstance and objcclass as described in the dox. llvm-svn: 59933
* An expression is not foldable if it can't be fully evaluated. Fixes PR3060Anders Carlsson2008-11-221-2/+4
| | | | llvm-svn: 59887
* Implemented ir-gen for 'implicit' properties using the new AST nodes.Fariborz Jahanian2008-11-226-14/+96
| | | | llvm-svn: 59886
* Use Expr::Evaluate for case statements. Fixes PR2525Anders Carlsson2008-11-221-3/+3
| | | | llvm-svn: 59881
* New AST node to access "implicit" setter/getter using property dor syntax.Fariborz Jahanian2008-11-223-27/+21
| | | | | | | Issuing diagnostics when assigning to read-only properties. This is work in progress. llvm-svn: 59874
* Use tryEvaluate for constant exprs.Anders Carlsson2008-11-221-2/+13
| | | | llvm-svn: 59857
* Fixed bugzilla bug# 3095 related to code gen. for @synchronized.Fariborz Jahanian2008-11-211-7/+11
| | | | llvm-svn: 59838
* Fields of ivars of struct types are considered ivarsFariborz Jahanian2008-11-212-4/+9
| | | | | | themselves for gc API generation purposes. llvm-svn: 59828
* reapply the (corrected) patch to use the new llvm intrinsics for ↵Chris Lattner2008-11-212-26/+10
| | | | | | memcpy/memmove etc. llvm-svn: 59824
* temporarily revert Sangiv's patch.Chris Lattner2008-11-212-4/+25
| | | | llvm-svn: 59821
* mem[cpy,set,move] intrinsics are now overloaded.Sanjiv Gupta2008-11-212-25/+4
| | | | llvm-svn: 59806
* Consolidated @try and @synchronize into a singleFariborz Jahanian2008-11-214-119/+45
| | | | | | code gen. method. llvm-svn: 59767
* Support generation of objc_assign_ivar for ivarFariborz Jahanian2008-11-202-3/+19
| | | | | | write-barriers. llvm-svn: 59748
* Introducing objc_assign_ivar to clang.Fariborz Jahanian2008-11-203-0/+33
| | | | llvm-svn: 59740
* Added a test case for __weak field decls. Change SetVarDeclObjCAttributeFariborz Jahanian2008-11-202-10/+9
| | | | | | to static function. Added comments. llvm-svn: 59738
* Rename IdentifierInfo::isName to ::isStr. Use a nifty trickChris Lattner2008-11-201-1/+1
| | | | | | | from Sebastian to enforce that a literal string is passed in, and use this to avoid having to call strlen on it. llvm-svn: 59706
* More objc gc stuff. Read/Write barriers for local static/extern,Fariborz Jahanian2008-11-202-18/+47
| | | | | | | diagnostics on use of __weak attribute on fields, Early support for read/write barriers for objc fields. llvm-svn: 59682
OpenPOWER on IntegriCloud