diff --git a/polly/lib/Exchange/JSONExporter.cpp b/polly/lib/Exchange/JSONExporter.cpp index 423768bdeed4..0a744901e2b0 100644 --- a/polly/lib/Exchange/JSONExporter.cpp +++ b/polly/lib/Exchange/JSONExporter.cpp @@ -723,9 +723,10 @@ static bool importScop(Scop &S, const Dependences &D, const DataLayout &DL, Expected ParseResult = json::parse(result.get().get()->getBuffer()); - if (!ParseResult) { - ParseResult.takeError(); + if (Error E = ParseResult.takeError()) { errs() << "JSCoP file could not be parsed\n"; + errs() << E << "\n"; + consumeError(std::move(E)); return false; } json::Object &jscop = *ParseResult.get().getAsObject();