summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGObjCRuntime.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Unify naming of LangOptions variable/get function across the Clang stack ↵David Blaikie2012-03-111-1/+1
| | | | | | | | | | (Lex to AST). The member variable is always "LangOpts" and the member function is always "getLangOpts". Reviewed by Chris Lattner llvm-svn: 152536
* Whether an argument is required (in contrast with being anJohn McCall2012-02-171-0/+45
| | | | | | | | | | | | | | | | | | | | | optional argument passed through the variadic ellipsis) potentially affects how we need to lower it. Propagate this information down to the various getFunctionInfo(...) overloads on CodeGenTypes. Furthermore, rename those overloads to clarify their distinct purposes, and make sure we're calling the right one in the right place. This has a nice side-effect of making it easier to construct a function type, since the 'variadic' bit is no longer separable. This shouldn't really change anything for our existing platforms, with one minor exception --- we should now call variadic ObjC methods with the ... in the "right place" (see the test case), which I guess matters for anyone running GNUStep on MIPS. Mostly it's just a substantial clean-up. llvm-svn: 150788
* simplify a bunch of code to use the well-known LLVM IR types computed by ↵Chris Lattner2012-02-071-1/+1
| | | | | | CodeGenModule. llvm-svn: 149943
* When initializing a catch variable in ARC, be sure to emit retainsJohn McCall2012-01-171-1/+18
| | | | | | | | | or whatever else is required for the initialization instead of assuming it can be done with a simple store. Fixes PR11732. llvm-svn: 148325
* Switch a few callers of MakeAddrLValue places over to ↵Eli Friedman2011-12-191-1/+1
| | | | | | MakeNaturalAlignAddrLValue. llvm-svn: 146920
* Replace all comparisons between ObjCInterfaceDecl pointers with callsDouglas Gregor2011-12-151-1/+1
| | | | | | | | to declaresSameEntity(), as a baby step toward tracking forward declarations of Objective-C classes precisely. Part of <rdar://problem/10583531>. llvm-svn: 146618
* Add block information for ObjC @catch blocks.Eric Christopher2011-10-191-1/+1
| | | | | | Fixes rdar://10282889 llvm-svn: 142467
* Constant expression evaluation refactoring:Richard Smith2011-10-101-2/+1
| | | | | | | | | | | - Remodel Expr::EvaluateAsInt to behave like the other EvaluateAs* functions, and add Expr::EvaluateKnownConstInt to capture the current fold-or-assert behaviour. - Factor out evaluation of bitfield bit widths. - Fix a few places which would evaluate an expression twice: once to determine whether it is a constant expression, then again to get the value. llvm-svn: 141561
* Refactor the load of the exception pointer and the exception selector from theirBill Wendling2011-09-151-1/+1
| | | | | | storage slot into helper functions. llvm-svn: 139826
* Extend the ASTContext constructor to delay the initialization ofDouglas Gregor2011-09-021-1/+1
| | | | | | | | builtin types (When requested). This is another step toward making ASTUnit build the ASTContext as needed when loading an AST file, rather than doing so after the fact. No actual functionality change (yet). llvm-svn: 138985
* Simplify EH control flow by observing that EH scopes form a simpleJohn McCall2011-08-111-1/+1
| | | | | | | | | | | | | | | hierarchy of delegation, and that EH selector values are meaningful function-wide (good thing, too, or inlining wouldn't work). 2,3d 1a hierarchy of delegation and that EH selector values have the same meaning everywhere in the function instead of being meaningful only in the context of a specific selector. This removes the need for routing edges through EH cleanups, since a cleanup simply always branches to its enclosing scope. llvm-svn: 137293
* The lock operand to an @synchronized statement is also John McCall2011-07-271-10/+15
| | | | | | | supposed to be a full-expression; make it so. In ARC, make sure we retain the lock for the entire protected block. llvm-svn: 136271
* remove unneeded llvm:: namespace qualifiers on some core types now that ↵Chris Lattner2011-07-231-1/+1
| | | | | | | | LLVM.h imports them into the clang namespace. llvm-svn: 135852
* Add a const overload for ObjCInterfaceDecl::all_declared_ivar_begin.Jordy Rose2011-07-221-2/+1
| | | | | | | | | This was previously not-const only because it has to lazily construct a chain of ivars the first time it is called (and after the chain is invalidated). In practice, all the clients were just const_casting their const Decls; all those now-unnecessary const_casts have been removed. llvm-svn: 135741
* de-constify llvm::Type, patch by David Blaikie!Chris Lattner2011-07-181-3/+3
| | | | llvm-svn: 135370
* Convert CallInst and InvokeInst APIs to use ArrayRef.Jay Foad2011-07-151-1/+1
| | | | llvm-svn: 135265
* Generalize Cleanup::Emit's "isForEH" parameter into a setJohn McCall2011-07-121-2/+2
| | | | | | of flags. No functionality change. llvm-svn: 134997
* Eliminate most uses of ShallowCollectObjCIvars which requiresFariborz Jahanian2011-06-281-5/+5
| | | | | | | a vector for collection. Use iterators where needed instead. // rdar://6817577 llvm-svn: 134015
* Emit @finally blocks completely lazily instead of forcing theirJohn McCall2011-06-221-6/+4
| | | | | | | | | | | | | existence by always threading an edge from the catchall. Not doing this was previously causing a crash in the very extreme case where neither the normal cleanup nor the EH catchall was actually reachable: we would delete the catchall entry block, which would cause us to delete the entry block of the finally cleanup as well because the cleanup logic would merge the blocks, which in turn triggered an assert because later blocks in the finally would still be using values from the entry. Laziness turns out to be the most elegant solution to the problem. llvm-svn: 133601
* Restore correct use of GC barriers.John McCall2011-06-161-1/+1
| | | | llvm-svn: 133144
* Fix some problems where functions must be bitcast but we're expecting a ↵David Chisnall2011-05-231-3/+3
| | | | | | | | llvm::Function of the right type. PR9994. llvm-svn: 131930
* Make this code more resilient against catch variables which need cleanups.John McCall2011-05-121-3/+4
| | | | llvm-svn: 131215
* Replace some literal 8s with char width and char align. No change inKen Dyck2011-04-221-2/+2
| | | | | | functionality intended. llvm-svn: 129996
* Replace a couple of divide-by-8s with divide-by-charwidths. No change inKen Dyck2011-04-141-2/+4
| | | | | | functionality intended. llvm-svn: 129496
* Continuing work on ObjC tidyup:David Chisnall2011-03-251-0/+308
- Moved the CGObjCRuntime functions out of CGObjCMac.cpp into CGObjCRuntime.cpp - Added generic functions in CGObjCRuntime for emitting @try and @synchronize blocks, usable by any runtime that uses DWARF exceptions. - Made the GNU runtimes use these functions. It should now be possible to replace the equivalent functions in CGObjCNonFragileABIMac with simple calls to these two functions, providing the runtime functions as arguments. I'll post a diff to the list for review before making any changes to the Mac runtime stuff. llvm-svn: 128274
OpenPOWER on IntegriCloud