[llvm] r223521 - Remove dead code. We are only lazy about functions with bodies.
Rafael Avila de Espindola
rafael.espindola at gmail.com
Mon Dec 8 16:38:09 PST 2014
Sent from my iPhone
> On Dec 8, 2014, at 19:32, Michael Ilseman <milseman at apple.com> wrote:
>
> Rafael, this broke an internal test case. I’m trying to diagnose the problem and I'm also seeing if I can make an external test case. In the mean time, since this is just “dead code" is it ok if I temporarily revert this?
>
Is anything that is easy to reproduce with ld64 (clang bootstrap for example)?
I don't think this will revert cleanly. Are you still hitting an assert with trunk. Can you post the backtrace?
>
>> On Dec 5, 2014, at 1:36 PM, Rafael Espindola <rafael.espindola at gmail.com> wrote:
>>
>> Author: rafael
>> Date: Fri Dec 5 15:36:06 2014
>> New Revision: 223521
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=223521&view=rev
>> Log:
>> Remove dead code. We are only lazy about functions with bodies.
>>
>> Modified:
>> llvm/trunk/lib/Linker/LinkModules.cpp
>>
>> Modified: llvm/trunk/lib/Linker/LinkModules.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Linker/LinkModules.cpp?rev=223521&r1=223520&r2=223521&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/Linker/LinkModules.cpp (original)
>> +++ llvm/trunk/lib/Linker/LinkModules.cpp Fri Dec 5 15:36:06 2014
>> @@ -1518,9 +1518,6 @@ bool ModuleLinker::run() {
>> Function *SF = LazilyLinkFunctions.back();
>> LazilyLinkFunctions.pop_back();
>>
>> - if (!SF)
>> - continue;
>> -
>> Function *DF = cast<Function>(ValueMap[SF]);
>> if (SF->hasPrefixData()) {
>> // Link in the prefix data.
>> @@ -1532,11 +1529,8 @@ bool ModuleLinker::run() {
>> if (std::error_code EC = SF->materialize())
>> return emitError(EC.message());
>>
>> - // Skip if no body (function is external).
>> - if (SF->isDeclaration())
>> - continue;
>> -
>> // Link in function body.
>> + assert(!SF->isDeclaration());
>> linkFunctionBody(DF, SF);
>> SF->Dematerialize();
>> }
>>
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
More information about the llvm-commits
mailing list