From 7eb0a9eb0cde8444b97f9c5b713d9be7a6f1e607 Mon Sep 17 00:00:00 2001 From: John McCall Date: Wed, 24 Nov 2010 05:12:34 +0000 Subject: 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 --- lib/CodeGen/CGExpr.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'lib/CodeGen/CGExpr.cpp') 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(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(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(); 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) -- cgit v1.2.3