diff --git a/llvm/tools/bugpoint/CrashDebugger.cpp b/llvm/tools/bugpoint/CrashDebugger.cpp index 852359a8c241..872725593e28 100644 --- a/llvm/tools/bugpoint/CrashDebugger.cpp +++ b/llvm/tools/bugpoint/CrashDebugger.cpp @@ -80,7 +80,7 @@ public: virtual TestResult doTest(std::vector &Prefix, std::vector &Kept) { - if (TestFuncs(Kept)) + if (!Kept.empty() && TestFuncs(Kept)) return KeepSuffix; if (!Prefix.empty() && TestFuncs(Prefix)) return KeepPrefix;