[llvm-commits] Call graph printer/viewer
Speziale Ettore
speziale.ettore at gmail.com
Thu Jan 10 23:28:55 PST 2013
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?
> +++ tools/opt/GraphPrinters.cpp
Ops, forgot -- my fault.
Bye,
speziale.ettore at gmail.com
More information about the llvm-commits
mailing list