[MCJIT] Teach RuntimeDyldChecker to handle underscores at the start of symbols.

RuntimeDyldChecker had been testing isalpha(Expr[0]) to recognise symbol tokens,
and throwing unrecognized token errors when it hit symbols with leading
underscores. This fixes that.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@213706 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Lang Hames 2014-07-22 23:17:21 +00:00
parent b9b8d09137
commit f072ab78ee

View File

@ -519,7 +519,7 @@ private:
std::tie(SubExprResult, RemainingExpr) = evalParensExpr(Expr, PCtx);
else if (Expr[0] == '*')
std::tie(SubExprResult, RemainingExpr) = evalLoadExpr(Expr);
else if (isalpha(Expr[0]))
else if (isalpha(Expr[0]) || Expr[0] == '_')
std::tie(SubExprResult, RemainingExpr) = evalIdentifierExpr(Expr, PCtx);
else if (isdigit(Expr[0]))
std::tie(SubExprResult, RemainingExpr) = evalNumberExpr(Expr);