| Index: src/IceGlobalContext.cpp
|
| diff --git a/src/IceGlobalContext.cpp b/src/IceGlobalContext.cpp
|
| index 7b7183d5540852496e2ff9a1b0b256a9635aa61f..c7497da83df5a8978fdcdbfdd1fba6045acb1c70 100644
|
| --- a/src/IceGlobalContext.cpp
|
| +++ b/src/IceGlobalContext.cpp
|
| @@ -722,10 +722,8 @@ GlobalContext::~GlobalContext() {
|
| llvm::DeleteContainerPointers(AllThreadContexts);
|
| LockedPtr<DestructorArray> Dtors = getDestructors();
|
| // Destructors are invoked in the opposite object construction order.
|
| - for (auto DtorIter = Dtors->crbegin(); DtorIter != Dtors->crend();
|
| - ++DtorIter) {
|
| - (*DtorIter)();
|
| - }
|
| + for (const auto &Dtor : reverse_range(*Dtors))
|
| + Dtor();
|
| }
|
|
|
| // TODO(stichnot): Consider adding thread-local caches of constant pool entries
|
|
|