X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=include%2Fllvm%2FCodeGen%2FMachineJumpTableInfo.h;h=e0acb27f46b5320de97174c3adb62d7d6e7452cd;hb=4b84086e89d86fb16f562166d9fea8df37db6be7;hp=8064fa431c085c1be4effaa3a2edc87419e8fb2f;hpb=a80b7833e36366bc85ed4ee08bee4c874c054d43;p=oota-llvm.git diff --git a/include/llvm/CodeGen/MachineJumpTableInfo.h b/include/llvm/CodeGen/MachineJumpTableInfo.h index 8064fa431c0..e0acb27f46b 100644 --- a/include/llvm/CodeGen/MachineJumpTableInfo.h +++ b/include/llvm/CodeGen/MachineJumpTableInfo.h @@ -2,8 +2,8 @@ // // The LLVM Compiler Infrastructure // -// This file was developed by Nate Begeman and is distributed under the -// University of Illinois Open Source License. See LICENSE.TXT for details. +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // @@ -22,6 +22,7 @@ #include #include +#include namespace llvm { @@ -34,7 +35,8 @@ struct MachineJumpTableEntry { /// MBBs - The vector of basic blocks from which to create the jump table. std::vector MBBs; - MachineJumpTableEntry(const std::vector &M) : MBBs(M) {} + explicit MachineJumpTableEntry(const std::vector &M) + : MBBs(M) {} }; class MachineJumpTableInfo { @@ -68,9 +70,9 @@ public: bool ReplaceMBBInJumpTables(MachineBasicBlock *Old, MachineBasicBlock *New) { assert(Old != New && "Not making a change?"); bool MadeChange = false; - for (unsigned i = 0, e = JumpTables.size(); i != e; ++i) { + for (size_t i = 0, e = JumpTables.size(); i != e; ++i) { MachineJumpTableEntry &JTE = JumpTables[i]; - for (unsigned j = 0, e = JTE.MBBs.size(); j != e; ++j) + for (size_t j = 0, e = JTE.MBBs.size(); j != e; ++j) if (JTE.MBBs[j] == Old) { JTE.MBBs[j] = New; MadeChange = true; @@ -90,6 +92,7 @@ public: /// jump tables. Implemented in MachineFunction.cpp /// void print(std::ostream &OS) const; + void print(std::ostream *OS) const { if (OS) print(*OS); } /// dump - Call print(std::cerr) to be called from the debugger. ///