diff options
author | Alexandre Ganea <alexandre.ganea@ubisoft.com> | 2020-01-01 17:23:06 -0500 |
---|---|---|
committer | Alexandre Ganea <alexandre.ganea@ubisoft.com> | 2020-01-01 17:29:04 -0500 |
commit | 92b68c1937cd065a2fc44d18c1099de7da19b356 (patch) | |
tree | 8a47e1ae3f830532208f76092c20c05ebb6427ad /polly/lib | |
parent | 6656e961c08393c3949412ef945ade0272b66fca (diff) | |
download | bcm5719-llvm-92b68c1937cd065a2fc44d18c1099de7da19b356.tar.gz bcm5719-llvm-92b68c1937cd065a2fc44d18c1099de7da19b356.zip |
[polly][Support] Un-break polly tests
Previously, the polly unit tests were stuck in a infinite loop.
There was an edge case in StringRef::count() introduced by 9f6b13e5cce96066d7262d224c971d93c2724795, where an empty 'Str' would cause the function to never exit.
Also fixed usage in polly.
Diffstat (limited to 'polly/lib')
-rw-r--r-- | polly/lib/Analysis/ScopDetection.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/polly/lib/Analysis/ScopDetection.cpp b/polly/lib/Analysis/ScopDetection.cpp index cf6ba75648d..59176d2a0ae 100644 --- a/polly/lib/Analysis/ScopDetection.cpp +++ b/polly/lib/Analysis/ScopDetection.cpp @@ -1653,7 +1653,8 @@ bool ScopDetection::isValidRegion(DetectionContext &Context) const { CurRegion.getExit(), DbgLoc); } - if (!CurRegion.getEntry()->getName().count(OnlyRegion)) { + if (!OnlyRegion.empty() && + !CurRegion.getEntry()->getName().count(OnlyRegion)) { LLVM_DEBUG({ dbgs() << "Region entry does not match -polly-region-only"; dbgs() << "\n"; |