diff options
author | Chris Lattner <sabre@nondot.org> | 2006-10-28 18:00:05 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2006-10-28 18:00:05 +0000 |
commit | 5bd0c00b8074200184a067331f2be7e16a3a9f61 (patch) | |
tree | 60e08098daa01fc41a3d361f8701cc43fe8d0181 /include/llvm/CodeGen | |
parent | ef13982aa7f3e57e82cd48370e79033dff0da295 (diff) | |
download | llvm-5bd0c00b8074200184a067331f2be7e16a3a9f61.tar.gz llvm-5bd0c00b8074200184a067331f2be7e16a3a9f61.tar.bz2 llvm-5bd0c00b8074200184a067331f2be7e16a3a9f61.tar.xz |
determine whether a change was made
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31265 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen')
-rw-r--r-- | include/llvm/CodeGen/MachineJumpTableInfo.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/include/llvm/CodeGen/MachineJumpTableInfo.h b/include/llvm/CodeGen/MachineJumpTableInfo.h index 7f6c965d7c..adf33488c1 100644 --- a/include/llvm/CodeGen/MachineJumpTableInfo.h +++ b/include/llvm/CodeGen/MachineJumpTableInfo.h @@ -57,13 +57,17 @@ public: /// ReplaceMBBInJumpTables - If Old is the target of any jump tables, update /// the jump tables to branch to New instead. - void ReplaceMBBInJumpTables(MachineBasicBlock *Old, MachineBasicBlock *New) { + bool ReplaceMBBInJumpTables(MachineBasicBlock *Old, MachineBasicBlock *New) { + bool MadeChange = false; for (unsigned i = 0, e = JumpTables.size(); i != e; ++i) { MachineJumpTableEntry &JTE = JumpTables[i]; for (unsigned j = 0, e = JTE.MBBs.size(); j != e; ++j) - if (JTE.MBBs[j] == Old) + if (JTE.MBBs[j] == Old) { JTE.MBBs[j] = New; + MadeChange = true; + } } + return MadeChange; } /// getEntrySize - returns the size of an individual field in a jump table |