summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Utils/SimplifyCFG.cpp
diff options
context:
space:
mode:
authorMatthias Braun <matze@braunis.de>2018-10-31 00:23:23 +0000
committerMatthias Braun <matze@braunis.de>2018-10-31 00:23:23 +0000
commit9fd397b423ba442808957e65e3ad25a07cd203e4 (patch)
tree7145d100b0a62cf322449093f203eb7c9e80c3b8 /llvm/lib/Transforms/Utils/SimplifyCFG.cpp
parentac0ba8c52493012daabb73512a5739394c37a2dc (diff)
downloadbcm5719-llvm-9fd397b423ba442808957e65e3ad25a07cd203e4.tar.gz
bcm5719-llvm-9fd397b423ba442808957e65e3ad25a07cd203e4.zip
ADT/STLExtras: Introduce llvm::empty; NFC
This is modeled after C++17 std::empty(). Differential Revision: https://reviews.llvm.org/D53909 llvm-svn: 345679
Diffstat (limited to 'llvm/lib/Transforms/Utils/SimplifyCFG.cpp')
-rw-r--r--llvm/lib/Transforms/Utils/SimplifyCFG.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Utils/SimplifyCFG.cpp b/llvm/lib/Transforms/Utils/SimplifyCFG.cpp
index dd0d441a4da..849f9ee1d19 100644
--- a/llvm/lib/Transforms/Utils/SimplifyCFG.cpp
+++ b/llvm/lib/Transforms/Utils/SimplifyCFG.cpp
@@ -5260,7 +5260,7 @@ static bool SwitchToLookupTable(SwitchInst *SI, IRBuilder<> &Builder,
// Figure out the corresponding result for each case value and phi node in the
// common destination, as well as the min and max case values.
- assert(SI->case_begin() != SI->case_end());
+ assert(!empty(SI->cases()));
SwitchInst::CaseIt CI = SI->case_begin();
ConstantInt *MinCaseVal = CI->getCaseValue();
ConstantInt *MaxCaseVal = CI->getCaseValue();
OpenPOWER on IntegriCloud