aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Transforms/Scalar
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Transforms/Scalar')
-rw-r--r--lib/Transforms/Scalar/LICM.cpp2
-rw-r--r--lib/Transforms/Scalar/SCCP.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/Transforms/Scalar/LICM.cpp b/lib/Transforms/Scalar/LICM.cpp
index e795aa9c0c..8a094aa967 100644
--- a/lib/Transforms/Scalar/LICM.cpp
+++ b/lib/Transforms/Scalar/LICM.cpp
@@ -786,7 +786,7 @@ void LICM::FindPromotableValuesInLoop(
// volatile loads or stores.
if (!AS.isForwardingAliasSet() && AS.isMod() && AS.isMustAlias() &&
!AS.isVolatile() && CurLoop->isLoopInvariant(AS.begin()->first)) {
- assert(AS.begin() != AS.end() &&
+ assert(!AS.empty() &&
"Must alias set should have at least one pointer element in it!");
Value *V = AS.begin()->first;
diff --git a/lib/Transforms/Scalar/SCCP.cpp b/lib/Transforms/Scalar/SCCP.cpp
index dacaad01a3..d236039332 100644
--- a/lib/Transforms/Scalar/SCCP.cpp
+++ b/lib/Transforms/Scalar/SCCP.cpp
@@ -1574,7 +1574,7 @@ bool IPSCCP::runOnModule(Module &M) {
for (unsigned i = 0, e = TI->getNumSuccessors(); i != e; ++i) {
BasicBlock *Succ = TI->getSuccessor(i);
- if (Succ->begin() != Succ->end() && isa<PHINode>(Succ->begin()))
+ if (!Succ->empty() && isa<PHINode>(Succ->begin()))
TI->getSuccessor(i)->removePredecessor(BB);
}
if (!TI->use_empty())