summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGValue.h
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2009-02-19 00:48:05 +0000
committerFariborz Jahanian <fjahanian@apple.com>2009-02-19 00:48:05 +0000
commit83e3eea5fc8a14bae22a5b5a80fe96b7e6b91e55 (patch)
tree22f0e4dd28c08fa314b93ab236aa27bcf9b8fa10 /clang/lib/CodeGen/CGValue.h
parent9c788c081cbda71d65a4fc32b339718cd9ade52e (diff)
downloadbcm5719-llvm-83e3eea5fc8a14bae22a5b5a80fe96b7e6b91e55.tar.gz
bcm5719-llvm-83e3eea5fc8a14bae22a5b5a80fe96b7e6b91e55.zip
Some code simplification. ir gen for gc'able array
of objects in objc. llvm-svn: 64992
Diffstat (limited to 'clang/lib/CodeGen/CGValue.h')
-rw-r--r--clang/lib/CodeGen/CGValue.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/clang/lib/CodeGen/CGValue.h b/clang/lib/CodeGen/CGValue.h
index 318ee55ac97..96e4224f614 100644
--- a/clang/lib/CodeGen/CGValue.h
+++ b/clang/lib/CodeGen/CGValue.h
@@ -182,11 +182,10 @@ public:
R.Ivar = iValue;
}
- static void SetObjCType(bool isWeak, bool isStrong, LValue& R) {
- assert(!(isWeak == true && isStrong == true));
- if (isWeak)
+ static void SetObjCType(QualType::GCAttrTypes GCAttrs, LValue& R) {
+ if (GCAttrs == QualType::Weak)
R.ObjCType = Weak;
- else if (isStrong)
+ else if (GCAttrs == QualType::Strong)
R.ObjCType = Strong;
}
@@ -227,11 +226,13 @@ public:
return KVCRefExpr;
}
- static LValue MakeAddr(llvm::Value *V, unsigned Qualifiers) {
+ static LValue MakeAddr(llvm::Value *V, unsigned Qualifiers,
+ QualType::GCAttrTypes GCAttrs = QualType::GCNone) {
LValue R;
R.LVType = Simple;
R.V = V;
SetQualifiers(Qualifiers,R);
+ SetObjCType(GCAttrs, R);
return R;
}
OpenPOWER on IntegriCloud