aboutsummaryrefslogtreecommitdiff
path: root/clang/test/CodeGenCXX/static-local-in-local-class.cpp
AgeCommit message (Collapse)AuthorFilesLines
2015-02-27Update Clang tests to handle explicitly typed load changes in LLVM.David Blaikie1-6/+6
llvm-svn: 230795
2015-01-22Emit DeferredDeclsToEmit in a DFS order.Rafael Espindola1-4/+4
Currently we emit DeferredDeclsToEmit in reverse order. This patch changes that. The advantages of the change are that * The output order is a bit closer to the source order. The change to test/CodeGenCXX/pod-member-memcpys.cpp is a good example. * If we decide to deffer more, it will not cause as large changes in the estcases as it would without this patch. llvm-svn: 226751
2014-10-08Fix test case in no asserts buildReid Kleckner1-2/+2
llvm-svn: 219266
2014-10-08Fix IRGen for referencing a static local before emitting its declReid Kleckner1-3/+130
Summary: Previously CodeGen assumed that static locals were emitted before they could be accessed, which is true for automatic storage duration locals. However, it is possible to have CodeGen emit a nested function that uses a static local before emitting the function that defines the static local, breaking that assumption. Fix it by creating the static local upon access and ensuring that the deferred function body gets emitted. We may not be able to emit the initializer properly from outside the function body, so don't try. Fixes PR18020. See also previous attempts to fix static locals in PR6769 and PR7101. Reviewers: rsmith Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D4787 llvm-svn: 219265
2010-05-26Patch to fix a irgen crash accessing an initialized local staticFariborz Jahanian1-0/+12
variable in a local function. Fixes pr7101. llvm-svn: 104743
2010-04-18Local static variables must be available module-wiseFariborz Jahanian1-0/+21
as they are accessible in static methods in a class local to the same function. Fixes PR6769. llvm-svn: 101756