diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2007-10-29 22:57:28 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2007-10-29 22:57:28 +0000 |
commit | 33e1d64ab5cd5d27f8530ccd056191fe2c9f3f2e (patch) | |
tree | 80a0061a74edcb18c406b150eeb290dfd5aac07a /Driver/RewriteTest.cpp | |
parent | 10b945c9ee27595f8710aba4b3447d206b354ca1 (diff) |
Encoding for objectiive-c methods.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43481 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'Driver/RewriteTest.cpp')
-rw-r--r-- | Driver/RewriteTest.cpp | 35 |
1 files changed, 21 insertions, 14 deletions
diff --git a/Driver/RewriteTest.cpp b/Driver/RewriteTest.cpp index 45dde83375..c76b9eeba9 100644 --- a/Driver/RewriteTest.cpp +++ b/Driver/RewriteTest.cpp @@ -495,15 +495,20 @@ void RewriteTest::RewriteObjcMethodsMetaData(ObjcMethodDecl **Methods, Result += "\t,{{(SEL)\""; Result += Methods[0]->getSelector().getName().c_str(); - Result += "\", \"\", 0}\n"; - + std::string MethodTypeString; + Context->getObjcEncodingForMethodDecl(Methods[0], MethodTypeString); + Result += "\", \""; + Result += MethodTypeString; + Result += "\", 0}\n"; for (int i = 1; i < NumMethods; i++) { - // TODO: 1) method selector name may hav to go into their own section - // 2) encode method types for use here (which may have to go into - // __meth_var_types section, 3) Need method address as 3rd initializer. + // TODO: Need method address as 3rd initializer. Result += "\t ,{(SEL)\""; Result += Methods[i]->getSelector().getName().c_str(); - Result += "\", \"\", 0}\n"; + std::string MethodTypeString; + Context->getObjcEncodingForMethodDecl(Methods[i], MethodTypeString); + Result += "\", \""; + Result += MethodTypeString; + Result += "\", 0}\n"; } Result += "\t }\n};\n"; } @@ -559,12 +564,13 @@ void RewriteTest::RewriteObjcProtocolsMetaData(ObjcProtocolDecl **Protocols, Result += "\", \"\"}\n"; for (int i = 1; i < NumMethods; i++) { - // TODO: 1) method selector name may hav to go into their own section - // 2) encode method types for use here (which may have to go into - // __meth_var_types section. Result += "\t ,{(SEL)\""; Result += Methods[i]->getSelector().getName().c_str(); - Result += "\", \"\"}\n"; + std::string MethodTypeString; + Context->getObjcEncodingForMethodDecl(Methods[i], MethodTypeString); + Result += "\", \""; + Result += MethodTypeString; + Result += "\"}\n"; } Result += "\t }\n};\n"; } @@ -586,12 +592,13 @@ void RewriteTest::RewriteObjcProtocolsMetaData(ObjcProtocolDecl **Protocols, Result += "\", \"\"}\n"; for (int i = 1; i < NumMethods; i++) { - // TODO: 1) method selector name may hav to go into their own section - // 2) encode method types for use here (which may have to go into - // __meth_var_types section. Result += "\t ,{(SEL)\""; Result += Methods[i]->getSelector().getName().c_str(); - Result += "\", \"\"}\n"; + std::string MethodTypeString; + Context->getObjcEncodingForMethodDecl(Methods[i], MethodTypeString); + Result += "\", \""; + Result += MethodTypeString; + Result += "\"}\n"; } Result += "\t }\n};\n"; } |