Coding standard: return succ on failure?

Shuxin Yang shuxin.llvm at gmail.com
Thu Aug 1 10:20:06 PDT 2013


Hi, dear all:

     I find some of the code (e.g. LTOCodeGenerator) in llvm return 
false on succ (we might as well
return 0 on succ as with many C code0); this is very confusing, 
counter-intuitive, and error-prone.
Things are even worse, if this piece of code call other modules with 
negated logic.

     In what situation should we use this negated logic? Is it 
deprecated now?  Can we toggle the logic
to the way we would normally take for granted?

Thanks in advance!
A senior newbie (just brazenly promote myself)



More information about the llvm-commits mailing list