Index: lib/CodeGen/CGCleanup.h =================================================================== --- lib/CodeGen/CGCleanup.h +++ lib/CodeGen/CGCleanup.h @@ -280,9 +280,11 @@ assert(CleanupBits.CleanupSize == cleanupSize && "cleanup size overflow"); } - ~EHCleanupScope() { + void Destroy() { delete ExtInfo; } + // Objects of EHCleanupScope are not destructed. Use Destroy(). + ~EHCleanupScope() LLVM_DELETED_FUNCTION; bool isNormalCleanup() const { return CleanupBits.IsNormalCleanup; } llvm::BasicBlock *getNormalBlock() const { return NormalBlock; } Index: lib/CodeGen/CGCleanup.cpp =================================================================== --- lib/CodeGen/CGCleanup.cpp +++ lib/CodeGen/CGCleanup.cpp @@ -184,7 +184,7 @@ StartOfData += Cleanup.getAllocatedSize(); // Destroy the cleanup. - Cleanup.~EHCleanupScope(); + Cleanup.Destroy(); // Check whether we can shrink the branch-fixups stack. if (!BranchFixups.empty()) {