[PATCH] D32739: [Polly] JSONImporter misses checks whether the data it imports makes sense.

Bonfante Nicolas via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 11 00:46:12 PDT 2017


niosega added a comment.

I am currently working on adding checks for importAccess and cleaning the test cases (explain what they are doing, better naming .. )



================
Comment at: lib/Exchange/JSONExporter.cpp:605-608
+  // Check if key 'arrays' is present.
   Json::Value Arrays = JScop["arrays"];
-
-  if (Arrays.size() == 0)
+  if (Arrays.size() == 0) {
+    errs() << "JScop file has no key named 'arrays'.\n";
----------------
Meinersbur wrote:
> A SCoP doesn't strictly need arrays.
> 
> So far none of your tests has an `arrays` key, meaning all of them would fail if there is no error before.
There was already an if to check whether the Json contains a arrays key or not. I have just added an output to inform the user. Should I remove my output ?


https://reviews.llvm.org/D32739





More information about the llvm-commits mailing list