[llvm] r290680 - [NewGVN] replace typedefs with usings
Sanjoy Das via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 28 14:05:29 PST 2016
Hi Piotr,
Is there a tangible benefit to doing this replacement?
I'd rather not have the codebase be a mix of typedefs and using
directives. If one is more preferable than the other for some reason
then we should note that in the coding style and slowly migrate the
whole codebase towards that.
-- Sanjoy
On Wed, Dec 28, 2016 at 11:29 AM, Piotr Padlewski via llvm-commits
<llvm-commits at lists.llvm.org> wrote:
> Author: prazek
> Date: Wed Dec 28 13:29:26 2016
> New Revision: 290680
>
> URL: http://llvm.org/viewvc/llvm-project?rev=290680&view=rev
> Log:
> [NewGVN] replace typedefs with usings
>
> Modified:
> llvm/trunk/lib/Transforms/Scalar/NewGVN.cpp
>
> Modified: llvm/trunk/lib/Transforms/Scalar/NewGVN.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/NewGVN.cpp?rev=290680&r1=290679&r2=290680&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Transforms/Scalar/NewGVN.cpp (original)
> +++ llvm/trunk/lib/Transforms/Scalar/NewGVN.cpp Wed Dec 28 13:29:26 2016
> @@ -120,7 +120,7 @@ PHIExpression::~PHIExpression() = defaul
> // propagation and reassociation of values.
> //
> struct CongruenceClass {
> - typedef SmallPtrSet<Value *, 4> MemberSet;
> + using MemberSet = SmallPtrSet<Value *, 4>;
> unsigned ID;
> // Representative leader.
> Value *RepLeader = nullptr;
> @@ -192,7 +192,7 @@ class NewGVN : public FunctionPass {
> DenseMap<MemoryAccess *, MemoryAccess *> MemoryAccessEquiv;
>
> // Expression to class mapping.
> - typedef DenseMap<const Expression *, CongruenceClass *> ExpressionClassMap;
> + using ExpressionClassMap = DenseMap<const Expression *, CongruenceClass *>;
> ExpressionClassMap ExpressionToClass;
>
> // Which values have changed as a result of leader changes.
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
--
Sanjoy Das
http://playingwithpointers.com
More information about the llvm-commits
mailing list