diff options
| author | John McCall <rjmccall@apple.com> | 2011-04-28 02:15:35 +0000 |
|---|---|---|
| committer | John McCall <rjmccall@apple.com> | 2011-04-28 02:15:35 +0000 |
| commit | a85af56e66b90ae287f8c6d7aa6a11af0887d71d (patch) | |
| tree | a28e143904944ae6fc02425794ece42040c3cbe1 /clang/lib/CodeGen/CGClass.cpp | |
| parent | d35222283949b883a407dba843bd1f9ae7f21002 (diff) | |
| download | llvm-a85af56e66b90ae287f8c6d7aa6a11af0887d71d.zip llvm-a85af56e66b90ae287f8c6d7aa6a11af0887d71d.tar.gz llvm-a85af56e66b90ae287f8c6d7aa6a11af0887d71d.tar.bz2 | |
When block-capturing a variable with a non-trivial destructor,
make sure to mark the destructor. This normally isn't required,
because the destructor should have been marked as part of the
declaration of the local, but it's necessary when the variable
is a parameter because it's the call sites that are responsible
for those destructors.
llvm-svn: 130372
Diffstat (limited to 'clang/lib/CodeGen/CGClass.cpp')
| -rw-r--r-- | clang/lib/CodeGen/CGClass.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CGClass.cpp b/clang/lib/CodeGen/CGClass.cpp index 2789bb2..2cb5549 100644 --- a/clang/lib/CodeGen/CGClass.cpp +++ b/clang/lib/CodeGen/CGClass.cpp @@ -1305,6 +1305,7 @@ void CodeGenFunction::PushDestructorCleanup(QualType T, llvm::Value *Addr) { if (ClassDecl->hasTrivialDestructor()) return; const CXXDestructorDecl *D = ClassDecl->getDestructor(); + assert(D && D->isUsed() && "destructor not marked as used!"); PushDestructorCleanup(D, Addr); } |
