diff options
author | Nico Weber <nicolasweber@gmx.de> | 2015-04-11 23:51:38 +0000 |
---|---|---|
committer | Nico Weber <nicolasweber@gmx.de> | 2015-04-11 23:51:38 +0000 |
commit | bc83d9f70fc57f147103e298e07a9c89464cc137 (patch) | |
tree | eb021ce586cbacded2e9eb4cfcab6f522cf17cf5 /lib/CodeGen/CGCleanup.cpp | |
parent | dc54701c1f092eb688feee78d50a0bfad557636c (diff) |
Revert r234581, it might have caused a few miscompiles in Chromium.
If the revert helps, I'll get a repro this Monday. Else I'll put the change
back in.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@234700 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGCleanup.cpp')
-rw-r--r-- | lib/CodeGen/CGCleanup.cpp | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/lib/CodeGen/CGCleanup.cpp b/lib/CodeGen/CGCleanup.cpp index d97e40554e..299969a464 100644 --- a/lib/CodeGen/CGCleanup.cpp +++ b/lib/CodeGen/CGCleanup.cpp @@ -125,17 +125,6 @@ char *EHScopeStack::allocate(size_t Size) { return StartOfData; } -bool EHScopeStack::containsOnlyLifetimeMarkers( - EHScopeStack::stable_iterator Old) const { - for (EHScopeStack::iterator it = begin(); stabilize(it) != Old; it++) { - EHCleanupScope *cleanup = dyn_cast<EHCleanupScope>(&*it); - if (!cleanup || !cleanup->isLifetimeMarker()) - return false; - } - - return true; -} - EHScopeStack::stable_iterator EHScopeStack::getInnermostActiveNormalCleanup() const { for (stable_iterator si = getInnermostNormalCleanup(), se = stable_end(); @@ -759,15 +748,7 @@ void CodeGenFunction::PopCleanupBlock(bool FallthroughIsBranchThrough) { Scope.getNumBranchAfters() == 1) { assert(!BranchThroughDest || !IsActive); - // Clean up the possibly dead store to the cleanup dest slot. - llvm::Instruction *NormalCleanupDestSlot = - cast<llvm::Instruction>(getNormalCleanupDestSlot()); - if (NormalCleanupDestSlot->hasOneUse()) { - NormalCleanupDestSlot->user_back()->eraseFromParent(); - NormalCleanupDestSlot->eraseFromParent(); - NormalCleanupDest = nullptr; - } - + // TODO: clean up the possibly dead stores to the cleanup dest slot. llvm::BasicBlock *BranchAfter = Scope.getBranchAfterBlock(0); InstsToAppend.push_back(llvm::BranchInst::Create(BranchAfter)); |