Rather than trying to gracefully handle input sequences with repeated
authorChandler Carruth <chandlerc@gmail.com>
Fri, 4 May 2012 11:17:06 +0000 (11:17 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Fri, 4 May 2012 11:17:06 +0000 (11:17 +0000)
blocks, assert that this doesn't happen. We don't want to bother trying
to support this call pattern as it isn't necessary.

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

lib/Transforms/Utils/CodeExtractor.cpp

index 0178c336d9e7a5fa56bc9d0e84d1509bc07a40e5..4d82857c1b23b12489576048be6d19a2aefeb9ad 100644 (file)
@@ -74,7 +74,7 @@ buildExtractionBlockSet(ArrayRef<BasicBlock *> BBs) {
   for (ArrayRef<BasicBlock *>::iterator I = BBs.begin(), E = BBs.end();
        I != E; ++I) {
     if (!Result.insert(*I))
-      continue;
+      llvm_unreachable("Repeated basic blocks in extraction input");
 
     if (!isBlockValidForExtraction(**I)) {
       Result.clear();