forked from OSchip/llvm-project
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:
parent
1521c85c04
commit
a72bf0fae8
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue