forked from OSchip/llvm-project
Don't omit retain / release / autorelease message sends in hybrid GC mode.
llvm-svn: 131932
This commit is contained in:
parent
3fe89562e8
commit
1254f6efe2
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue