From: Dan Gohman Date: Mon, 30 Nov 2015 18:42:08 +0000 (+0000) Subject: [WebAssembly] Fix a few minor compiler warnings. NFC. X-Git-Url: http://plrg.eecs.uci.edu/git/?p=oota-llvm.git;a=commitdiff_plain;h=8dc6e6c3bb8901096bf31a5aaca5223b5bbf2a4f [WebAssembly] Fix a few minor compiler warnings. NFC. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254311 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp b/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp index 72891042216..dbd00bc10b1 100644 --- a/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp +++ b/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp @@ -162,9 +162,9 @@ static void SortBlocks(MachineFunction &MF, const MachineLoopInfo &MLI) { SmallPtrSet Visited; SmallVector 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(); @@ -220,7 +220,7 @@ static void SortBlocks(MachineFunction &MF, const MachineLoopInfo &MLI) { #endif } -static int GetLoopDepth(const MachineLoop *Loop) { +static unsigned GetLoopDepth(const MachineLoop *Loop) { return Loop ? Loop->getLoopDepth() : 0; } @@ -249,12 +249,12 @@ static void PlaceBlockMarkers(MachineBasicBlock &MBB, 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. - 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();