[llvm-dev] Refactor BitcodeWriter into classes?
Duncan P. N. Exon Smith via llvm-dev
llvm-dev at lists.llvm.org
Thu Apr 21 11:41:38 PDT 2016
> On 2016-Apr-21, at 11:25, Teresa Johnson <tejohnson at google.com> wrote:
> I am currently making some BitcodeWriter changes that involve some refactoring, and am thinking for the Nth time that it would be much nicer to have a class instead of passing around a long list of parameters. I am thinking of biting the bullet and doing that - any objections?
> I assume the reason why there is no existing class wrapping the bitcode writing process is just legacy code and nothing else?
> It seems like at the least a simple class could hold the common elements used by the various bitcode writing routines, and I might want to add a specialized class to manage the ThinLTO combined index file generation.
Please do this. We'll all profit. Thanks!
Since you'll be touching all the lines anyway, it's also a good
opportunity to rename the functions to match current conventions
(i.e., start with a lower-case letter).
> Teresa Johnson | Software Engineer | tejohnson at google.com | 408-460-2413
More information about the llvm-dev