summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGObjC.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Use the actual ABI-determined C calling convention for runtimeJohn McCall2013-02-281-36/+28
| | | | | | | | | | | | | | | | | | | | | | calls and declarations. LLVM has a default CC determined by the target triple. This is not always the actual default CC for the ABI we've been asked to target, and so we sometimes find ourselves annotating all user functions with an explicit calling convention. Since these calling conventions usually agree for the simple set of argument types passed to most runtime functions, using the LLVM-default CC in principle has no effect. However, the LLVM optimizer goes into histrionics if it sees this kind of formal CC mismatch, since it has no concept of CC compatibility. Therefore, if this module happens to define the "runtime" function, or got LTO'ed with such a definition, we can miscompile; so it's quite important to get this right. Defining runtime functions locally is quite common in embedded applications. llvm-svn: 176286
* In ARC, emit non-peepholed +1s within the full-expression insteadJohn McCall2013-02-121-17/+19
| | | | | | of immediately afterwards. llvm-svn: 174922
* Fixed another whitespace issue... *sigh*.Michael Gottesman2013-02-021-3/+3
| | | | llvm-svn: 174255
* Fixed whitespace.Michael Gottesman2013-02-021-1/+1
| | | | llvm-svn: 174254
* On platforms which do not support ARC natively, do not mark ↵Michael Gottesman2013-02-021-4/+6
| | | | | | | | | objc_retain/objc_release as "nonlazybind". rdar://13108298. rdar://13129783. llvm-svn: 174253
* Remove useless 'llvm::' qualifier from names like StringRef and others that areDmitri Gribenko2013-01-121-1/+1
| | | | | | brought into 'clang' namespace by clang/Basic/LLVM.h llvm-svn: 172323
* Rewrite #includes for llvm/Foo.h to llvm/IR/Foo.h as appropriate toChandler Carruth2013-01-021-2/+2
| | | | | | | | reflect the migration in r171366. Re-sort the #include lines to reflect the new paths. llvm-svn: 171369
* Rename llvm::Attributes to llvm::Attribute.Bill Wendling2012-12-201-1/+1
| | | | llvm-svn: 170722
* Revert r170500. It over-zealously converted *ALL* things named Attributes, ↵Bill Wendling2012-12-201-1/+1
| | | | | | which is wrong here. llvm-svn: 170721
* Rename the 'Attributes' class to 'Attribute'. It's going to represent a ↵Bill Wendling2012-12-191-1/+1
| | | | | | single attribute in the future. llvm-svn: 170500
* Remove obsolete FIXMEs.David Chisnall2012-12-181-2/+0
| | | | llvm-svn: 170425
* Inline hasAtomicCopyHelperAPI.Rafael Espindola2012-12-181-6/+2
| | | | llvm-svn: 170408
* Reapply r170344, this time without forgetting to commit the header changes.David Chisnall2012-12-171-4/+3
| | | | llvm-svn: 170354
* Revert "Added support for new property helpers (GNUstep runtime)."Benjamin Kramer2012-12-171-3/+4
| | | | | | This reverts commit r170344. Doesn't even compile. llvm-svn: 170351
* Added support for new property helpers (GNUstep runtime).David Chisnall2012-12-171-4/+3
| | | | llvm-svn: 170344
* Marking the objc_autoreleaseReturnValue and objc_retainAutoreleaseReturnValue Chad Rosier2012-12-121-3/+8
| | | | | | | | | | call sites as tail calls unconditionally. While it's theoretically true that this is just an optimization, it's an optimization that we very much want to happen even at -O0, or else ARC applications become substantially harder to debug. See r169796 for the llvm/fast-isel side of things. rdar://12553082 llvm-svn: 169996
* Don't crash synthesizing an ObjC property with an empty struct type. ↵Eli Friedman2012-10-261-0/+8
| | | | | | <rdar://problem/12547611>. llvm-svn: 166825
* At -O0, prefer objc_storeStrong with a null new value to theJohn McCall2012-10-171-4/+24
| | | | | | | | | | | combination of a load+objc_release; this is generally better for tools that try to track why values are retained and released. Also use objc_storeStrong when copying a block (again, only at -O0), which requires us to do a preliminary store of null in order to compensate for objc_storeStrong's assign semantics. llvm-svn: 166085
* Transform pattern:Alexey Samsonov2012-10-161-8/+6
| | | | | | | | | | | if (CGM.getModuleDebugInfo()) DebugInfo = CGM.getModuleDebugInfo() into a call: maybeInitializeDebugInfo(); This is a simplification for a possible future fix of PR13942. llvm-svn: 166019
* Un-revert r164907 and r164902 (+ follow-ups), 10.6 build fix to follow.Daniel Dunbar2012-10-151-7/+2
| | | | llvm-svn: 165988
* Revert r164907 and r164902 (+ follow-ups). They broke building on 10.6.Nico Weber2012-10-151-2/+7
| | | | | | See PR14013. llvm-svn: 165962
* Have 'addFnAttr' take the attribute enum value. Then have it build the ↵Bill Wendling2012-10-101-1/+1
| | | | | | attribute object and add it appropriately. No functionality change. llvm-svn: 165596
* Move TargetData to DataLayout.Micah Villmow2012-10-081-1/+1
| | | | llvm-svn: 165395
* Add FP_CONTRACT support for clang.Lang Hames2012-10-021-2/+2
| | | | | | | | Clang will now honor the FP_CONTRACT pragma and emit LLVM fmuladd intrinsics for expressions of the form A * B + C (when they occur in a single statement). llvm-svn: 164989
* Add Clang support for iOS6.Bob Wilson2012-09-291-7/+2
| | | | llvm-svn: 164907
* Push ArrayRef through the Expr hierarchy.Benjamin Kramer2012-08-241-2/+2
| | | | | | No functionality change. llvm-svn: 162552
* Screw around with ObjCRuntime some more, changing theJohn McCall2012-08-211-2/+2
| | | | | | | | 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
* Fix a pair of bugs relating to properties in ARC.John McCall2012-08-201-1/+10
| | | | | | | | | | | | | | | | | | | | First, when synthesizing an explicitly strong/retain/copy property of Class type, don't pretend during compatibility checking that the property is actually assign. Instead, resolve incompatibilities by secretly changing the type of *implicitly* __unsafe_unretained Class ivars to be strong. This is moderately evil but better than what we were doing. Second, when synthesizing the setter for a strong property of non-retainable type, be sure to use objc_setProperty. This is possible when the property is decorated with the NSObject attribute. This is an ugly, ugly corner of the language, and we probably ought to deprecate it. The first is rdar://problem/12039404; the second was noticed by inspection while fixing the first. llvm-svn: 162244
* objc-arc: set nonlazybind attribute on objc_retain/Fariborz Jahanian2012-08-071-2/+6
| | | | | | | objc_release for performance for these most often called APIs. // rdar://12040837 llvm-svn: 161448
* Fix a typo (the the => the)Sylvestre Ledru2012-07-231-1/+1
| | | | llvm-svn: 160622
* Distinguish more carefully between free functions and C++ instance methodsJohn McCall2012-07-071-24/+27
| | | | | | | | in the ABI arrangement, and leave a hook behind so that we can easily tweak CCs on platforms that use different CCs by default for C++ instance methods. llvm-svn: 159894
* Documentation cleanup: Escape @objc* in Doxygen comments.James Dennett2012-06-221-24/+24
| | | | llvm-svn: 158974
* Restructure how the driver communicates information about theJohn McCall2012-06-201-6/+14
| | | | | | | | | | | | | | | | | | | | | | | | 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
* Documentation cleanup:James Dennett2012-06-151-4/+6
| | | | | | | | * Escaped Objective-C @keywords in Doxygen comments; * Documented more accurate \params; * Exposed some more summaries using \brief. llvm-svn: 158559
* objective-c: fix a sema and IRGen crash when propertyFariborz Jahanian2012-05-291-6/+9
| | | | | | | | getter result type is safe but does not match with property type resulting in spurious warning followed by crash in IRGen. // rdar://11515196 llvm-svn: 157641
* objective-c IRGen. Fixes a getter synthesis bugFariborz Jahanian2012-04-261-1/+1
| | | | | | | where getter type is super class of its property type, resulting in an assert. // rdar://11323676 llvm-svn: 155663
* Implements boxed expressions for Objective-C. <rdar://problem/10194391>Patrick Beard2012-04-191-19/+19
| | | | llvm-svn: 155082
* These functions too have no prototypes. Audited the rest of Sema forEric Christopher2012-04-121-2/+2
| | | | | | | | FunctionDecl::Create calls as well. rdar://11079003 llvm-svn: 154578
* Change location information for synthesized properties to be at theEric Christopher2012-04-031-2/+2
| | | | | | | | | | | | | | | | | | property file/line rather than the @synthesize file/line. Avoids some nasty confusing-ness with conflating the file from the scope and the line from the original declaration. Use the current scope location as a separate parameter so that we can match it up better in the line table with the beginning of the scope. Update a couple of testcases accordingly since I had to change that we actually use the passed in location in EmitFunctionStart and for the new metadata parameter and add a new testcase to make sure we've got the right line numbers for synthesized properties. Part of rdar://11026482 llvm-svn: 153917
* Revert previous commit changing location information to see if thisEric Christopher2012-03-301-2/+2
| | | | | | is causing the gdb test failures on the bots. llvm-svn: 153727
* Change location information for synthesized properties to be at theEric Christopher2012-03-301-2/+2
| | | | | | | | | | | | | property file/line rather than the @synthesize file/line. Avoids some nasty confusing-ness with conflating the file from the scope and the line from the original declaration. Update a couple of testcases accordingly since I had to change that we actually use the passed in location in EmitFunctionStart. Fixes rdar://11026482 llvm-svn: 153714
* Revert r153613 as it's causing large compile-time regressions on the nightly ↵Chad Rosier2012-03-291-6/+3
| | | | | | testers. llvm-svn: 153660
* Tidy.Eric Christopher2012-03-291-13/+19
| | | | llvm-svn: 153658
* When we can't prove that the target of an aggregate copy isJohn McCall2012-03-281-3/+6
| | | | | | | a complete object, the memcpy needs to use the data size of the structure instead of its sizeof() value. Fixes PR12204. llvm-svn: 153613
* Unify naming of LangOptions variable/get function across the Clang stack ↵David Blaikie2012-03-111-17/+17
| | | | | | | | | | (Lex to AST). The member variable is always "LangOpts" and the member function is always "getLangOpts". Reviewed by Chris Lattner llvm-svn: 152536
* Simplify code. No functionality change.Benjamin Kramer2012-03-101-14/+5
| | | | llvm-svn: 152503
* Remove BlockDeclRefExpr and introduce a bit on DeclRefExpr toJohn McCall2012-03-101-33/+27
| | | | | | | | track whether the referenced declaration comes from an enclosing local context. I'm amenable to suggestions about the exact meaning of this bit. llvm-svn: 152491
* Add clang support for new Objective-C literal syntax for NSDictionary, NSArray,Ted Kremenek2012-03-061-18/+198
| | | | | | | | | | | | | 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
* Make CodeGenFunction::EmitBlockCopyAndAutorelease actually do what its name ↵Eli Friedman2012-03-011-4/+4
| | | | | | says. llvm-svn: 151853
* Implement IRGen for the retain-autorelease in the lambda ↵Eli Friedman2012-02-281-0/+25
| | | | | | conversion-to-block-pointer outside of ARC. Testcases coming up soon. llvm-svn: 151603
OpenPOWER on IntegriCloud