mirror of
https://github.com/intel/llvm.git
synced 2026-01-26 12:26:52 +08:00
Fix transposed optional / required in Objective-C metadata (GNUstep runtime)
Patch by Niels Grewe! llvm-svn: 162441
This commit is contained in:
@@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user