[cfe-commits] r106492 - /cfe/trunk/lib/CodeGen/CGObjCMac.cpp
Nico Weber
thakis at chromium.org
Mon Jun 21 18:56:06 PDT 2010
Hi Fariborz,
could it be that this is caused by you changing "test.o" to %t? I know
I had problems locally when I used %t, because it gets replaces with
category-class.m.tmp, while it seems that libtools prefers if its
input files end in ".o".
Nico
On Mon, Jun 21, 2010 at 4:26 PM, Fariborz Jahanian <fjahanian at apple.com> wrote:
>
> Hi Nico,
>
> This test is failing on our BuildBot in ways which is not obvious to me. It is best to just use FileCheck and
> check for generation of the extern symbol.
>
> - Thanks, Fariborz
>
> On Jun 21, 2010, at 3:25 PM, Fariborz Jahanian wrote:
>
>> 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 <fjahanian at apple.com
>>>>
>>>> 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
>>>> cfe-commits at cs.uiuc.edu
>>>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>>>>
>>
>> _______________________________________________
>> cfe-commits mailing list
>> cfe-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>
More information about the cfe-commits
mailing list