Explicitly note that pre-inc/dec lvalues are not supported yet, so that it

doesn't crash.  (Such expressions are valid in C++, but not in C.)

llvm-svn: 86513
This commit is contained in:
Eli Friedman 2009-11-09 04:20:47 +00:00
parent 1521c85c04
commit a72bf0fae8
1 changed files with 5 additions and 1 deletions

View File

@ -919,13 +919,17 @@ LValue CodeGenFunction::EmitUnaryOpLValue(const UnaryOperator *E) {
return LV;
}
case UnaryOperator::Real:
case UnaryOperator::Imag:
case UnaryOperator::Imag: {
LValue LV = EmitLValue(E->getSubExpr());
unsigned Idx = E->getOpcode() == UnaryOperator::Imag;
return LValue::MakeAddr(Builder.CreateStructGEP(LV.getAddress(),
Idx, "idx"),
MakeQualifiers(ExprTy));
}
case UnaryOperator::PreInc:
case UnaryOperator::PreDec:
return EmitUnsupportedLValue(E, "pre-inc/dec expression");
}
}
LValue CodeGenFunction::EmitStringLiteralLValue(const StringLiteral *E) {