Check if access relation is available before printing

Currently MemoryAccesses are not printed before the access relations
are available, but might be printed during gdb sessions.

llvm-svn: 255464
This commit is contained in:
Michael Kruse 2015-12-13 18:47:02 +00:00
parent ccec6e4d84
commit e3ec4563b2
1 changed files with 2 additions and 1 deletions

View File

@ -747,7 +747,8 @@ void MemoryAccess::print(raw_ostream &OS) const {
}
OS << "[Reduction Type: " << getReductionType() << "] ";
OS << "[Scalar: " << isImplicit() << "]\n";
OS.indent(16) << getOriginalAccessRelationStr() << ";\n";
if (AccessRelation)
OS.indent(16) << getOriginalAccessRelationStr() << ";\n";
if (hasNewAccessRelation())
OS.indent(11) << "new: " << getNewAccessRelationStr() << ";\n";
}