[cfe-dev] Heads up, renaming attempt #2!

Chandler Carruth chandlerc at gmail.com
Fri Dec 21 13:43:17 PST 2012


On Fri, Dec 21, 2012 at 1:38 PM, John McCall <rjmccall at apple.com> wrote:

> On Dec 21, 2012, at 1:18 PM, Chandler Carruth <chandlerc at gmail.com> wrote:
>
> So, last time I tried, I needed a bit more tooling in place to do the
> renaming sanely. =] That's taken care of, and so I'm hoping to do the
> renaming from 'clang/lib/CodeGen/...' to 'clang/lib/IRGen/...' over the
> holidays (hopefully minimal patches outstanding).
>
> I'm also going to try to systematically clean up the naming of files and
> classes.
>
> The current leading strategy for files:
>
>   lib/CodeGen/CGCall.cpp -> lib/IRGen/Call.cpp
>   lib/CodeGen/CodeGenFunction.cpp -> lib/IRGen/Function.cpp
>
> The current leading strategy for classes:
>
>   clang::CGFoo -> clang::irgen::Foo
>   clang::CodeGenBar -> clang::irgen::Bar
>
> I'm asking Doug and John to paint this bikeshed so that we don't just go
> around in circles endlessly.
>
>
> I really like having a prefix on file names so that they aren't
> immediately confusable — visually, by IDEs, by C-x b, etc. — with files
> from other parts of the compiler.  For example, I think it would be a real
> loss if there were three Decl.cpp files in clang: one in AST, one in Sema,
> and one in IRGen.
>

Sure.


>
> For lack of a better idea, let's go with replacing everything that's
> "CodeGen" with "IRGen" and "CG" with "IR".  "IR" has a pretty unambiguous
> meaning in the context of LLVM.
>

Can we pick just one prefix and have everything use that? Seems a great
opportunity to no longer wonder "is it CGFunction or CodeGenFunction?"

Should the prefix apply just to the files? 'clang::irgen::IRGenFunction'
seems needlessly redundant, but if that's your preferred shade of bikeshed,
I will make it so. ;]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20121221/c311d234/attachment.html>


More information about the cfe-dev mailing list