I got the latest patch. Just forgot to check in the test case. It is in now. One minor note. Generally, we should not leave any temp files behind. I already removed build of test.o. See if you can clean up the other two at the end too.
- fariborz On Jun 21, 2010, at 3:15 PM, Nico Weber wrote: > Hi Fariborz, > > I screwed up and uploaded a patch without the test case; looks like > you landed that. There's a newer patch on the bug that also contains a > test. Maybe you can land the test too. > > Sorry, > Nico > > On Mon, Jun 21, 2010 at 3:05 PM, Fariborz Jahanian <[email protected] > > wrote: >> Author: fjahanian >> Date: Mon Jun 21 17:05:18 2010 >> New Revision: 106492 >> >> URL: http://llvm.org/viewvc/llvm-project?rev=106492&view=rev >> Log: >> In fragile-abi (32bit mode abi) generate global symbol >> objc_category_name_xxx for each category implementation. >> (fixes PR7431) patch by Nico Weber. >> >> Modified: >> cfe/trunk/lib/CodeGen/CGObjCMac.cpp >> >> Modified: cfe/trunk/lib/CodeGen/CGObjCMac.cpp >> URL: >> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGObjCMac.cpp?rev=106492&r1=106491&r2=106492&view=diff >> = >> = >> = >> = >> = >> = >> = >> = >> = >> ===================================================================== >> --- cfe/trunk/lib/CodeGen/CGObjCMac.cpp (original) >> +++ cfe/trunk/lib/CodeGen/CGObjCMac.cpp Mon Jun 21 17:05:18 2010 >> @@ -852,6 +852,9 @@ >> /// MethodVarNames - uniqued method variable names. >> llvm::DenseMap<Selector, llvm::GlobalVariable*> MethodVarNames; >> >> + /// DefinedCategoryNames - list of category names in form >> Class_Category. >> + llvm::SetVector<std::string> DefinedCategoryNames; >> + >> /// MethodVarTypes - uniqued method type signatures. We have to use >> /// a StringMap here because have no other unique reference. >> llvm::StringMap<llvm::GlobalVariable*> MethodVarTypes; >> @@ -2068,6 +2071,7 @@ >> "__OBJC,__category,regular,no_dead_strip", >> 4, true); >> DefinedCategories.push_back(GV); >> + DefinedCategoryNames.insert(ExtName.str()); >> } >> >> // FIXME: Get from somewhere? >> @@ -3650,8 +3654,14 @@ >> OS << "\t.objc_class_name_" << (*I)->getName() << "=0\n" >> << "\t.globl .objc_class_name_" << (*I)->getName() << "\n"; >> for (llvm::SetVector<IdentifierInfo*>::iterator I = >> LazySymbols.begin(), >> - e = LazySymbols.end(); I != e; ++I) >> + e = LazySymbols.end(); I != e; ++I) { >> OS << "\t.lazy_reference .objc_class_name_" << (*I)- >> >getName() << "\n"; >> + } >> + >> + for (size_t i = 0; i < DefinedCategoryNames.size(); ++i) { >> + OS << "\t.objc_category_name_" << DefinedCategoryNames[i] << >> "=0\n" >> + << "\t.globl .objc_category_name_" << >> DefinedCategoryNames[i] << "\n"; >> + } >> >> CGM.getModule().setModuleInlineAsm(OS.str()); >> } >> >> >> _______________________________________________ >> cfe-commits mailing list >> [email protected] >> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits >> _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
