]> granicus.if.org Git - clang/commit
Remove threshold for inserting lifetime markers for named temporaries
authorArnaud A. de Grandmaison <arnaud.degrandmaison@arm.com>
Fri, 10 Apr 2015 10:13:52 +0000 (10:13 +0000)
committerArnaud A. de Grandmaison <arnaud.degrandmaison@arm.com>
Fri, 10 Apr 2015 10:13:52 +0000 (10:13 +0000)
commit914d1bd47f6252559e110929949d69a7a145881d
treeee6f946529a950f82dcac4c80668d4e360366db7
parent0c6a04ea7e5f057f6a98d5198ce12840f8508c99
Remove threshold for inserting lifetime markers for named temporaries

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
23 files changed:
lib/CodeGen/CGCall.cpp
lib/CodeGen/CGCleanup.cpp
lib/CodeGen/CGCleanup.h
lib/CodeGen/CGDecl.cpp
lib/CodeGen/CodeGenFunction.cpp
lib/CodeGen/CodeGenFunction.h
lib/CodeGen/EHScopeStack.h
test/CodeGen/cleanup-destslot-simple.c [new file with mode: 0644]
test/CodeGen/lifetime-debuginfo-1.c [new file with mode: 0644]
test/CodeGen/lifetime-debuginfo-2.c [new file with mode: 0644]
test/CodeGenCXX/destructors.cpp
test/CodeGenCXX/nrvo.cpp
test/CodeGenObjC/arc-blocks.m
test/CodeGenObjC/arc-bridged-cast.m
test/CodeGenObjC/arc-literals.m
test/CodeGenObjC/arc-precise-lifetime.m
test/CodeGenObjC/arc-ternary-op.m
test/CodeGenObjC/arc.m
test/CodeGenObjC/exceptions.m
test/CodeGenObjCXX/arc-move.mm
test/CodeGenObjCXX/arc-references.mm
test/CodeGenObjCXX/arc.mm
test/CodeGenObjCXX/literals.mm