<div style="font-family: arial, helvetica, sans-serif; font-size: 10pt"><div dir="ltr"><div class="gmail_default" style><br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Dec 21, 2012 at 2:01 PM, Richard Smith <span dir="ltr"><<a href="mailto:richard@metafoo.co.uk" target="_blank" class="cremed">richard@metafoo.co.uk</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On Fri, Dec 21, 2012 at 1:43 PM, Chandler Carruth <<a href="mailto:chandlerc@gmail.com" class="cremed">chandlerc@gmail.com</a>> wrote:<br>

> On Fri, Dec 21, 2012 at 1:38 PM, John McCall <<a href="mailto:rjmccall@apple.com" class="cremed">rjmccall@apple.com</a>> wrote:<br>
>><br>
>> On Dec 21, 2012, at 1:18 PM, Chandler Carruth <<a href="mailto:chandlerc@gmail.com" class="cremed">chandlerc@gmail.com</a>> wrote:<br>
>><br>
>> So, last time I tried, I needed a bit more tooling in place to do the<br>
>> renaming sanely. =] That's taken care of, and so I'm hoping to do the<br>
>> renaming from 'clang/lib/CodeGen/...' to 'clang/lib/IRGen/...' over the<br>
>> holidays (hopefully minimal patches outstanding).<br>
>><br>
>> I'm also going to try to systematically clean up the naming of files and<br>
>> classes.<br>
>><br>
>> The current leading strategy for files:<br>
>><br>
>>   lib/CodeGen/CGCall.cpp -> lib/IRGen/Call.cpp<br>
>>   lib/CodeGen/CodeGenFunction.cpp -> lib/IRGen/Function.cpp<br>
>><br>
>> The current leading strategy for classes:<br>
>><br>
>>   clang::CGFoo -> clang::irgen::Foo<br>
>>   clang::CodeGenBar -> clang::irgen::Bar<br>
>><br>
>> I'm asking Doug and John to paint this bikeshed so that we don't just go<br>
>> around in circles endlessly.<br>
>><br>
>><br>
>> I really like having a prefix on file names so that they aren't<br>
>> immediately confusable — visually, by IDEs, by C-x b, etc. — with files from<br>
>> other parts of the compiler.  For example, I think it would be a real loss<br>
>> if there were three Decl.cpp files in clang: one in AST, one in Sema, and<br>
>> one in IRGen.<br>
><br>
><br>
> Sure.<br>
><br>
>><br>
>><br>
>> For lack of a better idea, let's go with replacing everything that's<br>
>> "CodeGen" with "IRGen" and "CG" with "IR".  "IR" has a pretty unambiguous<br>
>> meaning in the context of LLVM.<br>
><br>
><br>
> Can we pick just one prefix and have everything use that? Seems a great<br>
> opportunity to no longer wonder "is it CGFunction or CodeGenFunction?"<br>
><br>
> Should the prefix apply just to the files? 'clang::irgen::IRGenFunction'<br>
> seems needlessly redundant, but if that's your preferred shade of bikeshed,<br>
> I will make it so. ;]<br>
<br>
</div></div>I find having the prefix in the identifier to be very useful for<br>
grepability of the code.<br></blockquote><div><br></div><div style>I actually agree, but then why bother with the namespace? I could get rid of that instead as the unnecessary disambiguation....</div><div style><br></div>
<div style>But anyways, I don't really care, I just don't understand. =] Carrying on with the plan with John's bikeshed color.</div></div></div></div></div>