Make MemRefType::getNumDynamicDims const.

PiperOrigin-RevId: 206834416
This commit is contained in:
MLIR Team 2018-07-31 15:04:40 -07:00 committed by jpienaar
parent cdefcc86e5
commit 6cfb09409f
2 changed files with 2 additions and 2 deletions

View File

@ -347,7 +347,7 @@ public:
unsigned getMemorySpace() const { return memorySpace; }
/// Returns the number of dimensions with dynamic size.
unsigned getNumDynamicDims();
unsigned getNumDynamicDims() const;
static bool classof(const Type *type) {
return type->getKind() == Kind::MemRef;

View File

@ -62,7 +62,7 @@ ArrayRef<AffineMap*> MemRefType::getAffineMaps() const {
return ArrayRef<AffineMap*>(affineMapList, numAffineMaps);
}
unsigned MemRefType::getNumDynamicDims() {
unsigned MemRefType::getNumDynamicDims() const {
unsigned numDynamicDims = 0;
for (int dimSize : getShape()) {
if (dimSize < 0)