[llvm] r253820 - Avoid dependency between TableGen and CodeGen

Yaron Keren via llvm-commits llvm-commits at lists.llvm.org
Sun Nov 22 08:09:11 PST 2015


Personally I prefer putting in a non obvious place (such as
include/llvm/Support)
to duplicating code. It seems that every such duplication diverges in time,
when someone modifies one copy and forgets the other. Since both projects
still compile, everything is "OK". Sometimes this results in very hard to
find bugs.
That may be a matter of personal preference, though.


2015-11-22 17:40 GMT+02:00 Krzysztof Parzyszek <kparzysz at codeaurora.org>:

> On 11/22/2015 9:31 AM, Yaron Keren wrote:
>
>> Instead of copy&paste duplication, wouldn't it be better to introduce a
>> .h or .inc file shared by both cpp sources?
>>
>
> Yes. See my reply to Takumi's email.
>
> The problem is that if I put the common definitions in some file in
> include/llvm/CodeGen, then that violates layering.  I didn't want to put it
> in include/llvm/Support, and there isn't really any other obvious place for
> that common file.
> As a matter of fact, the file that this commit deletes
> (DFAPacketizerDefs.h) was my initial attempt to solve the hard cycle by
> extracting the minimal set of common definitions into its own file.
>
> If you have suggestions on how to address this in a more elegant way, let
> me know.
>
> -Krzysztof
>
>
> --
> 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/20151122/e3858fb9/attachment.html>


More information about the llvm-commits mailing list