[WebAssembly] Fix a few minor compiler warnings. NFC.
authorDan Gohman <dan433584@gmail.com>
Mon, 30 Nov 2015 18:42:08 +0000 (18:42 +0000)
committerDan Gohman <dan433584@gmail.com>
Mon, 30 Nov 2015 18:42:08 +0000 (18:42 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254311 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp

index 72891042216652f796b535cc10b8e05a543010ac..dbd00bc10b1ced0450f5e58f1812f1c383b68b8d 100644 (file)
@@ -162,9 +162,9 @@ static void SortBlocks(MachineFunction &MF, const MachineLoopInfo &MLI) {
   SmallPtrSet<MachineBasicBlock *, 16> Visited;
   SmallVector<POStackEntry, 16> Stack;
 
   SmallPtrSet<MachineBasicBlock *, 16> Visited;
   SmallVector<POStackEntry, 16> Stack;
 
-  MachineBasicBlock *Entry = &*MF.begin();
-  Visited.insert(Entry);
-  Stack.push_back(POStackEntry(Entry, MF, MLI));
+  MachineBasicBlock *EntryBlock = &*MF.begin();
+  Visited.insert(EntryBlock);
+  Stack.push_back(POStackEntry(EntryBlock, MF, MLI));
 
   for (;;) {
     POStackEntry &Entry = Stack.back();
 
   for (;;) {
     POStackEntry &Entry = Stack.back();
@@ -220,7 +220,7 @@ static void SortBlocks(MachineFunction &MF, const MachineLoopInfo &MLI) {
 #endif
 }
 
 #endif
 }
 
-static int GetLoopDepth(const MachineLoop *Loop) {
+static unsigned GetLoopDepth(const MachineLoop *Loop) {
   return Loop ? Loop->getLoopDepth() : 0;
 }
 
   return Loop ? Loop->getLoopDepth() : 0;
 }
 
@@ -249,12 +249,12 @@ static void PlaceBlockMarkers(MachineBasicBlock &MBB,
 
   MachineBasicBlock::iterator InsertPos;
   MachineLoop *HeaderLoop = MLI.getLoopFor(Header);
 
   MachineBasicBlock::iterator InsertPos;
   MachineLoop *HeaderLoop = MLI.getLoopFor(Header);
-  int MBBLoopDepth = GetLoopDepth(MLI.getLoopFor(&MBB));
-  int HeaderLoopDepth = GetLoopDepth(HeaderLoop);
+  unsigned MBBLoopDepth = GetLoopDepth(MLI.getLoopFor(&MBB));
+  unsigned HeaderLoopDepth = GetLoopDepth(HeaderLoop);
   if (HeaderLoopDepth > MBBLoopDepth) {
     // The nearest common dominating point is more deeply nested. Insert the
     // BLOCK just above the LOOP.
   if (HeaderLoopDepth > MBBLoopDepth) {
     // The nearest common dominating point is more deeply nested. Insert the
     // BLOCK just above the LOOP.
-    for (int i = 0; i < HeaderLoopDepth - 1 - MBBLoopDepth; ++i)
+    for (unsigned i = 0; i < HeaderLoopDepth - 1 - MBBLoopDepth; ++i)
       HeaderLoop = HeaderLoop->getParentLoop();
     Header = HeaderLoop->getHeader();
     InsertPos = Header->begin();
       HeaderLoop = HeaderLoop->getParentLoop();
     Header = HeaderLoop->getHeader();
     InsertPos = Header->begin();