Codegen: do not assume QStringRef(const QString *) is implicit

It won't be for very much longer.

Change-Id: I90fae21b621f104053b776296fc9f6525e8baf52
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
This commit is contained in:
Marc Mutz 2017-03-22 11:49:14 +01:00
parent 110f69ab81
commit 047af77623
1 changed files with 2 additions and 2 deletions

View File

@ -1485,7 +1485,7 @@ IR::Expr *Codegen::identifier(const QString &name, int line, int col)
IR::Function *f = _function;
while (f && e->parent) {
if (f->insideWithOrCatch || (f->isNamedExpression && f->name == name))
if (f->insideWithOrCatch || (f->isNamedExpression && QStringRef(f->name) == name))
return _block->NAME(name, line, col);
int index = e->findMember(name);
@ -1496,7 +1496,7 @@ IR::Expr *Codegen::identifier(const QString &name, int line, int col)
al->isArgumentsOrEval = true;
return al;
}
const int argIdx = f->indexOfArgument(&name);
const int argIdx = f->indexOfArgument(QStringRef(&name));
if (argIdx != -1)
return _block->ARG(argIdx, scope);