Fix a couple of -Wsign-compare warnings introduced in r217556

llvm-svn: 217569
This commit is contained in:
Justin Bogner 2014-09-11 03:37:42 +00:00
parent a726ef12a4
commit 560cbf506b
1 changed files with 2 additions and 3 deletions

View File

@ -200,7 +200,7 @@ int BasicBlock::topologicalFinalSort(SimpleArray<BasicBlock*>& Blocks, int ID) {
ID = DominatorNode.Parent->topologicalFinalSort(Blocks, ID); ID = DominatorNode.Parent->topologicalFinalSort(Blocks, ID);
for (auto *Pred : Predecessors) for (auto *Pred : Predecessors)
ID = Pred->topologicalFinalSort(Blocks, ID); ID = Pred->topologicalFinalSort(Blocks, ID);
assert(ID < Blocks.size()); assert(static_cast<size_t>(ID) < Blocks.size());
BlockID = ID++; BlockID = ID++;
Blocks[BlockID] = this; Blocks[BlockID] = this;
return ID; return ID;
@ -314,7 +314,7 @@ void SCFG::computeNormalForm() {
// Once dominators have been computed, the final sort may be performed. // Once dominators have been computed, the final sort may be performed.
int NumBlocks = Exit->topologicalFinalSort(Blocks, 0); int NumBlocks = Exit->topologicalFinalSort(Blocks, 0);
assert(NumBlocks == Blocks.size()); assert(static_cast<size_t>(NumBlocks) == Blocks.size());
(void) NumBlocks; (void) NumBlocks;
// Renumber the instructions now that we have a final sort. // Renumber the instructions now that we have a final sort.
@ -341,4 +341,3 @@ void SCFG::computeNormalForm() {
} // end namespace til } // end namespace til
} // end namespace threadSafety } // end namespace threadSafety
} // end namespace clang } // end namespace clang