Chromium Code Reviews| Index: src/IceInst.h |
| diff --git a/src/IceInst.h b/src/IceInst.h |
| index 36b8810a82bcbf0390e66283285f6cde91763239..97b7f747264d7d4bf53791f919e930eec1cb312c 100644 |
| --- a/src/IceInst.h |
| +++ b/src/IceInst.h |
| @@ -108,6 +108,10 @@ public: |
| assert(I < getSrcSize()); |
| return Srcs[I]; |
| } |
| + void replaceSource(SizeT Index, Operand *Replacement) { |
| + assert(Index < NumSrcs); |
|
Jim Stichnoth
2016/05/19 01:35:50
For safety, add a couple more asserts:
assert(!i
|
| + Srcs[Index] = Replacement; |
| + } |
| bool isLastUse(const Operand *Src) const; |
| void spliceLivenessInfo(Inst *OrigInst, Inst *SpliceAssn); |