[llvm-commits] [llvm] r127922 - /llvm/trunk/lib/Transforms/Utils/Local.cpp
Devang Patel
dpatel at apple.com
Mon Mar 21 15:09:05 PDT 2011
On Mar 19, 2011, at 12:31 AM, Frits van Bommel wrote:
> On Sat, Mar 19, 2011 at 12:28 AM, Devang Patel <dpatel at apple.com> wrote:
>> - // We don't want debug info removed by anything this general.
>> + // We don't want debug info removed by anything this general, unless
>> + // debug info is empty.
>> + if (DbgDeclareInst *DDI = dyn_cast<DbgDeclareInst>(I)) {
>> + if (DDI->getAddress())
>> + return false;
>> + else
>> + return true;
>> + } else if (DbgValueInst *DVI = dyn_cast<DbgValueInst>(I)) {
>> + if (DVI->getValue())
>> + return false;
>> + else
>> + return true;
>> + }
>
> None of those three 'else's are needed, their 'then' cases all end in 'return'.
Done!
-
Devang
More information about the llvm-commits
mailing list