[PATCH] [lld] Include reference kind in cycle detector debug

Rui Ueyama ruiu at google.com
Mon Feb 24 23:46:34 PST 2014


On Mon, Feb 24, 2014 at 11:32 PM, Shankar Easwaran
<shankare at codeaurora.org>wrote:

> Any new core reference types would need to be duplicated, We dont want to
> duplicate the code in two different places, and authors of adding new
> reference types have to make sure they add it in two places.


That's true in general, but this debug output is just an assertion for unit
tests, so the situation is different. When I wrote it I did not expected
that user would see it. So it's totally okay to print other types as
"unknown".


> On 2/25/2014 1:28 AM, Rui Ueyama wrote:
>
>> I prefer the first patch because the purpose of this patch is all for rare
>> debug output and nothing else. In the first patch everything is nicely
>> compartmented in a file scope function, and it does not touch anything
>> else. In the second patch, you did plumbing all the way from the Linking
>> Context to the debug routine, so many member functions now take one more
>> extra argument. I think it doesn't worth.
>>
>>
>> On Mon, Feb 24, 2014 at 9:37 AM, Shankar Easwaran
>> <shankare at codeaurora.org>wrote:
>>
>>  LGTM.
>>>
>>>
>>> On 2/24/2014 2:15 AM, Nico Rieck wrote:
>>>
>>>  On 24.02.2014 06:43, Shankar Easwaran wrote:
>>>>
>>>>  This patch makes the strings duplicated in the Registry(Reader.cpp,
>>>>> referenceKindToString) and the LayoutPass. I am not sure if there is a
>>>>> way to use the Registry here, but I think it would be better to have a
>>>>> function that could call the Registry to get this information.
>>>>>
>>>>>  It's possible by passing down a Registry reference to the LayoutPass
>>>> ctor in {Core,ELF,PECOFF,Macho}LinkingContext::addPasses(). The
>>>> LayoutPass would then require ReaderWriter/Reader.h. Would this be
>>>> acceptable? Updated patch attached.
>>>>
>>>> -Nico
>>>>
>>>>
>>> --
>>> Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted
>>> by the Linux Foundation
>>>
>>> _______________________________________________
>>> llvm-commits mailing list
>>> llvm-commits at cs.uiuc.edu
>>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>>>
>>>
>
> --
> Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted
> by the Linux Foundation
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140224/6e4d5c92/attachment.html>


More information about the llvm-commits mailing list