[polly] r302715 - [DeLICM] Avoid compiler warning. NFC.

Michael Kruse via llvm-commits llvm-commits at lists.llvm.org
Wed May 10 12:58:52 PDT 2017


Author: meinersbur
Date: Wed May 10 14:58:52 2017
New Revision: 302715

URL: http://llvm.org/viewvc/llvm-project?rev=302715&view=rev
Log:
[DeLICM] Avoid compiler warning. NFC.

gcc 5.4 warns about using a C-style case to case away a const.
Use case a const_cast instead.

Modified:
    polly/trunk/lib/Transform/DeLICM.cpp

Modified: polly/trunk/lib/Transform/DeLICM.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Transform/DeLICM.cpp?rev=302715&r1=302714&r2=302715&view=diff
==============================================================================
--- polly/trunk/lib/Transform/DeLICM.cpp (original)
+++ polly/trunk/lib/Transform/DeLICM.cpp Wed May 10 14:58:52 2017
@@ -1258,7 +1258,7 @@ protected:
       // TODO: Add only the induction variables referenced in SCEVAddRecExpr
       // expressions, not just all of them.
       auto ScevId = give(isl_id_alloc(UseDomainSpace.get_ctx().get(), nullptr,
-                                      (void *)ScevExpr));
+                                      const_cast<SCEV *>(ScevExpr)));
       auto ScevSpace =
           give(isl_space_drop_dims(UseDomainSpace.copy(), isl_dim_set, 0, 0));
       ScevSpace = give(




More information about the llvm-commits mailing list