diff options
author | John McCall <rjmccall@apple.com> | 2010-11-24 05:12:34 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2010-11-24 05:12:34 +0000 |
commit | 7eb0a9eb0cde8444b97f9c5b713d9be7a6f1e607 (patch) | |
tree | e828a6fb6060ac7711b5209210bfd31c15de71af /lib/CodeGen/CGExpr.cpp | |
parent | 834f9de3d3d76986d09f41725a70ba45a3e2aecd (diff) |
Switch a lot of call-sites over to using the new value-kind calculations.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120084 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGExpr.cpp')
-rw-r--r-- | lib/CodeGen/CGExpr.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/CodeGen/CGExpr.cpp b/lib/CodeGen/CGExpr.cpp index 7682baa8e5..f802b3981c 100644 --- a/lib/CodeGen/CGExpr.cpp +++ b/lib/CodeGen/CGExpr.cpp @@ -192,7 +192,7 @@ EmitExprForReferenceBinding(CodeGenFunction &CGF, const Expr *E, } RValue RV; - if (E->isLvalue(CGF.getContext()) == Expr::LV_Valid) { + if (E->isLValue()) { // Emit the expression as an lvalue. LValue LV = CGF.EmitLValue(E); if (LV.isPropertyRef() || LV.isKVCRef()) { @@ -235,8 +235,8 @@ EmitExprForReferenceBinding(CodeGenFunction &CGF, const Expr *E, continue; } } else if (const MemberExpr *ME = dyn_cast<MemberExpr>(E)) { - if (ME->getBase()->isLvalue(CGF.getContext()) != Expr::LV_Valid && - ME->getBase()->getType()->isRecordType()) { + if (!ME->isArrow() && ME->getBase()->isRValue()) { + assert(ME->getBase()->getType()->isRecordType()); if (FieldDecl *Field = dyn_cast<FieldDecl>(ME->getMemberDecl())) { E = ME->getBase(); Adjustments.push_back(SubobjectAdjustment(Field)); @@ -1515,7 +1515,7 @@ EmitExtVectorElementExpr(const ExtVectorElementExpr *E) { const PointerType *PT = E->getBase()->getType()->getAs<PointerType>(); Base = MakeAddrLValue(Ptr, PT->getPointeeType()); Base.getQuals().removeObjCGCAttr(); - } else if (E->getBase()->isLvalue(getContext()) == Expr::LV_Valid) { + } else if (E->getBase()->isGLValue()) { // Otherwise, if the base is an lvalue ( as in the case of foo.x.x), // emit the base as an lvalue. assert(E->getBase()->getType()->isVectorType()); @@ -1711,7 +1711,7 @@ LValue CodeGenFunction::EmitCompoundLiteralLValue(const CompoundLiteralExpr *E){ LValue CodeGenFunction::EmitConditionalOperatorLValue(const ConditionalOperator *E) { - if (E->isLvalue(getContext()) == Expr::LV_Valid) { + if (E->isGLValue()) { if (int Cond = ConstantFoldsToSimpleInteger(E->getCond())) { Expr *Live = Cond == 1 ? E->getLHS() : E->getRHS(); if (Live) |