Fix LLVM backend compilation.
Change-Id: I326cf2531a600fd09b888e9955052b29624ccdbe Reviewed-by: Lars Knoll <lars.knoll@digia.com>
This commit is contained in:
parent
39cb093255
commit
c9c2b0c541
9
main.cpp
9
main.cpp
|
@ -169,15 +169,18 @@ int evaluateCompiledCode(const QStringList &files)
|
||||||
globalObject->setProperty(ctx, vm.identifier(QStringLiteral("print")),
|
globalObject->setProperty(ctx, vm.identifier(QStringLiteral("print")),
|
||||||
QQmlJS::VM::Value::fromObject(new builtins::Print(ctx)));
|
QQmlJS::VM::Value::fromObject(new builtins::Print(ctx)));
|
||||||
|
|
||||||
code(ctx);
|
void * buf = __qmljs_create_exception_handler(ctx);
|
||||||
|
if (setjmp(*(jmp_buf *)buf)) {
|
||||||
if (ctx->hasUncaughtException) {
|
|
||||||
if (VM::ErrorObject *e = ctx->result.asErrorObject())
|
if (VM::ErrorObject *e = ctx->result.asErrorObject())
|
||||||
std::cerr << "Uncaught exception: " << qPrintable(e->value.toString(ctx)->toQString()) << std::endl;
|
std::cerr << "Uncaught exception: " << qPrintable(e->value.toString(ctx)->toQString()) << std::endl;
|
||||||
else
|
else
|
||||||
std::cerr << "Uncaught exception: " << qPrintable(ctx->result.toString(ctx)->toQString()) << std::endl;
|
std::cerr << "Uncaught exception: " << qPrintable(ctx->result.toString(ctx)->toQString()) << std::endl;
|
||||||
|
return -2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
code(ctx);
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -935,7 +935,9 @@ void LLVMInstructionSelection::genCallName(IR::Call *e, llvm::Value *result)
|
||||||
_llvmValue = llvm::UndefValue::get(_valueTy);
|
_llvmValue = llvm::UndefValue::get(_valueTy);
|
||||||
return;
|
return;
|
||||||
|
|
||||||
Q_UNREACHABLE();
|
default:
|
||||||
|
Q_UNREACHABLE();
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
llvm::Value *name = getIdentifier(*base->id);
|
llvm::Value *name = getIdentifier(*base->id);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue