summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGObjC.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Sort all the #include lines with LLVM's utils/sort_includes.py whichChandler Carruth2014-01-071-1/+1
| | | | | | | encodes the canonical rules for LLVM's style. I noticed this had drifted quite a bit when cleaning up LLVM, so wanted to clean up Clang as well. llvm-svn: 198686
* CodeGen: Initial instrumentation based PGO implementationJustin Bogner2014-01-061-1/+8
| | | | llvm-svn: 198640
* Remove a whole lot of unused variablesAlp Toker2013-11-271-1/+0
| | | | | | | There are about 30 removed in this patch, generated by a new FixIt I haven't got round to submitting yet. llvm-svn: 195814
* Add CodeGenABITypes.h for use in LLDB.Mark Lacey2013-10-301-0/+1
| | | | | | | | | | | | | | | | | | CodeGenABITypes is a wrapper built on top of CodeGenModule that exposes some of the functionality of CodeGenTypes (held by CodeGenModule), specifically methods that determine the LLVM types appropriate for function argument and return values. I addition to CodeGenABITypes.h, CGFunctionInfo.h is introduced, and the definitions of ABIArgInfo, RequiredArgs, and CGFunctionInfo are moved into this new header from the private headers ABIInfo.h and CGCall.h. Exposing this functionality is one part of making it possible for LLDB to determine the actual ABI locations of function arguments and return values, making it possible for it to determine this for any supported target without hard-coding ABI knowledge in the LLDB code. llvm-svn: 193717
* Fix build breakage, missed committing a chunk of a patch.Nick Lewycky2013-10-021-1/+1
| | | | llvm-svn: 191809
* Thread a SourceLocation into the EmitCheck for "load_invalid_value". This occursNick Lewycky2013-10-021-6/+8
| | | | | | when scalars are loaded / undergo lvalue-to-rvalue conversion. llvm-svn: 191808
* No functionality change. Reflow lines that could fit on one line. Break linesNick Lewycky2013-10-011-4/+1
| | | | | | that had 80-column violations. Remove spurious emacs mode markers on .cpp files. llvm-svn: 191797
* Simplify/clean up debug info suppression in CodeGenFunctionDavid Blaikie2013-08-261-8/+2
| | | | | | | | | | CodeGenFunction is run on only one function - a new object is made for each new function. I would add an assertion/flag to this effect, but there's an exception: ObjC properties involve emitting helper functions that are all emitted by the same CodeGenFunction object, so such a check is not possible/correct. llvm-svn: 189277
* Correctly emit certain implicit references to 'self' even withinJohn McCall2013-05-031-2/+4
| | | | | | | | | | | | | | | | | | a lambda. Bug #1 is that CGF's CurFuncDecl was "stuck" at lambda invocation functions. Fix that by generally improving getNonClosureContext to look through lambdas and captured statements but only report code contexts, which is generally what's wanted. Audit uses of CurFuncDecl and getNonClosureAncestor for correctness. Bug #2 is that lambdas weren't specially mapping 'self' when inside an ObjC method. Fix that by removing the requirement for that and using the normal EmitDeclRefLValue path in LoadObjCSelf. rdar://13800041 llvm-svn: 181000
* Standardize accesses to the TargetInfo in IR-gen.John McCall2013-04-161-1/+1
| | | | | | Patch by Stephen Lin! llvm-svn: 179638
* objc_autoreleasePoolPop() can throw if a -dealloc does.John McCall2013-04-161-1/+3
| | | | | | | | | | | | | Model it as throwing so that the exception can be caught. This is generally not expected to have significant code-size impact because the contents of the @autoreleasepool block are very likely to contain a call, very likely at the same cleanup level as the @autoreleasepool itself. rdar://13660038 llvm-svn: 179630
* Protect the values of array and dictionary literals from theJohn McCall2013-04-041-6/+33
| | | | | | | | | | ARC optimizer while they're held in local unsafe buffers. Based on a patch by Jesse Rusak! rdar://13573224 llvm-svn: 178721
* Add 178663 back.Rafael Espindola2013-04-031-2/+0
| | | | | | | | | | | http://lab.llvm.org:8011/builders/clang-x86_64-darwin10-gdb went back green before it processed the reverted 178663, so it could not have been the culprit. Revert "Revert 178663." This reverts commit 4f8a3eb2ce5d4ba422483439e20c8cbb4d953a41. llvm-svn: 178682
* Revert 178663.Rafael Espindola2013-04-031-0/+2
| | | | | | | | | | Looks like it broke http://lab.llvm.org:8011/builders/clang-x86_64-darwin10-gdb Revert "Don't compute a patched/semantic storage class." This reverts commit 8f187f62cb0487d31bc4afdfcd47e11fe9a51d05. llvm-svn: 178681
* Don't compute a patched/semantic storage class.Rafael Espindola2013-04-031-2/+0
| | | | | | | | | | | For variables and functions clang used to store two storage classes. The one "as written" in the code and a patched one, which, for example, propagates static to the following decls. This apparently is from the days clang lacked linkage computation. It is now redundant and this patch removes it. llvm-svn: 178663
* Objective-C: Provide fixit hints when warningFariborz Jahanian2013-04-021-1/+2
| | | | | | | | about 'isa' ivar being explicitely accessed when base is a user class object reference. // rdar://13503456 llvm-svn: 178562
* Under ARC, when we're passing the address of a strong variableJohn McCall2013-03-231-0/+15
| | | | | | | | | | | | to an out-parameter using the indirect-writeback conversion, and we copied the current value of the variable to the temporary, make sure that we register an intrinsic use of that value with the optimizer so that the value won't get released until we have a chance to retain it. rdar://13195034 llvm-svn: 177813
* Tighten up the rules for precise lifetime and documentJohn McCall2013-03-131-8/+11
| | | | | | | | the requirements on the ARC optimizer. rdar://13407451 llvm-svn: 176924
* Change hasAggregateLLVMType, which conflates complex andJohn McCall2013-03-071-7/+14
| | | | | | | | | | | | | | | aggregate types in a profoundly wrong way that has to be worked around in every call site, to getEvaluationKind, which classifies and distinguishes between all of these cases. Also, normalize the API for loading and storing complexes. I'm working on a larger patch and wanted to pull these changes out, but it would have be annoying to detangle them from each other. llvm-svn: 176656
* Remove temporary std::vectors that ca be replaced with ArrayRef's magic.Benjamin Kramer2013-03-071-11/+7
| | | | llvm-svn: 176653
* 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
OpenPOWER on IntegriCloud