Set precedence for TOKgep as well, now that we have the assert back in expToCBuffer.

This commit is contained in:
David Nadlinger
2011-04-22 23:20:12 +02:00
parent 51c1e2f108
commit 228a5cbf1c
2 changed files with 6 additions and 0 deletions

View File

@@ -1925,6 +1925,7 @@ struct LineInitExp : DefaultInitExp
// this stuff is strictly LDC
// Special expression to represent a LLVM GetElementPtr instruction.
struct GEPExp : UnaExp
{
unsigned index;

View File

@@ -5625,6 +5625,11 @@ void initPrecedence()
precedence[TOKcomma] = PREC_expr;
precedence[TOKdeclaration] = PREC_expr;
#if IN_LLVM
// Need to set precedence for TOKgep as well, as expToCBuffer expects it.
precedence[TOKgep] = PREC_primary;
#endif
}