aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGenObjCXX/arc-references.mm
AgeCommit message (Collapse)Author
2018-12-18Generate objc intrinsics instead of runtime calls as the ARC optimizer now ↵Pete Cooper
works only on intrinsics Differential Revision: https://reviews.llvm.org/D55802 Reviewers: rjmccall git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@349535 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-14[ObjC] Fix lifetime markers of loop variable in EmitObjCForCollectionStmt ↵Kuba Mracek
[take 2] CodeGenFunction::EmitObjCForCollectionStmt currently emits lifetime markers for the loop variable in an inconsistent way: lifetime.start is emitted before the loop is entered, but lifetime.end is emitted inside the loop. AddressSanitizer uses these markers to track out-of-scope accesses to local variables, and we get false positives in Obj-C foreach loops (in the 2nd iteration of the loop). This patch keeps the loop variable alive for the whole loop by extending ForScope and registering the cleanup function inside EmitAutoVarAlloca. Differential Revision: https://reviews.llvm.org/D32029 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@300340 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-10Update for lifetime intrinsic signature changeMatt Arsenault
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@299877 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-23Make '-disable-llvm-optzns' an alias for '-disable-llvm-passes'.Chandler Carruth
Much to my surprise, '-disable-llvm-optzns' which I thought was the magical flag I wanted to get at the raw LLVM IR coming out of Clang deosn't do that. It still runs some passes over the IR. I don't want that, I really want the *raw* IR coming out of Clang and I strongly suspect everyone else using it is in the same camp. There is actually a flag that does what I want that I didn't know about called '-disable-llvm-passes'. I suspect many others don't know about it either. It both does what I want and is much simpler. This removes the confusing version and makes that spelling of the flag an alias for '-disable-llvm-passes'. I've also moved everything in Clang to use the 'passes' spelling as it seems both more accurate (*all* LLVM passes are disabled, not just optimizations) and much easier to remember and spell correctly. This is part of simplifying how Clang drives LLVM to make it cleaner to wire up to the new pass manager. Differential Revision: https://reviews.llvm.org/D28047 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@290392 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-22Revert "Revert r234581, it might have caused a few miscompiles in Chromium."David Majnemer
This reverts commit r234700. It turns out that the lifetime markers were not the cause of Chromium failing but a bug which was uncovered by optimizations exposed by the markers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@235553 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-11Revert r234581, it might have caused a few miscompiles in Chromium.Nico Weber
If the revert helps, I'll get a repro this Monday. Else I'll put the change back in. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@234700 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-10Remove threshold for inserting lifetime markers for named temporariesArnaud A. de Grandmaison
Now that TailRecursionElimination has been fixed with r222354, the threshold on size for lifetime marker insertion can be removed. This only affects named temporary though, as the patch for unnamed temporaries is still in progress. My previous commit (r222993) was not handling debuginfo correctly, but this could only be seen with some asan tests. Basically, lifetime markers are just instrumentation for the compiler's usage and should not affect debug information; however, the cleanup infrastructure was assuming it contained only destructors, i.e. actual code to be executed, and was setting the breakpoint for the end of the function to the closing '}', and not the return statement, in order to show some destructors have been called when leaving the function. This is wrong when the cleanups are only lifetime markers, and this is now fixed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@234581 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-27Update Clang tests to handle explicitly typed load changes in LLVM.David Blaikie
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@230795 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-01Revert "Remove threshold for lifetime marker insertion of named temporaries"Arnaud A. de Grandmaison
Revert r222993 while I investigate some MemorySanitizer failures. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222995 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-01Remove threshold for lifetime marker insertion of named temporariesArnaud A. de Grandmaison
Now that TailRecursionElimination has been fixed with r222354, the threshold on size for lifetime marker insertion can be removed. This only affects named temporary though, as the patch for unnamed temporaries is still in progress. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222993 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-24test: add -std=c++11Saleem Abdulrasool
This test uses C++11 features (r-value references) in ObjC++. Add a -std=c++11 to silence a warning. NFC. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@220586 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-08Revert "Remove threshold on object size for inserting lifetime begin / end"Arnaud A. de Grandmaison
Revert this patch while I investigate some sanitizer failures off-line. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@219307 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-08Remove threshold on object size for inserting lifetime begin / endArnaud A. de Grandmaison
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@219303 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-15CHECK-LABEL-ify some code gen tests to improve diagnostic experience when ↵Stephen Lin
tests fail. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188447 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-18Remove invalid double colon in test case was previously ignored by FileCheck.Benjamin Kramer
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164167 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-02Make -fobjc-nonfragile-abi the -cc1 default, since it's theJohn McCall
increasingly prevailing case to the point that new features like ARC don't even support the fragile ABI anymore. This required a little bit of reshuffling with exceptions because a check was assuming that ObjCNonFragileABI was only being set in ObjC mode, and that's actually a bit obnoxious to do. Most, though, it involved a perl script to translate a ton of test cases. Mostly no functionality change for driver users, although there are corner cases with disabling language-specific exceptions that we should handle more correctly now. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140957 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-26Slight optimization enabled by the previous assert: John McCall
emit all gl-value arguments as reference bindings. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138655 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-06Change the driver's logic about Objective-C runtimes: abstract out aJohn McCall
structure to hold inferred information, then propagate each invididual bit down to -cc1. Separate the bits of "supports weak" and "has a native ARC runtime"; make the latter a CodeGenOption. The tool chain is still driving this decision, because it's the place that has the required deployment target information on Darwin, but at least it's better-factored now. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134453 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-22When binding a reference to an Automatic Reference Counting temporary,Douglas Gregor
retain/release the temporary object appropriately. Previously, we would only perform the retain/release operations when the reference would extend the lifetime of the temporary, but this does the wrong thing across calls. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133620 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-15Automatic Reference Counting.John McCall
Language-design credit goes to a lot of people, but I particularly want to single out Blaine Garst and Patrick Beard for their contributions. Compiler implementation credit goes to Argyrios, Doug, Fariborz, and myself, in no particular order. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133103 91177308-0d34-0410-b5e6-96231b3b80d8