[PATCH] Refactor: Simplify boolean expressions in llvm-nm

Richard legalize at xmission.com
Mon Mar 23 13:48:30 PDT 2015


In article <CAENS6EtScu6-nzsJk5V+O8J1LbgBpYtQeu9NtYrMJ-UQ0Kkw1g at mail.gmail.com>,
    David Blaikie <dblaikie at gmail.com> writes:

> If we changed the code to:
> 
> if (x)
>   return true;
> return false;
> 
> would it still trigger the cleanup check you're using?

Nope.

The tool explicitly looks for 'if (e) return true; else return false;'
and replaces that with 'return e;'
-- 
"The Direct3D Graphics Pipeline" free book <http://tinyurl.com/d3d-pipeline>
     The Computer Graphics Museum <http://ComputerGraphicsMuseum.org>
         The Terminals Wiki <http://terminals.classiccmp.org>
  Legalize Adulthood! (my blog) <http://LegalizeAdulthood.wordpress.com>



More information about the llvm-commits mailing list