SuccessChanges

Summary

  1. [lld/mac] llvm style fix: no else after return (details)
  2. [STLExtras] Use return type from operator* of the wrapped iter. (details)
Commit 47991a15d1925cba4687c5077cc9c81c8fcd00bd by thakis
[lld/mac] llvm style fix: no else after return
The file was modifiedlld/MachO/Writer.cpp
Commit c701f85c45589091f0d232fc2bc0bc390a6ab684 by flo
[STLExtras] Use return type from operator* of the wrapped iter.

Currently make_early_inc_range cannot be used with iterators with
operator* implementations that do not return a reference.

Most notably in the LLVM codebase, this means the User iterator ranges
cannot be used with make_early_inc_range, which slightly simplifies
iterating over ranges while elements are removed.

Instead of directly using BaseT::reference as return type of operator*,
this patch uses decltype to get the actual return type of the operator*
implementation in WrappedIteratorT.

This patch also updates a few places to use make use of
make_early_inc_range.

Reviewed By: dblaikie

Differential Revision: https://reviews.llvm.org/D93992
The file was modifiedllvm/lib/Transforms/InstCombine/InstructionCombining.cpp
The file was modifiedllvm/lib/Analysis/MemoryBuiltins.cpp
The file was modifiedllvm/lib/IR/AutoUpgrade.cpp
The file was modifiedllvm/lib/Transforms/IPO/ArgumentPromotion.cpp
The file was modifiedllvm/include/llvm/ADT/STLExtras.h
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
The file was modifiedllvm/lib/Transforms/Utils/PromoteMemoryToRegister.cpp
The file was modifiedllvm/unittests/ADT/STLExtrasTest.cpp
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineCompares.cpp