[llvm-commits] Call graph printer/viewer
Andrew Trick
atrick at apple.com
Thu Jan 10 23:34:03 PST 2013
On Jan 10, 2013, at 11:28 PM, Speziale Ettore <speziale.ettore at gmail.com> wrote:
> Hi,
>
>> The existing code for graph printers follows an odd style. I would add new code using a more standard style...
>>
>> + : ModulePass(ID) {
>> + Name = GraphName;
>>
>> ...use the initializer list.
>
> I kept the old style to be consistent -- I will refactor the whole file.
>
>> + virtual bool runOnModule(Module &M) {
>> + Analysis *Graph;
>> + std::string Title;
>> + Graph = &getAnalysis<Analysis>();
>> + Title = DOTGraphTraits<Analysis*>::getGraphName(Graph);
>>
>> ...declare and initialize your variables on the same line.
>
> Same as above. Moreover, is it OK if I use llvm::StringRef +
> llvm::SmallString instead of std::string?
Sure. Thanks.
-Andy
More information about the llvm-commits
mailing list