diff options
author | John McCall <rjmccall@apple.com> | 2010-11-18 06:31:45 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2010-11-18 06:31:45 +0000 |
commit | f89e55ab1bfb3ea997f8b02997c611a02254eb2d (patch) | |
tree | cacb763638dfa30e56adfe71a8ab73cd8b19eb64 /lib/CodeGen/CGObjC.cpp | |
parent | 6a02b609c2e23b28d24f9db4c8006137c6b55ae4 (diff) |
Calculate the value kind of an expression when it's created and
store it on the expression node. Also store an "object kind",
which distinguishes ordinary "addressed" l-values (like
variable references and pointer dereferences) and bitfield,
@property, and vector-component l-values.
Currently we're not using these for much, but I aim to switch
pretty much everything calculating l-valueness over to them.
For now they shouldn't necessarily be trusted.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119685 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGObjC.cpp')
-rw-r--r-- | lib/CodeGen/CGObjC.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/CodeGen/CGObjC.cpp b/lib/CodeGen/CGObjC.cpp index 7c2dfe8b23..13f4d8f796 100644 --- a/lib/CodeGen/CGObjC.cpp +++ b/lib/CodeGen/CGObjC.cpp @@ -393,9 +393,9 @@ void CodeGenFunction::GenerateObjCSetter(ObjCImplementationDecl *IMP, SourceLocation Loc = PD->getLocation(); ValueDecl *Self = OMD->getSelfDecl(); ObjCIvarDecl *Ivar = PID->getPropertyIvarDecl(); - DeclRefExpr Base(Self, Self->getType(), Loc); + DeclRefExpr Base(Self, Self->getType(), VK_RValue, Loc); ParmVarDecl *ArgDecl = *OMD->param_begin(); - DeclRefExpr Arg(ArgDecl, ArgDecl->getType(), Loc); + DeclRefExpr Arg(ArgDecl, ArgDecl->getType(), VK_LValue, Loc); ObjCIvarRefExpr IvarRef(Ivar, Ivar->getType(), Loc, &Base, true, true); // The property type can differ from the ivar type in some situations with @@ -406,11 +406,11 @@ void CodeGenFunction::GenerateObjCSetter(ObjCImplementationDecl *IMP, Ivar->getType(), CK_BitCast, &Arg, VK_RValue); BinaryOperator Assign(&IvarRef, &ArgCasted, BO_Assign, - Ivar->getType(), Loc); + Ivar->getType(), VK_RValue, OK_Ordinary, Loc); EmitStmt(&Assign); } else { BinaryOperator Assign(&IvarRef, &Arg, BO_Assign, - Ivar->getType(), Loc); + Ivar->getType(), VK_RValue, OK_Ordinary, Loc); EmitStmt(&Assign); } } |