[llvm-commits] [llvm] r55711 - /llvm/trunk/lib/Transforms/IPO/InlineSimple.cpp
Chris Lattner
clattner at apple.com
Sun Sep 21 12:35:35 PDT 2008
On Sep 3, 2008, at 12:54 PM, Bill Wendling wrote:
> On Wed, Sep 3, 2008 at 11:46 AM, Devang Patel <dpatel at apple.com>
> wrote:
>> --- llvm/trunk/lib/Transforms/IPO/InlineSimple.cpp (original)
>> +++ llvm/trunk/lib/Transforms/IPO/InlineSimple.cpp Wed Sep 3
>> 13:46:35 2008
>> @@ -65,7 +65,7 @@
>>
>> for (Module::iterator I = M.begin(), E = M.end();
>> I != E; ++I)
>> - if (!I->isDeclaration() && I->getNotes() == FN_NOTE_NoInline)
>> + if (!I->isDeclaration() && I->getNotes() & FN_NOTE_NoInline)
>
> I know that this is technically correct, but could you put parentheses
> around the bitwise "and"? It makes it more readable if you don't have
> the C operator precedence table memorized. :-)
Better yet, please add a new "hasNote(FN_NOTE_NoInline)" method. This
means callers won't have to do logical operations like this. Using
logical operations exposes implementation details of notes that should
be private.
-Chris
More information about the llvm-commits
mailing list