Fix a goof with my previous commit by completely returning when we
authorChandler Carruth <chandlerc@gmail.com>
Fri, 4 May 2012 11:14:19 +0000 (11:14 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Fri, 4 May 2012 11:14:19 +0000 (11:14 +0000)
detect an in-eligible block rather than just breaking out of the loop.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156166 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Utils/CodeExtractor.cpp

index 3d08a5dffc5fb3dfb1e31c9c950d49b234a95949..0178c336d9e7a5fa56bc9d0e84d1509bc07a40e5 100644 (file)
@@ -78,7 +78,7 @@ buildExtractionBlockSet(ArrayRef<BasicBlock *> BBs) {
 
     if (!isBlockValidForExtraction(**I)) {
       Result.clear();
-      break;
+      return Result;
     }
   }