[llvm] r206328 - RegionInfo: Do not access a value that was just moved away
Tobias Grosser
tobias at grosser.es
Tue Apr 15 15:09:36 PDT 2014
Author: grosser
Date: Tue Apr 15 17:09:36 2014
New Revision: 206328
URL: http://llvm.org/viewvc/llvm-project?rev=206328&view=rev
Log:
RegionInfo: Do not access a value that was just moved away
This fixes a regression introduced in r206310.
Modified:
llvm/trunk/lib/Analysis/RegionInfo.cpp
Modified: llvm/trunk/lib/Analysis/RegionInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/RegionInfo.cpp?rev=206328&r1=206327&r2=206328&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/RegionInfo.cpp (original)
+++ llvm/trunk/lib/Analysis/RegionInfo.cpp Tue Apr 15 17:09:36 2014
@@ -363,8 +363,8 @@ void Region::addSubRegion(Region *SubReg
std::vector<std::unique_ptr<Region>> Keep;
for (iterator I = begin(), E = end(); I != E; ++I)
if (SubRegion->contains(I->get()) && I->get() != SubRegion) {
- SubRegion->children.push_back(std::move(*I));
(*I)->parent = SubRegion;
+ SubRegion->children.push_back(std::move(*I));
} else
Keep.push_back(std::move(*I));
More information about the llvm-commits
mailing list