diff options
| author | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2016-07-27 18:45:18 +0000 |
|---|---|---|
| committer | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2016-07-27 18:45:18 +0000 |
| commit | 1723821d178189bca27926ff02ae0032b51abb1b (patch) | |
| tree | 0a003ccb9a69805a7be73ed1ce31943b93dd31d8 | |
| parent | 22039e68582aa62fba4c9d6da08462b34d3996a9 (diff) | |
| download | bcm5719-llvm-1723821d178189bca27926ff02ae0032b51abb1b.tar.gz bcm5719-llvm-1723821d178189bca27926ff02ae0032b51abb1b.zip | |
CodeGen: Make iterator-to-pointer conversion explicit, NFC
Remove the implicit conversion from MachineInstrBundleIterator to
MachineInstr*, leaving behind an explicit conversion.
I *think* this is the last ilist_iterator-related implicit conversion to
ilist_node subclass. If I'm right, I can finally dig in and fix the UB
in ilist that these conversions were relying on.
Note that the implicit users of this conversion have already been
removed. If you have out-of-tree code that doesn't update, you might be
able to buy some time by temporarily reverting this commit.
llvm-svn: 276902
| -rw-r--r-- | llvm/include/llvm/CodeGen/MachineInstrBundleIterator.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/include/llvm/CodeGen/MachineInstrBundleIterator.h b/llvm/include/llvm/CodeGen/MachineInstrBundleIterator.h index 45a9a188f90..c24fee8493e 100644 --- a/llvm/include/llvm/CodeGen/MachineInstrBundleIterator.h +++ b/llvm/include/llvm/CodeGen/MachineInstrBundleIterator.h @@ -50,8 +50,8 @@ public: Ty &operator*() const { return *MII; } Ty *operator->() const { return &operator*(); } - // FIXME: This conversion should be explicit. - operator Ty *() const { return MII.getNodePtrUnchecked(); } + // FIXME: This should be implemented as "return &operator*()" (or removed). + explicit operator Ty *() const { return MII.getNodePtrUnchecked(); } bool operator==(const MachineInstrBundleIterator &X) const { return MII == X.MII; |

