[llvm] r210001 - GraphWriter: detect graph viewer programs at runtime

Alp Toker alp at nuanti.com
Sun Jun 1 21:43:50 PDT 2014


On 02/06/2014 07:38, Simon Atanasyan wrote:
> 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]".
>

Thanks, I've added it after the switch in r210005

Alp.


-- 
http://www.nuanti.com
the browser experts




More information about the llvm-commits mailing list