Address Joseph's review comments.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241890 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
David Majnemer
2015-07-10 07:01:03 +00:00
parent a5d05b7711
commit 2431442e67
5 changed files with 92 additions and 13 deletions

View File

@@ -3805,12 +3805,12 @@ public:
void setUnwindDest(BasicBlock *B) { Op<-1>() = reinterpret_cast<Value *>(B); }
BasicBlock *getSuccessor(unsigned i) const {
assert(i < 2 && "Successor # out of range for invoke!");
assert(i < 2 && "Successor # out of range for catchblock!");
return i == 0 ? getNormalDest() : getUnwindDest();
}
void setSuccessor(unsigned idx, BasicBlock *NewSucc) {
assert(idx < 2 && "Successor # out of range for invoke!");
assert(idx < 2 && "Successor # out of range for catchblock!");
*(&Op<-2>() + idx) = reinterpret_cast<Value *>(NewSucc);
}