From 72e8f5999e93cbed050b4ca6a017296539b1094b Mon Sep 17 00:00:00 2001 From: Tobias Grosser Date: Wed, 12 Aug 2015 15:45:41 +0000 Subject: [PATCH] Make sure we increment the reference counter when passing out the isl_pw_aff llvm-svn: 244758 --- polly/include/polly/ScopInfo.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/polly/include/polly/ScopInfo.h b/polly/include/polly/ScopInfo.h index ffc2b32..cad28be 100644 --- a/polly/include/polly/ScopInfo.h +++ b/polly/include/polly/ScopInfo.h @@ -25,6 +25,7 @@ #include "llvm/ADT/MapVector.h" #include "llvm/Analysis/RegionPass.h" +#include "isl/aff.h" #include "isl/ctx.h" #include @@ -101,9 +102,9 @@ public: } /// @brief Return the size of dimension @p dim as isl_pw_aff. - const isl_pw_aff *getDimensionSizePw(unsigned dim) const { + __isl_give isl_pw_aff *getDimensionSizePw(unsigned dim) const { assert(dim < getNumberOfDimensions() && "Invalid dimension"); - return DimensionSizesPw[dim - 1]; + return isl_pw_aff_copy(DimensionSizesPw[dim - 1]); } /// @brief Get the type of the elements stored in this array. -- 2.7.4