[DeLICM] Avoid compiler warning. NFC.
authorMichael Kruse <llvm@meinersbur.de>
Wed, 10 May 2017 19:58:52 +0000 (19:58 +0000)
committerMichael Kruse <llvm@meinersbur.de>
Wed, 10 May 2017 19:58:52 +0000 (19:58 +0000)
gcc 5.4 warns about using a C-style case to case away a const.
Use case a const_cast instead.

llvm-svn: 302715

polly/lib/Transform/DeLICM.cpp

index 56e74f0..72abb08 100644 (file)
@@ -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(