//
// 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.
//
//===----------------------------------------------------------------------===//
//
#include <vector>
#include <iosfwd>
+#include <cassert>
namespace llvm {
/// MBBs - The vector of basic blocks from which to create the jump table.
std::vector<MachineBasicBlock*> MBBs;
- MachineJumpTableEntry(const std::vector<MachineBasicBlock*> &M) : MBBs(M) {}
+ explicit MachineJumpTableEntry(const std::vector<MachineBasicBlock*> &M)
+ : MBBs(M) {}
};
class MachineJumpTableInfo {
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;
/// 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.
///