Page MenuHomePhabricator

[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.

Diff Detail

Repository
rL LLVM

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 ↗(On Diff #110569)

[Style] Make static?

391–392 ↗(On Diff #110569)

unrelated?

434–435 ↗(On Diff #110569)

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.