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 | 1c565c31b161898d8ea32bd71c5ab55b5d6d2b83 (patch) | |
| tree | 122eae39680aa0823699c05bf5d76fb24c4816ed /clang/lib/CodeGen/CGCleanup.cpp | |
| parent | 7ad0bd54d31788c4858cffa6e203cd06260b800b (diff) | |
| download | bcm5719-llvm-1c565c31b161898d8ea32bd71c5ab55b5d6d2b83.tar.gz bcm5719-llvm-1c565c31b161898d8ea32bd71c5ab55b5d6d2b83.zip | |
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.
llvm-svn: 234700
Diffstat (limited to 'clang/lib/CodeGen/CGCleanup.cpp')
| -rw-r--r-- | clang/lib/CodeGen/CGCleanup.cpp | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/clang/lib/CodeGen/CGCleanup.cpp b/clang/lib/CodeGen/CGCleanup.cpp index d97e40554ef..299969a4649 100644 --- a/clang/lib/CodeGen/CGCleanup.cpp +++ b/clang/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)); |

