Catch all functions containing a certain string

llvm-svn: 208190
This commit is contained in:
Tobias Grosser 2014-05-07 11:23:32 +00:00
parent cfd641f123
commit a3ab27e9fa
1 changed files with 4 additions and 3 deletions

View File

@ -82,8 +82,9 @@ DetectRegionsWithoutLoops("polly-detect-scops-in-regions-without-loops",
cl::cat(PollyCategory));
static cl::opt<std::string>
OnlyFunction("polly-only-func", cl::desc("Only run on a single function"),
cl::value_desc("function-name"), cl::ValueRequired, cl::init(""),
OnlyFunction("polly-only-func",
cl::desc("Only run on functions that contain a certain string"),
cl::value_desc("string"), cl::ValueRequired, cl::init(""),
cl::cat(PollyCategory));
static cl::opt<std::string>
@ -730,7 +731,7 @@ bool ScopDetection::runOnFunction(llvm::Function &F) {
releaseMemory();
if (OnlyFunction != "" && F.getName() != OnlyFunction)
if (OnlyFunction != "" && !F.getName().count(OnlyFunction))
return false;
if (!isValidFunction(F))