summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
* 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
* More of objective-c's gc code-gen. Treat objective-cFariborz Jahanian2008-11-192-3/+10
| | | | | | objects as __strong when attribute unspecified. llvm-svn: 59654
* Few more changes due to Daniel's feedback.Fariborz Jahanian2008-11-193-19/+26
| | | | llvm-svn: 59645
* Add spec ref to comment.Daniel Dunbar2008-11-191-2/+6
| | | | llvm-svn: 59622
* Fix redundant load of bit-fields on assignment (to get the updatedDaniel Dunbar2008-11-194-25/+46
| | | | | | | | | value). - Use extra argument to EmitStoreThroughLValue to provide place to write update bit-field value if caller requires it. - This fixes several FIXMEs. llvm-svn: 59615
* Pointer width for PIC16 is 16 bits. Modify getMemCpy, getMemMove and ↵Sanjiv Gupta2008-11-191-0/+3
| | | | | | getMemSet accordingly. llvm-svn: 59613
* fix save-oChris Lattner2008-11-191-1/+1
| | | | llvm-svn: 59611
* simplifyChris Lattner2008-11-191-1/+1
| | | | llvm-svn: 59610
* Discard unused runtime function declarations (for readability).Daniel Dunbar2008-11-191-0/+6
| | | | llvm-svn: 59594
* Generate strong write barriers for __strong objects.Fariborz Jahanian2008-11-195-16/+76
| | | | | | Also, took care of Daniel's commments. llvm-svn: 59575
* Patch for generation of weak write barriers for objcFariborz Jahanian2008-11-184-8/+39
| | | | | | __weak objects. llvm-svn: 59560
* Generate objc_read_weak for __weak objc loads.Fariborz Jahanian2008-11-185-1/+35
| | | | llvm-svn: 59553
* Some basic support toward objective-c's GC code gen.Fariborz Jahanian2008-11-183-4/+68
| | | | llvm-svn: 59543
* This reworks some of the Diagnostic interfaces a bit to change how diagnosticsChris Lattner2008-11-182-9/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | are formed. In particular, a diagnostic with all its strings and ranges is now packaged up and sent to DiagnosticClients as a DiagnosticInfo instead of as a ton of random stuff. This has the benefit of simplifying the interface, making it more extensible, and allowing us to do more checking for things like access past the end of the various arrays passed in. In addition to introducing DiagnosticInfo, this also substantially changes how Diagnostic::Report works. Instead of being passed in all of the info required to issue a diagnostic, Report now takes only the required info (a location and ID) and returns a fresh DiagnosticInfo *by value*. The caller is then free to stuff strings and ranges into the DiagnosticInfo with the << operator. When the dtor runs on the DiagnosticInfo object (which should happen at the end of the statement), the diagnostic is actually emitted with all of the accumulated information. This is a somewhat tricky dance, but it means that the accumulated DiagnosticInfo is allowed to keep pointers to other expression temporaries without those pointers getting invalidated. This is just the minimal change to get this stuff working, but this will allow us to eliminate the zillions of variant "Diag" methods scattered throughout (e.g.) sema. For example, instead of calling: Diag(BuiltinLoc, diag::err_overload_no_match, typeNames, SourceRange(BuiltinLoc, RParenLoc)); We will soon be able to just do: Diag(BuiltinLoc, diag::err_overload_no_match) << typeNames << SourceRange(BuiltinLoc, RParenLoc)); This scales better to support arbitrary types being passed in (not just strings) in a type-safe way. Go operator overloading?! llvm-svn: 59502
* Change the diagnostics interface to take an array of pointers to Chris Lattner2008-11-181-3/+4
| | | | | | | | strings instead of array of strings. This reduces string copying in some not-very-important cases, but paves the way for future improvements. llvm-svn: 59494
* Introduction the DeclarationName class, as a single, general method ofDouglas Gregor2008-11-175-16/+17
| | | | | | | | representing the names of declarations in the C family of languages. DeclarationName is used in NamedDecl to store the name of the declaration (naturally), and ObjCMethodDecl is now a NamedDecl. llvm-svn: 59441
* A few corrections to the expr constant work. Not enabled at the Eli Friedman2008-11-171-2/+3
| | | | | | moment. llvm-svn: 59435
* More expr constant work. (Off by default).Anders Carlsson2008-11-171-8/+25
| | | | llvm-svn: 59433
* rename Expr::tryEvaluate to Expr::Evaluate.Chris Lattner2008-11-163-4/+4
| | | | llvm-svn: 59426
* More constant expr work.Anders Carlsson2008-11-161-6/+18
| | | | llvm-svn: 59405
* daniel prefers completed thoughts.Chris Lattner2008-11-161-1/+1
| | | | llvm-svn: 59404
* Start implementing support for @synchonized with the darwin ObjC API.Chris Lattner2008-11-156-2/+134
| | | | | | Patch by Fariborz! llvm-svn: 59377
* Check in code that uses tryEvaluate for emitting constant exprs (not used yet).Anders Carlsson2008-11-151-0/+29
| | | | llvm-svn: 59375
* Handle padding in the constant CFString struct. Fixes PR3046.Anders Carlsson2008-11-151-8/+46
| | | | llvm-svn: 59372
OpenPOWER on IntegriCloud