Only test the vector of functions if it is non-empty.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7594 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/tools/bugpoint/CrashDebugger.cpp b/tools/bugpoint/CrashDebugger.cpp
index 852359a..8727255 100644
--- a/tools/bugpoint/CrashDebugger.cpp
+++ b/tools/bugpoint/CrashDebugger.cpp
@@ -80,7 +80,7 @@
virtual TestResult doTest(std::vector<Function*> &Prefix,
std::vector<Function*> &Kept) {
- if (TestFuncs(Kept))
+ if (!Kept.empty() && TestFuncs(Kept))
return KeepSuffix;
if (!Prefix.empty() && TestFuncs(Prefix))
return KeepPrefix;