[cfe-dev] [LLVMdev] RFC: A Great Renaming of Things (or: Let's Repaint ALL the Bikesheds!)

John McCall rjmccall at apple.com
Tue Nov 27 15:35:18 PST 2012

On Nov 24, 2012, at 1:02 AM, Tinco Andringa <mail at tinco.nl> wrote:

> Hi,
> I think it's an awesome idea to make sure all names are logical. It is
> an essential feature of a good API to have logical naming :)
>> I really dislike that all the files and classes in the MC library
>> start with MC. This is c++, not c :(
> On a similar note, all the classes in clang/CodeGen are prefixed with
> CG or even CodeGen, could those be renamed as well?

Yes.  For example, CodeGenFunction would become IRGenFunction.
CGCall.cpp would become... probably either GenCall.cpp or IRGenCall.cpp,
with my preference being the shortest that's still unambiguous
throughout the project, which I think means Gen*.

> And speaking of the clang codegenerator, I as a llvm newbie was
> confused by the ModuleBuilder.h/.cpp. These files actually contain the
> definition of the CodeGenerator itself that I was searching for (being
> sort of the entry point of the codegenerator).
> I think it would be more clear if they were called
> CodeGenerator.h/.cpp. Or perhaps even splitted out into
> CodeGenerator.h and IR/CodeGenerator.h/.cpp.

This is really just a historical accident, and I have no objections to fixing it.


More information about the cfe-dev mailing list