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
This commit is contained in:
Misha Brukman 2003-08-05 15:26:21 +00:00
parent d88ba5a861
commit a493ae300b

View File

@ -80,7 +80,7 @@ public:
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;