diff options
author | Aaron Ballman <aaron@aaronballman.com> | 2014-09-12 12:42:15 +0000 |
---|---|---|
committer | Aaron Ballman <aaron@aaronballman.com> | 2014-09-12 12:42:15 +0000 |
commit | 6afd1eb322bf67e13b35d22ccaebf1fbbab8c55f (patch) | |
tree | 0b20dd3a0d20aa88545240c1da3f8f959230166e /clang/lib/Analysis | |
parent | c287f4a3581925841608db2b061669c66e957329 (diff) | |
download | bcm5719-llvm-6afd1eb322bf67e13b35d22ccaebf1fbbab8c55f.tar.gz bcm5719-llvm-6afd1eb322bf67e13b35d22ccaebf1fbbab8c55f.zip |
Fixing a -Woverflow warning from GCC by using a more natural datatype for this operation. NFC.
llvm-svn: 217670
Diffstat (limited to 'clang/lib/Analysis')
-rw-r--r-- | clang/lib/Analysis/ThreadSafetyTIL.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/Analysis/ThreadSafetyTIL.cpp b/clang/lib/Analysis/ThreadSafetyTIL.cpp index 9374733e8a3..ebe374ea609 100644 --- a/clang/lib/Analysis/ThreadSafetyTIL.cpp +++ b/clang/lib/Analysis/ThreadSafetyTIL.cpp @@ -170,7 +170,7 @@ int BasicBlock::renumberInstrs(int ID) { // block, and ID should be the total number of blocks. int BasicBlock::topologicalSort(SimpleArray<BasicBlock*>& Blocks, int ID) { if (Visited) return ID; - Visited = 1; + Visited = true; for (auto *Block : successors()) ID = Block->topologicalSort(Blocks, ID); // set ID and update block array in place. @@ -195,7 +195,7 @@ int BasicBlock::topologicalFinalSort(SimpleArray<BasicBlock*>& Blocks, int ID) { // Visited is assumed to have been set by the topologicalSort. This pass // assumes !Visited means that we've visited this node before. if (!Visited) return ID; - Visited = 0; + Visited = false; if (DominatorNode.Parent) ID = DominatorNode.Parent->topologicalFinalSort(Blocks, ID); for (auto *Pred : Predecessors) |