More of objective-c's gc code-gen. Treat objective-c
objects as __strong when attribute unspecified.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59654 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/CGValue.h b/lib/CodeGen/CGValue.h
index 1c60ebf..5b6283f 100644
--- a/lib/CodeGen/CGValue.h
+++ b/lib/CodeGen/CGValue.h
@@ -162,10 +162,11 @@
bool isObjCWeak() const { return ObjCType == Weak; }
bool isObjCStrong() const { return ObjCType == Strong; }
- static void SetObjCType(unsigned WeakVal, unsigned StrongVal, LValue& R) {
- if (WeakVal)
+ static void SetObjCType(bool isWeak, bool isStrong, LValue& R) {
+ assert(!(isWeak == true && isStrong == true));
+ if (isWeak)
R.ObjCType = Weak;
- else if (StrongVal)
+ else if (isStrong)
R.ObjCType = Strong;
}