This is an archive of the discontinued LLVM Phabricator instance.

[JSON][PM] Port json import/export over to new pm
ClosedPublic

Authored by philip.pfaffe on Aug 10 2017, 6:28 AM.

Details

Summary

I pulled out all functionality into static functions, and use those both
in the legacy passes and in the new ones. There is one functional
change: Before, if we fail to parse a jscop file, this will be reported
as an error and importing is aborted. However, this isn't actually
strong enough, since although the import is aborted, the scop has
already been modified and is very likely broken. Instead, make this a
hard failure and throw an LLVM error. This new behaviour requires small
changes to the tests for the legacy pass, namely using not.

Event Timeline

philip.pfaffe created this revision.Aug 10 2017, 6:28 AM
Meinersbur accepted this revision.Aug 10 2017, 6:42 AM

There are multiple changes in this patch:

  • Fixing some broken regression tests
  • Add import/export to new PM
  • Hard error on jscop import fail (cool!)
  • Make some private methods of JSONImporter free functions.

I'd wish for a clearer commit message about these changes, if not even committing separately.

lib/Exchange/JSONExporter.cpp
212

[Style] Make static?

391–392

unrelated?

434–435

unrelated?

This revision is now accepted and ready to land.Aug 10 2017, 6:42 AM
This revision was automatically updated to reflect the committed changes.