diff options
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.cpp')
-rw-r--r-- | clang/lib/CodeGen/CodeGenFunction.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CodeGenFunction.cpp b/clang/lib/CodeGen/CodeGenFunction.cpp index 9f359185381..93617718345 100644 --- a/clang/lib/CodeGen/CodeGenFunction.cpp +++ b/clang/lib/CodeGen/CodeGenFunction.cpp @@ -229,6 +229,11 @@ void CodeGenFunction::FinishFunction(SourceLocation EndLoc) { DI->EmitLocation(Builder, EndLoc); } + // Some top level lifetime extended variables may still need + // to have their cleanups called. + if (!LifetimeExtendedCleanupStack.empty()) + MoveDeferedCleanups(0); + // Pop any cleanups that might have been associated with the // parameters. Do this in whatever block we're currently in; it's // important to do this before we enter the return block or return |