summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGObjC.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2010-11-18 06:31:45 +0000
committerJohn McCall <rjmccall@apple.com>2010-11-18 06:31:45 +0000
commit7decc9e4ea6c56ffce14d25f542f5eda3eeba97a (patch)
tree534c07409e36400c14c13c70f78f8aec207b99cc /clang/lib/CodeGen/CGObjC.cpp
parente5a1e8ae12781d504c7541ed0aa97a29360dacd6 (diff)
downloadbcm5719-llvm-7decc9e4ea6c56ffce14d25f542f5eda3eeba97a.tar.gz
bcm5719-llvm-7decc9e4ea6c56ffce14d25f542f5eda3eeba97a.zip
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. llvm-svn: 119685
Diffstat (limited to 'clang/lib/CodeGen/CGObjC.cpp')
-rw-r--r--clang/lib/CodeGen/CGObjC.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/clang/lib/CodeGen/CGObjC.cpp b/clang/lib/CodeGen/CGObjC.cpp
index 7c2dfe8b23b..13f4d8f7965 100644
--- a/clang/lib/CodeGen/CGObjC.cpp
+++ b/clang/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);
}
}
OpenPOWER on IntegriCloud