[llvm] r210001 - GraphWriter: detect graph viewer programs at runtime
Simon Atanasyan
simon at atanasyan.com
Sun Jun 1 21:38:02 PDT 2014
Hi,
On Mon, Jun 2, 2014 at 5:40 AM, Alp Toker <alp at nuanti.com> wrote:
> Author: alp
> Date: Sun Jun 1 20:40:04 2014
> New Revision: 210001
>
> URL: http://llvm.org/viewvc/llvm-project?rev=210001&view=rev
> Log:
> GraphWriter: detect graph viewer programs at runtime
[...]
> +static const char *getProgramName(GraphProgram::Name program) {
> + switch (program) {
> + case GraphProgram::DOT:
> + return "dot";
> + case GraphProgram::FDP:
> + return "fdp";
> + case GraphProgram::NEATO:
> + return "neato";
> + case GraphProgram::TWOPI:
> + return "twopi";
> + case GraphProgram::CIRCO:
> + return "circo";
> + }
> }
I suggest to add default case with llvm_unreachable call. Now compiler
shows a warning "control reaches end of non-void function
[-Wreturn-type]".
--
Simon Atanasyan
More information about the llvm-commits
mailing list