summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGObjCGNU.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Sort all of Clang's files under 'lib', and fix up the broken headersChandler Carruth2012-12-041-9/+7
| | | | | | | | | | | | | uncovered. This required manually correcting all of the incorrect main-module headers I could find, and running the new llvm/utils/sort_includes.py script over the files. I also manually added quite a few missing headers that were uncovered by shuffling the order or moving headers up to be main-module-headers. llvm-svn: 169237
* Use empty parens for empty function parameter list instead of '(void)'.Dmitri Gribenko2012-11-151-2/+2
| | | | llvm-svn: 168041
* objective-C blocks: Provide layout map for byrefFariborz Jahanian2012-11-141-0/+6
| | | | | | variables captured in a block. // rdar://12184410 llvm-svn: 167931
* Move some GNUStep-specific code out of CGObjCGNU.John McCall2012-11-141-22/+25
| | | | | | Patch by Jonathan Schleifer. llvm-svn: 167925
* Fix the Objective-C exception rethrow from cleanups (GNU runtimes). Note thatDavid Chisnall2012-11-071-2/+4
| | | | | | | a bug in the inliner still causes the wrong thing to happen at -O2 and above (PR14116). llvm-svn: 167534
* Back out 167431+167437+167487; I didn't realize how incomplete our testEli Friedman2012-11-061-5/+4
| | | | | | coverage of this code is. llvm-svn: 167495
* Propagate CharUnits into ObjC CodeGen. No intended functional change.Eli Friedman2012-11-061-4/+5
| | | | llvm-svn: 167431
* Simplify: replace getContext().getLangOpts() with just getLangOpts().Richard Smith2012-11-011-2/+2
| | | | llvm-svn: 167261
* objective-C arc/mrr: Patch for the new block variable layout meta-data.Fariborz Jahanian2012-10-271-1/+4
| | | | | | It is currently off (so no tests). This is wip. llvm-svn: 166892
* GNUstep runtime version default to 1.6, generate correct property attributeDavid Chisnall2012-10-161-2/+23
| | | | | | metadata. llvm-svn: 166023
* Move TargetData to DataLayout.Micah Villmow2012-10-081-3/+3
| | | | llvm-svn: 165395
* Fix transposed optional / required in Objective-C metadata (GNUstep runtime)David Chisnall2012-08-231-8/+8
| | | | | | Patch by Niels Grewe! llvm-svn: 162441
* Screw around with ObjCRuntime some more, changing theJohn McCall2012-08-211-6/+41
| | | | | | | | diagnostics for bad deployment targets and adding a few more predicates. Includes a patch by Jonathan Schleifer to enable ARC for ObjFW. llvm-svn: 162252
* Don't emit an invoke whose normal destination is a landingpad. Fixes testEli Friedman2012-08-101-19/+2
| | | | | | regression on test/CodeGenObjC/2008-10-3-EhValue.m on non-Darwin targets. llvm-svn: 161700
* Introduce new queries on ObjCRuntime for how to interpret subscriptsJohn McCall2012-07-311-2/+5
| | | | | | | | on object pointers and whether pointer arithmetic on object pointers is supported. Make ObjFW interpret subscripts as pseudo-objects. Based on a patch by Jonathan Schleifer. llvm-svn: 161028
* Add the ObjFW runtime. Patch by Jonathan Schleifer!John McCall2012-07-121-5/+32
| | | | llvm-svn: 160102
* Rename the GCC Objective-C runtime to gcc from gnu-fragile and the GNUstepDavid Chisnall2012-07-031-2/+2
| | | | | | runtime to gnustep from gnu. Fix EH for the GCC runtime. llvm-svn: 159684
* Restructure how the driver communicates information about theJohn McCall2012-06-201-6/+16
| | | | | | | | | | | | | | | | | | | | | | | | target Objective-C runtime down to the frontend: break this down into a single target runtime kind and version, and compute all the relevant information from that. This makes it relatively painless to add support for new runtimes to the compiler. Make the new -cc1 flag, -fobjc-runtime=blah-x.y.z, available at the driver level as a better and more general alternative to -fgnu-runtime and -fnext-runtime. This new concept of an Objective-C runtime also encompasses what we were previously separating out as the "Objective-C ABI", so fragile vs. non-fragile runtimes are now really modelled as different kinds of runtime, paving the way for better overall differentiation. As a sort of special case, continue to accept the -cc1 flag -fobjc-runtime-has-weak, as a sop to PLCompatibilityWeak. I won't go so far as to say "no functionality change", even ignoring the new driver flag, but subtle changes in driver semantics are almost certainly not intended. llvm-svn: 158793
* More doxygen/documentation cleanups.James Dennett2012-06-131-5/+5
| | | | | | | | | | | | | | | | | | This reduces the number of warnings generated by Doxygen by about 100 (roughly 10%). Issues addressed: (1) Primarily, backslash-escaped "@foo" and "#bah" in Doxygen comments when they're not supposed to be Doxygen commands or links, and similarly for "<baz>" when it's not intended as as HTML tag; (2) Changed some \t commands (which don't exist) to \c ("to refer to a word of code", as the Doxygen manual says); (3) \precondition becomes \pre; (4) When touching comments, deleted a couple of spurious spaces in them; (5) Changed some \n and \r to \\n and \\r; (6) Fixed one tiny typo: #pragms -> #pragma. This patch touches documentation/comments only. llvm-svn: 158422
* Revert Decl's iterators back to pointer value_type rather than reference ↵David Blaikie2012-06-061-2/+2
| | | | | | | | | | | | | | value_type In addition, I've made the pointer and reference typedef 'void' rather than T* just so they can't get misused. I would've omitted them entirely but std::distance likes them to be there even if it doesn't use them. This rolls back r155808 and r155869. Review by Doug Gregor incorporating feedback from Chandler Carruth. llvm-svn: 158104
* Remove the ref/value inconsistency in filter_decl_iterator.David Blaikie2012-04-301-3/+3
| | | | | | | | | | | | | filter_decl_iterator had a weird mismatch where both op* and op-> returned T* making it difficult to generalize this filtering behavior into a reusable library of any kind. This change errs on the side of value, making op-> return T* and op* return T&. (reviewed by Richard Smith) llvm-svn: 155808
* Revert r154321, pending more discussion.David Chisnall2012-04-091-15/+0
| | | | llvm-svn: 154327
* Add -fobjc-trace to emit a call before and after each Objective-C message sendDavid Chisnall2012-04-091-0/+15
| | | | | | for hooking in code flow visualisation applications. llvm-svn: 154321
* Teach Clang about PIE compilations. This is the first step of PR12380.Chandler Carruth2012-04-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | First, this patch cleans up the parsing of the PIC and PIE family of options in the driver. The existing logic failed to claim arguments all over the place resulting in kludges that marked the options as unused. Instead actually walk all of the arguments and claim them properly. We now treat -f{,no-}{pic,PIC,pie,PIE} as a single set, accepting the last one on the commandline. Previously there were lots of ordering bugs that could creep in due to the nature of the parsing. Let me know if folks would like weird things such as "-fPIE -fno-pic" to turn on PIE, but disable full PIC. This doesn't make any sense to me, but we could in theory support it. Options that seem to have intentional "trump" status (-static, -mkernel, etc) continue to do so and are commented as such. Next, a -pie-level flag is threaded into the frontend, rigged to a language option, and handled preprocessor, setting up the appropriate defines. We'll now have the correct defines when compiling with -fpie. The one place outside of the preprocessor that was inspecting the PIC level (as opposed to the relocation model, which is set and handled separately, yay!) is in the GNU ObjC runtime. I changed it to exactly preserve existing behavior. If folks want to change its behavior in the face of PIE, they can do that in a separate patch. Essentially the only functionality changed here is the preprocessor defines and bug-fixes to the argument management. Tests have been updated and extended to test all of this a bit more thoroughly. llvm-svn: 154291
* zext ivar offsets if required (GNU runtimes).David Chisnall2012-04-061-1/+4
| | | | llvm-svn: 154175
* Silence dead store warning, and fix indentation.Ted Kremenek2012-04-041-8/+9
| | | | llvm-svn: 153986
* Add missing bitcast that was breaking Objective-C++ exception typeinfo ↵David Chisnall2012-03-201-1/+2
| | | | | | (GNUstep runtime). llvm-svn: 153090
* [Sema] Prefer to use ObjCInterfaceDecl's protocol_begin()/protocol_end() ↵Argyrios Kyrtzidis2012-03-131-3/+3
| | | | | | | | | iterators instead of ObjCInterfaceDecl::getReferencedProtocols(), because the iterators are safe to use even if the caller did not check that the interface is a definition. llvm-svn: 152597
* Unify naming of LangOptions variable/get function across the Clang stack ↵David Blaikie2012-03-111-15/+15
| | | | | | | | | | (Lex to AST). The member variable is always "LangOpts" and the member function is always "getLangOpts". Reviewed by Chris Lattner llvm-svn: 152536
* Add clang support for new Objective-C literal syntax for NSDictionary, NSArray,Ted Kremenek2012-03-061-0/+7
| | | | | | | | | | | | | NSNumber, and boolean literals. This includes both Sema and Codegen support. Included is also support for new Objective-C container subscripting. My apologies for the large patch. It was very difficult to break apart. The patch introduces changes to the driver as well to cause clang to link in additional runtime support when needed to support the new language features. Docs are forthcoming to document the implementation and behavior of these features. llvm-svn: 152137
* Use an ArrayRef when we can instead of passing in a SmallVectorImpl reference.Bill Wendling2012-02-221-26/+24
| | | | llvm-svn: 151150
* Whether an argument is required (in contrast with being anJohn McCall2012-02-171-22/+13
| | | | | | | | | | | | | | | | | | | | | 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
* reapply the patches reverted in r149477, which enable ConstantDataArray.Chris Lattner2012-02-051-1/+1
| | | | llvm-svn: 149801
* size() == 0 -> empty().David Chisnall2012-02-011-1/+1
| | | | | | Spotted by rjmcall. llvm-svn: 149526
* Revert r149363 which was part a series of commits that were reverted in llvmArgyrios Kyrtzidis2012-02-011-1/+1
| | | | | | | | | | | | | | | | | commit 149470. This fixes test/CodeGen/PR3589-freestanding-libcalls.c. Original log: ConstantArray::get() (for strings) is going away, use ConstantDataArray::getString instead. Many instances of ConstantArray::get() could be moved to use more efficient ConstantDataArray methods that avoid a ton of intermediate Constant*'s for each element (e.g. GetConstantArrayFromStringLiteral). I don't plan on doing this in the short-term though. llvm-svn: 149477
* Support @compatibility_alias at run time (GNUstep Runtime)David Chisnall2012-01-311-1/+54
| | | | | | Patch by Niels Grewe! llvm-svn: 149401
* ConstantArray::get() (for strings) is going away, useChris Lattner2012-01-311-1/+1
| | | | | | | | | | | | ConstantDataArray::getString instead. Many instances of ConstantArray::get() could be moved to use more efficient ConstantDataArray methods that avoid a ton of intermediate Constant*'s for each element (e.g. GetConstantArrayFromStringLiteral). I don't plan on doing this in the short-term though. llvm-svn: 149363
* Remove unnecessary default cases in switches over enums.David Blaikie2012-01-171-2/+0
| | | | | | This allows -Wswitch-enum to find switches that need updating when these enums are modified. llvm-svn: 148281
* objc++: some declarations related to atomicFariborz Jahanian2012-01-061-0/+4
| | | | | | | properties of c++ object types with non-trivial assignment copy. Not used yet. // rdar://6137845 llvm-svn: 147666
* Restore r147493 and remove the part of the test that was checking the wrong ↵David Chisnall2012-01-041-6/+32
| | | | | | thing. llvm-svn: 147530
* Revert r147493. It broke test/CodeGenObjC/constant-strings.m.Rafael Espindola2012-01-041-32/+6
| | | | llvm-svn: 147511
* Initialise constant Objective-C string isa pointers with a weak reference to ↵David Chisnall2012-01-031-6/+32
| | | | | | the class, so that they are usable in +load methods if the string class has been compiled with clang - if it's been compiled with GCC, the ABI makes this impossible. (GNU runtimes) llvm-svn: 147493
* Introduce the core infrastructure needed to model redeclaration chainsDouglas Gregor2012-01-011-0/+5
| | | | | | | | | | | | | | | for Objective-C protocols, including: - Using the first declaration as the canonical declaration - Using the definition as the primary DeclContext - Making sure that all declarations have a pointer to the definition data, and that we know which declaration is the definition - Serialization support for redeclaration chains and for adding definitions to already-serialized declarations. However, note that we're not taking advantage of much of this code yet, because we're still re-using ObjCProtocolDecls. llvm-svn: 147410
* Fix -forwardingTargetForSelector: (GNUstep runtime) which was broken for theDavid Chisnall2011-12-011-0/+2
| | | | | | old dispatch mechanism when I introduced the new one. llvm-svn: 145609
* It turns out that the Objective-C message lookup functions can throw ↵David Chisnall2011-10-281-11/+14
| | | | | | exceptions after all... llvm-svn: 143205
* Change an int64_t to an intptr_t so that we don't end up with crashes in the ↵David Chisnall2011-10-251-8/+8
| | | | | | back end on large classes on 32-bit. llvm-svn: 142918
* Remove debugging printfs that some idiot left in.David Chisnall2011-10-241-3/+0
| | | | llvm-svn: 142796
* Enable experimental support for objc_msgSend with GNUstep ObjC runtime.David Chisnall2011-10-241-9/+32
| | | | llvm-svn: 142795
* Apparently getPtrToInt() takes an explicit type parameter to allow you to ↵David Chisnall2011-10-081-3/+10
| | | | | | generate invalid bitcode, not so that it can actually produce a value of this type. This should fix PR11085. llvm-svn: 141482
* Fix warning on MSVC. Patch by Aaron Ballman.Eli Friedman2011-10-081-1/+1
| | | | llvm-svn: 141467
OpenPOWER on IntegriCloud