File tree Expand file tree Collapse file tree 1 file changed +5
-11
lines changed
include/swift/SILOptimizer/Utils Expand file tree Collapse file tree 1 file changed +5
-11
lines changed Original file line number Diff line number Diff line change @@ -345,23 +345,17 @@ struct LoadOperation {
345
345
346
346
explicit operator bool () const { return !value.isNull (); }
347
347
348
- SingleValueInstruction *operator * () const {
348
+ SingleValueInstruction *getLoadInst () const {
349
349
if (value.is <LoadInst *>())
350
350
return value.get <LoadInst *>();
351
351
return value.get <LoadBorrowInst *>();
352
352
}
353
353
354
- const SingleValueInstruction *operator ->() const {
355
- if (value.is <LoadInst *>())
356
- return value.get <LoadInst *>();
357
- return value.get <LoadBorrowInst *>();
358
- }
354
+ SingleValueInstruction *operator *() const { return getLoadInst (); }
359
355
360
- SingleValueInstruction *operator ->() {
361
- if (value.is <LoadInst *>())
362
- return value.get <LoadInst *>();
363
- return value.get <LoadBorrowInst *>();
364
- }
356
+ const SingleValueInstruction *operator ->() const { return getLoadInst (); }
357
+
358
+ SingleValueInstruction *operator ->() { return getLoadInst (); }
365
359
366
360
SILValue getOperand () const {
367
361
if (value.is <LoadInst *>())
You can’t perform that action at this time.
0 commit comments