summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
...
* Minor cleanup: use getDeclAlignInBytes helper.Eli Friedman2009-02-271-11/+1
| | | | llvm-svn: 65611
* Create a new TypeNodes.def file that enumerates all of the types,Douglas Gregor2009-02-268-33/+46
| | | | | | | | | | | | | | | | | | | | | | | | | giving them rough classifications (normal types, never-canonical types, always-dependent types, abstract type representations) and making it far easier to make sure that we've hit all of the cases when decoding types. Switched some switch() statements on the type class over to using this mechanism, and filtering out those things we don't care about. For example, CodeGen should never see always-dependent or non-canonical types, while debug info generation should never see always-dependent types. More switch() statements on the type class need to be moved over to using this approach, so that we'll get warnings when we add a new type then fail to account for it somewhere in the compiler. As part of this, some types have been renamed: TypeOfExpr -> TypeOfExprType FunctionTypeProto -> FunctionProtoType FunctionTypeNoProto -> FunctionNoProtoType There shouldn't be any functionality change... llvm-svn: 65591
* fix some sema problems with wide strings and hook up basic codegen for them.Chris Lattner2009-02-261-7/+5
| | | | llvm-svn: 65582
* Couple of meta-data segments were wrong. This patch fixes them.Fariborz Jahanian2009-02-261-2/+2
| | | | llvm-svn: 65578
* Add support to emit debug info for objective-c interfaces.Devang Patel2009-02-262-3/+121
| | | | | | (This is not yet used.) llvm-svn: 65573
* Add Type::hasPointerRepresentation predicate.Daniel Dunbar2009-02-263-15/+3
| | | | | | | | | - For types whose native representation is a pointer. - Use to replace ExprConstant.cpp:HasPointerEvalType, CodeGenFunction::isObjCPointerType. llvm-svn: 65569
* Remove PointerLikeType.Daniel Dunbar2009-02-261-1/+0
| | | | | | | - Having pointers and references share a base was not a useful notion. llvm-svn: 65567
* Change PointersToResolve to list the pointee type to resolve, not theDaniel Dunbar2009-02-262-6/+12
| | | | | | | | pointer type. - Drops use of PointerLikeType. - No intended functionality change. llvm-svn: 65566
* Drop uses of isPointerLikeType.Daniel Dunbar2009-02-262-4/+4
| | | | | | - No functionality change. llvm-svn: 65560
* Fix an inconsistance in objc2's meta-data related toFariborz Jahanian2009-02-261-5/+18
| | | | | | the symbol for the root meta-data. llvm-svn: 65548
* Classify enum types correctlyAnders Carlsson2009-02-261-0/+3
| | | | llvm-svn: 65533
* x86_64 ABI: Qualified id types are passed as pointers.Daniel Dunbar2009-02-261-0/+1
| | | | | | - <rdar://problem/6622451> Bad x86_64 code gen for message call taking one argument. llvm-svn: 65510
* CodeGen support for copied BlockDeclRefExprs.Mike Stump2009-02-255-38/+112
| | | | llvm-svn: 65487
* Temporarily disable clearing of insert point (to indicate unreachableDaniel Dunbar2009-02-251-0/+5
| | | | | | | code) when calling noreturn functions; general expression emission isn't ready to do the right thing in all cases. llvm-svn: 65473
* Allow constant initializers to reference their defining decl.Daniel Dunbar2009-02-251-0/+9
| | | | | | - PR3662. llvm-svn: 65472
* Fold GeneraticStaticBlockVarDecl into callers.Daniel Dunbar2009-02-252-34/+14
| | | | | | - No functionality change. llvm-svn: 65470
* Pull COdeGenFunction::CreateStaticBlockVarDecl (just for creating theDaniel Dunbar2009-02-254-65/+92
| | | | | | | | global variable) out of GenerateStaticBlockVarDecl. - No intended functionality change. - Prep for some mild cleanups and PR3662. llvm-svn: 65466
* Fix comments.Devang Patel2009-02-251-3/+3
| | | | llvm-svn: 65423
* Enable debug info emission for objc methods.Devang Patel2009-02-251-0/+3
| | | | llvm-svn: 65422
* patch for two things.Fariborz Jahanian2009-02-241-3/+5
| | | | | | | make sure objc2's nonfragile abi is enacted for Leopard too. add -fobjc-gc-only flag to the image_info symbol. llvm-svn: 65413
* If Loc is invalid (e.g. "self" in Objective-C) then use MainFileID's compile ↵Devang Patel2009-02-241-1/+4
| | | | | | unit. llvm-svn: 65403
* first wave of fixes for @encode sema support. This is part of PR3648.Chris Lattner2009-02-246-42/+74
| | | | | | | The big difference here is that (like string literal) @encode has array type, not pointer type. llvm-svn: 65391
* Set flag for -fobjc-gc in IMAGE_INFO variable.Fariborz Jahanian2009-02-241-1/+5
| | | | llvm-svn: 65387
* Fix IRgen of constant expressions referring to external/staticDaniel Dunbar2009-02-241-5/+8
| | | | | | | variables. - PR3657. llvm-svn: 65381
* Some initial Obj-C zero cost EH support.Daniel Dunbar2009-02-241-5/+134
| | | | | | | | | - Only handles cases with @try with no @catch blocks, and there are a number of problems with the implementation. Nevertheless, this is good enough to handled @synchronized correctly, and some other basic uses. llvm-svn: 65378
* Add a note about an IRgen optimization opportunity.Daniel Dunbar2009-02-241-1/+7
| | | | llvm-svn: 65376
* Prevent accidental copying of CodeGenFunction and CodeGenModule.Anders Carlsson2009-02-242-0/+5
| | | | llvm-svn: 65372
* Pass the CodeGenModule object to GenerateBlockFunction, instead of *this ↵Anders Carlsson2009-02-241-6/+1
| | | | | | | | (which will call the copy constructor). Also, since we're creating a new CodeGenFunction object for each block function, we don't need to clear the BreakContinueStack. llvm-svn: 65371
* Ensure that we can't break or continue out of a block.Mike Stump2009-02-241-0/+5
| | | | llvm-svn: 65370
* Fix two @synchronized bugs found by inspection: the expression to sychronize ↵Daniel Dunbar2009-02-241-40/+32
| | | | | | | | | on should only be evaluated once, and it is evaluated outside the cleanup scope. Also, lift SyncEnter and SyncExit up in nervous anticipation of x86-64 zero cost EH. llvm-svn: 65362
* Improve merging of function declarations. Specifically:Douglas Gregor2009-02-241-1/+1
| | | | | | | | | | | | | | | | - When we are declaring a function in local scope, we can merge with a visible declaration from an outer scope if that declaration refers to an entity with linkage. This behavior now works in C++ and properly ignores entities without linkage. - Diagnose the use of "static" on a function declaration in local scope. - Diagnose the declaration of a static function after a non-static declaration of the same function. - Propagate the storage specifier to a function declaration from a prior declaration (PR3425) - Don't name-mangle "main" llvm-svn: 65360
* We should not generate __weak write barrier on indirect referenceFariborz Jahanian2009-02-231-3/+12
| | | | | | | of a pointer to object; This patch does this odd behavior according to gcc. llvm-svn: 65334
* Add low level support for generating invoke instead of calls.Daniel Dunbar2009-02-233-16/+46
| | | | | | - No functionality change. llvm-svn: 65325
* Make sure to reset the DidCallStackSave variable before emitting a compound ↵Anders Carlsson2009-02-221-0/+1
| | | | | | statement. Fixes PR3649. llvm-svn: 65291
* More objc gc work. Match gcc's treatment of ivar accessFariborz Jahanian2009-02-221-1/+1
| | | | | | | true a local pointer to objective-c object in generating write barriers. llvm-svn: 65290
* Copy some clenaups from Eli to code that I copied. :-)Mike Stump2009-02-221-6/+1
| | | | llvm-svn: 65286
* Cleanp code with some recent suggestions.Mike Stump2009-02-223-21/+12
| | | | llvm-svn: 65285
* x86_64 ABI: Actually, we can always pass things we want to pass inDaniel Dunbar2009-02-221-10/+2
| | | | | | | memory using Indirect; this was a holdover from when CGCall wasn't as robust. llvm-svn: 65278
* Eliminate a bunch of code which should be dead.Eli Friedman2009-02-221-194/+5
| | | | llvm-svn: 65267
* x86_64 ABI: Make sure to pass vectors that we want to pass in memoryDaniel Dunbar2009-02-221-1/+1
| | | | | | | | | as byval. Otherwise LLVM will have its own opinion about where to put things. We now pass all gcc dg.compat tests on x86_64. llvm-svn: 65266
* x86_64 ABI: Pass 32-bit vectors as Integer to match gcc. We don't careDaniel Dunbar2009-02-221-1/+16
| | | | | | about these much but <2 x i16> shows up in the gcc test suite. llvm-svn: 65264
* x86_64 ABI: Classify <1 x i64> as INTEGER (match gcc not llvm-gcc).Daniel Dunbar2009-02-221-6/+12
| | | | | | | Also, make sure to pass <1 x i64> as i64 (not <1 x i64>, which doesn't quite work yet in the backend). llvm-svn: 65262
* Last part of PR3254: use the same alignment computation in Sema and Eli Friedman2009-02-221-4/+1
| | | | | | | CodeGen. I'm not sure whether this actually makes any visible difference, but it's better to be consistent anyway. llvm-svn: 65259
* local array of objects are non-gc'able.Fariborz Jahanian2009-02-211-2/+6
| | | | llvm-svn: 65251
* More work to integrate newly added ObjCQualifiedClassType into the type system.Steve Naroff2009-02-211-0/+1
| | | | | | This is necessary 'plumbing' to fix <rdar://problem/6497631> Message lookup is sometimes different than gcc's. llvm-svn: 65248
* The blocks ABI is wrong, add a FIXME.Mike Stump2009-02-211-0/+3
| | | | llvm-svn: 65243
* Add CodeGen support for the helper for BlockDeclRefExprs. The easierMike Stump2009-02-214-26/+125
| | | | | | stuff is mostly done. Move BlockHasCopyDispose up. llvm-svn: 65242
* Handle case of none gc'able objects regardless of theirFariborz Jahanian2009-02-212-5/+20
| | | | | | type. llvm-svn: 65205
* Emit extern_weak when needed.Daniel Dunbar2009-02-211-5/+10
| | | | | | - PR3629. llvm-svn: 65203
* We must always mangle attribute overloadable functions; even if in aDaniel Dunbar2009-02-201-5/+5
| | | | | | | system header. - Prevents a codegen crash when anything used anything in tgmath! :) llvm-svn: 65200
OpenPOWER on IntegriCloud