diff options
-rw-r--r-- | polly/lib/Exchange/JSONExporter.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/polly/lib/Exchange/JSONExporter.cpp b/polly/lib/Exchange/JSONExporter.cpp index 423768bdeed..0a744901e2b 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<json::Value> 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(); |