summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenObjC
Commit message (Collapse)AuthorAgeFilesLines
* CodeGen: correct block mangling in ObjCSaleem Abdulrasool2014-10-141-0/+29
| | | | | | | | | | | | Mangling for blocks defined within blocks in an ObjectiveC context were also broken by SVN r219393. Because the code in mangleName assumed that the code was either C or C++, we would trigger assertions when trying to mangle the inner blocks in an ObjectiveC context. Add a test and use the ObjectiveC specific mangling when dealing with an ObjectiveC method declaration. llvm-svn: 219697
* Revert "Remove threshold on object size for inserting lifetime begin / end"Arnaud A. de Grandmaison2014-10-087-191/+3
| | | | | | Revert this patch while I investigate some sanitizer failures off-line. llvm-svn: 219307
* Remove threshold on object size for inserting lifetime begin / endArnaud A. de Grandmaison2014-10-087-3/+191
| | | | | | | | | Boostrapping LLVM+Clang+LLDB without threshold on object size for lifetime markers insertion has shown there was no significant change in compile time, so let the stack slot colorizer do its optimization for all slots. llvm-svn: 219303
* Revert "Revert "DI: LLVM schema change: fold constants into string""Duncan P. N. Exon Smith2014-10-0313-26/+28
| | | | | | | | | | | | | | This reverts commit r218917, effectively reapplying r218913. Original commit message follows. -- Update debug info testcases for an LLVM metadata schema change to fold metadata constant operands into a single `MDString`. Part of PR17891. llvm-svn: 219011
* Revert "DI: LLVM schema change: fold constants into string"Duncan P. N. Exon Smith2014-10-0213-28/+26
| | | | | | This reverts commit r218913 while I investigate some bots. llvm-svn: 218917
* DI: LLVM schema change: fold constants into stringDuncan P. N. Exon Smith2014-10-0213-26/+28
| | | | | | | | | Update debug info testcases for an LLVM metadata schema change to fold metadata constant operands into a single `MDString`. Part of PR17891. llvm-svn: 218913
* Update CGDebugInfo to the updated API in LLVM.Adrian Prantl2014-10-015-11/+11
| | | | | | | | | | Complex address expressions are no longer part of DIVariable, but rather an extra argument to the debug intrinsics. http://reviews.llvm.org/D4919 rdar://problem/17994491 llvm-svn: 218788
* Reverting r218777 while investigating buildbot breakage.Adrian Prantl2014-10-015-11/+11
| | | | | | "Update CGDebugInfo to the updated API in LLVM." llvm-svn: 218781
* Update CGDebugInfo to the updated API in LLVM.Adrian Prantl2014-10-015-11/+11
| | | | | | | | | | Complex address expressions are no longer part of DIVariable, but rather an extra argument to the debug intrinsics. http://reviews.llvm.org/D4919 rdar://problem/17994491 llvm-svn: 218777
* Allow protocols to be just declared.Rafael Espindola2014-09-121-0/+17
| | | | llvm-svn: 217704
* Debug info: Only emit C++ accessibility specifiers when they are divergingAdrian Prantl2014-08-291-2/+2
| | | | | | | | from the default for the containing type. rdar://problem/18154959 llvm-svn: 216800
* Objective-C IRGen. Fixes an assertion crash caused by inconsistentFariborz Jahanian2014-08-281-0/+18
| | | | | | | | linkage related to generation of OBJC_SELECTOR_REFERENCES symbol needed in generation of call to 'super' in a class method. // rdar://18150301 llvm-svn: 216676
* Objective-C. Fixes an assert where because of capturedFariborz Jahanian2014-08-121-0/+25
| | | | | | | | variable in block is over-aligned with an align attribute causing block metadata size not be multiple of alignment. rdar://17878679 llvm-svn: 215449
* Debuginfo: Correctly tag variadic ObjC methods with ↵Frederic Riss2014-08-121-0/+16
| | | | | | | | DW_TAG_unspecified_parameter. Fixes rdar://13690847 llvm-svn: 215423
* Objective-C ARC. Use of non-retain/autorelease APIFariborz Jahanian2014-08-082-9/+14
| | | | | | | for building Objective-C array literals in ARC mode. rdar://17554063 llvm-svn: 215232
* Objective-C arc. Switch the Objective-C dictionary literal in ARC modeFariborz Jahanian2014-08-072-5/+8
| | | | | | | to use non-retain/autorelease API variants of ObjC objects. wip. rdar://17554063 llvm-svn: 215146
* Objective-C ARC. More code for Objective-C'sFariborz Jahanian2014-08-061-2/+6
| | | | | | new APIs for literals. nfc. wip. rdar://17554063 llvm-svn: 215043
* Revert "Emit column debug information for loads"Tobias Grosser2014-07-291-3/+3
| | | | | | | | | | | | | | | | This broke the following gdb tests: gdb.base__annota1.exp gdb.base__consecutive.exp gdb.python__py-symtab.exp gdb.reverse__consecutive-precsave.exp gdb.reverse__consecutive-reverse.exp I will look into this. This reverts commit 214162. llvm-svn: 214163
* Emit column debug information for loadsTobias Grosser2014-07-291-3/+3
| | | | | | | | | This allows us to give more precise diagnostics. Diego kindly tested the impact on debug info size: "The increase on average debug sizes is 0.1%. The total file size increase is ~0%." llvm-svn: 214162
* Mark C++ reference parameters as dereferenceableHal Finkel2014-07-181-2/+2
| | | | | | | | | | | | | | Because references must be initialized using some evaluated expression, they must point to something, and a callee can assume the reference parameter is dereferenceable. Taking advantage of a new attribute just added to LLVM, mark them as such. Because dereferenceability in addrspace(0) implies nonnull in the backend, we don't need both attributes. However, we need to know the size of the object to use the dereferenceable attribute, so for incomplete types we still emit only nonnull. llvm-svn: 213386
* Objective-C. Introducing __attribute__((objc_runtime_name("runtimename"))Fariborz Jahanian2014-07-163-0/+174
| | | | | | | | | to be applied to class or protocols. This will direct IRGen for Objective-C metadata to use the new name in various places where class and protocol names are needed. rdar:// 17631257 llvm-svn: 213167
* Improve test of my previous patch. rdar://17633301Fariborz Jahanian2014-07-151-2/+3
| | | | llvm-svn: 213081
* Objective-C IRGen. Fixes an inconsistant linkage ofFariborz Jahanian2014-07-151-0/+14
| | | | | | | ObC's metaclass metadata with its class metadata which results in an assert. rdar://17633301 llvm-svn: 213076
* Improve robustness of tests for module flags metadataOliver Stannard2014-06-192-14/+14
| | | | | | | Fix clang tests to not break if the ID numbers of module flags metadata nodes change. llvm-svn: 211276
* Objective-C IRGen. Patch to generate a weak symbol reference whenFariborz Jahanian2014-06-101-0/+12
| | | | | | | | 'super' dispatches a class method in category for OBJC_METACLASS. This is when class is a weak_import class. // rdar://16529125 llvm-svn: 210547
* Add 'nonnull' parameter or return attribute when producing an llvm pointer ↵Nick Lewycky2014-05-281-2/+2
| | | | | | type in a function type where the C++ type is a reference. Update the tests. llvm-svn: 209723
* DebugInfo: Avoid creating DILexicalScopeFiles when the filename in the ↵David Blaikie2014-05-141-1/+1
| | | | | | | | | | | | | | | | | | | current scope has not changed. This looks like the right way for this check to work, but there is another semi-obvious bug, I would think: why is CurLoc not zero'd out between functions? The possibility for it to bleed between them seems problematic. (& indeed I caused tests to fail when I fixed this a different way, by setting CurLoc to SourceLocation() and the end of EmitFunctionEnd... ) The changes to debug-info-blocks.m are due to a mismatch between the source manager's file naming and CGDebugInfo's default handling when no -main-file-name is specified. This actually reveals somewhat of a bug in the debug info when using source files from standard in, too. See the comment in CGDebugInfo::CreateCompileUnit for more details. llvm-svn: 208742
* Build debug info for ObjC interface types at the end of the translation unit ↵David Blaikie2014-05-051-3/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | to ensure all ivars are included. This takes a different approach than the completedType/requiresCompleteType work which relies on AST callbacks to upgrade the type declaration to a definition. Instead, just defer constructing the definition to the end of the translation unit. This works because the definition is never needed by other debug info (so far as I know), whereas the definition of a struct may be needed by other debug info before the end of the translation unit (such as emitting the definition of a member function which must refer to that member function's declaration). If we had a callback for whenever an IVar was added to an ObjC interface we could use that, and remove the need for the ObjCInterfaceCache, which might be nice. (also would need a callback for when it was more than just a declaration so we could get properties, etc). A side benefit is that we also don't need the CompletedTypeCache anymore. Just rely on the declaration-ness of a type to decide whether its definition is yet to be emitted. There's still the PR19562 memory leak, but this should hopefully make that a bit easier to approach. llvm-svn: 208015
* ObjC IVars aren't added when the type isn't emitted after the interface ↵David Blaikie2014-05-051-1/+15
| | | | | | extension llvm-svn: 208014
* Make test independent of label. Thanks to Richard Smith for catching this!Adrian Prantl2014-04-291-4/+2
| | | | llvm-svn: 207489
* Run this test through instnamer to stop it failing on non-asserts clang builds.Richard Smith2014-04-291-1/+1
| | | | llvm-svn: 207488
* Debug info: Improve line table for functions with cleanups an early exitAdrian Prantl2014-04-291-0/+25
| | | | | | | | | | | | | and no return expr at the end of the function. The "function has only simple returns" check in FinishFunction tests whether the number of simple return exprs equals the number of return exprs, but so far a fallthrough at the end of a function was not counted as a return, which would result in cleanup code being associated with the wrong source line. rdar://problem/16733984. llvm-svn: 207480
* Objective-C [IRGen]. Fixes a crash in IRGen involving use ofFariborz Jahanian2014-04-231-0/+11
| | | | | | | 'typeof' to extract type of an @encode expression used in an initializer. // rdar://16655340 llvm-svn: 207004
* Objective-C [IRGen]. Add encoding for 'weak' attribute of aFariborz Jahanian2014-04-021-0/+9
| | | | | | 'readonly' property. // rdar://16136439 llvm-svn: 205477
* ARM64: initial clang support commit.Tim Northover2014-03-294-7/+69
| | | | | | | | | | | This adds Clang support for the ARM64 backend. There are definitely still some rough edges, so please bring up any issues you see with this patch. As with the LLVM commit though, we think it'll be more useful for merging with AArch64 from within the tree. llvm-svn: 205100
* Don't produce a L symbol in __DATA,__data.Rafael Espindola2014-03-271-0/+2
| | | | | | The section __DATA,__data is atomized by the linker and cannot have L symbols. llvm-svn: 204879
* test: Give instrumentation based profiling tests their own directoryJustin Bogner2014-03-112-85/+0
| | | | | | | | These tests are logically related, but they're spread about several different CodeGen directories. Consolidate them in one place to make them easier to manage. llvm-svn: 203541
* Objective-C IRGen. Fixes several regressions caused by changes madeFariborz Jahanian2014-03-111-0/+33
| | | | | | to setting of ObjC linkages. //rdar://16206443 llvm-svn: 203521
* Use llvm.compiler.used instead of llvm.used for objc symbols.Rafael Espindola2014-03-061-1/+1
| | | | | | | | | | | | | LLVM currently has a hack (shouldEmitUsedDirectiveFor) that causes it to not print no_dead_strip for symbols starting with 'l' or 'L'. These are exactly the ones that the clang's objc codegen is producing. The net result, is that it is equivalent to llvm.compiler.used. The need for putting the private symbol in llvm.compiler.used should be clear (the objc runtime uses them). The reason for also putting the weak symbols in it is for LTO: ld64 will not ask us to preserve the it. llvm-svn: 203172
* Make the test a bit stronger by showing what is added to llvm.used.Rafael Espindola2014-03-061-0/+2
| | | | llvm-svn: 203170
* PGO: Add support for Objective-C blocks.Bob Wilson2014-03-062-5/+23
| | | | llvm-svn: 203157
* Revert "Use private linkage for remaining GlobalVariables with private names."Rafael Espindola2014-03-063-7/+7
| | | | | | | | This reverts commit r203059. Revert while we discuss what does it mean to be private and weak. llvm-svn: 203141
* Run -fprofile-instr tests with %clang_cc1.Bob Wilson2014-03-061-2/+2
| | | | | | | This should help avoid problems like the buildbot fallout from my change in r203085. I left the CodeGenCXX tests alone for now. llvm-svn: 203131
* CodeGenObjC/instr-profile.m: Add -target darwin to appease bots.NAKAMURA Takumi2014-03-061-2/+2
| | | | | | | | | | | | This expected; ; Function Attrs: uwtable define internal void @"\01+[A foreach:]"(i8* %self, i8* %_cmd, %0* %array) #0 { But the Name is mangled on other hosts; (x86_64-unknown-unknown) ; Function Attrs: nounwind uwtable define internal void @_c_A__foreach_(i8* %self, i8* %_cmd, %1* %array) #0 { llvm-svn: 203092
* Attempt to fix buildbots by dropping the -LABEL from some FileCheck patterns.Bob Wilson2014-03-061-2/+2
| | | | llvm-svn: 203090
* PGO: add instrumentation for Objective-C methods.Bob Wilson2014-03-062-6/+28
| | | | llvm-svn: 203085
* Use private linkage for remaining GlobalVariables with private names.Rafael Espindola2014-03-063-7/+7
| | | | | | | | | | | | | | | | | | | | | | This patch changes the remaining GlobalVariables using "\01L" and "\01l" prefixes to use private linkage. What is strange about them is that they currently use WeakAnyLinkage. There is no comment stating why and that is really odd since the symbols are completely hidden, so it doesn't make sense for them to be weak. Clang revisions like r63329, r63408, r63770, r65761 set the linkage to weak, but don't say why. I suspect they were just copying llvm-gcc. In llvm-gcc I found r58599 and r56322 that set DECL_WEAK, but they were just syncing from the apple gcc. I am not exactly sure what that means, since the last commit to svn://gcc.gnu.org/svn/gcc/branches/apple was in 2006, 2 years earlier. In summary, I have no idea why weak linkage was being used :-( To quote John McCall, "Let’s try without it and see" :-) llvm-svn: 203059
* Objective-C IRGen. Fix up the hueristics for determiningFariborz Jahanian2014-03-041-0/+64
| | | | | | | | if an ivar offset load is invariant iff inside an instance method and ivar belongs to instance method's class and one of its super class. // rdar://16095748 llvm-svn: 202872
* Objective-C. Fixes a regression when figuring out linkageFariborz Jahanian2014-03-031-0/+24
| | | | | | | for metadata symbols for forward referenced protocols which are never defined. // rdar://16203115 llvm-svn: 202761
* Use private linkage for globals we already name with \01L and \01l.Rafael Espindola2014-02-2717-132/+132
| | | | | | | | | | | | In llvm the only semantic difference between internal and private is that llvm tries to hide private globals my mangling them with a private prefix. Since the globals changed by this patch already had the magic don't mangle marker, there should be no change in the generated assembly. A followup patch should then be able to drop the \01L and \01l prefixes and let llvm mangle as appropriate. llvm-svn: 202419
OpenPOWER on IntegriCloud