diff options
author | David Chisnall <csdavec@swan.ac.uk> | 2012-08-23 12:17:21 +0000 |
---|---|---|
committer | David Chisnall <csdavec@swan.ac.uk> | 2012-08-23 12:17:21 +0000 |
commit | a904e01839e8244d39b3d9bfc749ec93f1cbe1e1 (patch) | |
tree | 6ebdeda6d9e0597d71c392adc5c8a37e865672d7 /lib/CodeGen/CGObjCGNU.cpp | |
parent | 8e4c189e6502cffb760b33f092e65effb1d10092 (diff) |
Fix transposed optional / required in Objective-C metadata (GNUstep runtime)
Patch by Niels Grewe!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162441 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGObjCGNU.cpp')
-rw-r--r-- | lib/CodeGen/CGObjCGNU.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/CodeGen/CGObjCGNU.cpp b/lib/CodeGen/CGObjCGNU.cpp index f1c5f19ffa..d517c9d2b5 100644 --- a/lib/CodeGen/CGObjCGNU.cpp +++ b/lib/CodeGen/CGObjCGNU.cpp @@ -1630,13 +1630,13 @@ void CGObjCGNU::GenerateProtocol(const ObjCProtocolDecl *PD) { std::string TypeStr; Context.getObjCEncodingForMethodDecl(*iter, TypeStr); if ((*iter)->getImplementationControl() == ObjCMethodDecl::Optional) { - InstanceMethodNames.push_back( - MakeConstantString((*iter)->getSelector().getAsString())); - InstanceMethodTypes.push_back(MakeConstantString(TypeStr)); - } else { OptionalInstanceMethodNames.push_back( MakeConstantString((*iter)->getSelector().getAsString())); OptionalInstanceMethodTypes.push_back(MakeConstantString(TypeStr)); + } else { + InstanceMethodNames.push_back( + MakeConstantString((*iter)->getSelector().getAsString())); + InstanceMethodTypes.push_back(MakeConstantString(TypeStr)); } } // Collect information about class methods: @@ -1650,13 +1650,13 @@ void CGObjCGNU::GenerateProtocol(const ObjCProtocolDecl *PD) { std::string TypeStr; Context.getObjCEncodingForMethodDecl((*iter),TypeStr); if ((*iter)->getImplementationControl() == ObjCMethodDecl::Optional) { - ClassMethodNames.push_back( - MakeConstantString((*iter)->getSelector().getAsString())); - ClassMethodTypes.push_back(MakeConstantString(TypeStr)); - } else { OptionalClassMethodNames.push_back( MakeConstantString((*iter)->getSelector().getAsString())); OptionalClassMethodTypes.push_back(MakeConstantString(TypeStr)); + } else { + ClassMethodNames.push_back( + MakeConstantString((*iter)->getSelector().getAsString())); + ClassMethodTypes.push_back(MakeConstantString(TypeStr)); } } |