aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen
diff options
context:
space:
mode:
authorDavid Chisnall <csdavec@swan.ac.uk>2011-05-23 23:13:25 +0000
committerDavid Chisnall <csdavec@swan.ac.uk>2011-05-23 23:13:25 +0000
commite6a11a62d1d66d10a87d81ed697348d66d59adf7 (patch)
tree9bc0c8684e762044aa35005c4ccdcfc2e8c034e8 /lib/CodeGen
parent789ecdebd04aebdb2d6b801ebe8e04a189ebc023 (diff)
Don't omit retain / release / autorelease message sends in hybrid GC mode.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131932 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r--lib/CodeGen/CGObjCGNU.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/CodeGen/CGObjCGNU.cpp b/lib/CodeGen/CGObjCGNU.cpp
index 82a0f9b122..ff583af7cd 100644
--- a/lib/CodeGen/CGObjCGNU.cpp
+++ b/lib/CodeGen/CGObjCGNU.cpp
@@ -955,7 +955,7 @@ CGObjCGNU::GenerateMessageSendSuper(CodeGenFunction &CGF,
bool IsClassMessage,
const CallArgList &CallArgs,
const ObjCMethodDecl *Method) {
- if (CGM.getLangOptions().getGCMode() != LangOptions::NonGC) {
+ if (CGM.getLangOptions().getGCMode() == LangOptions::GCOnly) {
if (Sel == RetainSel || Sel == AutoreleaseSel) {
return RValue::get(Receiver);
}
@@ -1063,7 +1063,7 @@ CGObjCGNU::GenerateMessageSend(CodeGenFunction &CGF,
const ObjCInterfaceDecl *Class,
const ObjCMethodDecl *Method) {
// Strip out message sends to retain / release in GC mode
- if (CGM.getLangOptions().getGCMode() != LangOptions::NonGC) {
+ if (CGM.getLangOptions().getGCMode() == LangOptions::GCOnly) {
if (Sel == RetainSel || Sel == AutoreleaseSel) {
return RValue::get(Receiver);
}