1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-22 04:22:57 +02:00

[NFC] Add missing consts into memoryaccess_def_iterator

llvm-svn: 364247
This commit is contained in:
Vitaly Buka 2019-06-24 22:42:53 +00:00
parent 7dcf742952
commit 57f0d515a8

View File

@ -1106,15 +1106,15 @@ public:
assert(Access && "Tried to access past the end of our iterator");
// Go to the first argument for phis, and the defining access for everything
// else.
if (MemoryPhi *MP = dyn_cast<MemoryPhi>(Access))
if (const MemoryPhi *MP = dyn_cast<MemoryPhi>(Access))
return MP->getIncomingValue(ArgNo);
return cast<MemoryUseOrDef>(Access)->getDefiningAccess();
}
using BaseT::operator++;
memoryaccess_def_iterator &operator++() {
memoryaccess_def_iterator_base &operator++() {
assert(Access && "Hit end of iterator");
if (MemoryPhi *MP = dyn_cast<MemoryPhi>(Access)) {
if (const MemoryPhi *MP = dyn_cast<MemoryPhi>(Access)) {
if (++ArgNo >= MP->getNumIncomingValues()) {
ArgNo = 0;
Access = nullptr;