[polly] r244758 - Make sure we increment the reference counter when passing out the isl_pw_aff
Tobias Grosser via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 12 08:45:41 PDT 2015
Author: grosser
Date: Wed Aug 12 10:45:41 2015
New Revision: 244758
URL: http://llvm.org/viewvc/llvm-project?rev=244758&view=rev
Log:
Make sure we increment the reference counter when passing out the isl_pw_aff
Modified:
polly/trunk/include/polly/ScopInfo.h
Modified: polly/trunk/include/polly/ScopInfo.h
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/include/polly/ScopInfo.h?rev=244758&r1=244757&r2=244758&view=diff
==============================================================================
--- polly/trunk/include/polly/ScopInfo.h (original)
+++ polly/trunk/include/polly/ScopInfo.h Wed Aug 12 10:45:41 2015
@@ -25,6 +25,7 @@
#include "llvm/ADT/MapVector.h"
#include "llvm/Analysis/RegionPass.h"
+#include "isl/aff.h"
#include "isl/ctx.h"
#include <forward_list>
@@ -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.
More information about the llvm-commits
mailing list