[llvm-commits] [llvm] r48289 - in /llvm/trunk: include/llvm/ include/llvm/Support/ lib/AsmParser/ lib/Bitcode/Reader/ lib/Bitcode/Writer/ lib/Target/CBackend/ lib/Target/X86/ lib/Transforms/IPO/ lib/Transforms/Scalar/ lib/VMCore/ tools/llvm-upgrade/ tools/llvm2cpp/

Chris Lattner sabre at nondot.org
Wed Mar 12 21:34:07 PDT 2008


>> +  /// getParamAttrs - Return the parameter attribute list for this  
>> invoke.
>
> "parameter attribute list" -> "parameter attributes"

Thanks Duncan, all fixed.

>> -    if (PAL) {
>> -      ParameterAttributes Attrs = PAL->getParamAttrs(ParamIndex);
>> -      if (Attrs != ParamAttr::None)
>> -         
>> ParamAttrsVec.push_back(ParamAttrsWithIndex::get(ParamIndex - 1,
>> -                                                         Attrs));
>> -    }
>> +    if (ParameterAttributes Attrs = PAL.getParamAttrs(ParamIndex))
>> +      ParamAttrsVec.push_back(ParamAttrsWithIndex::get(ParamIndex  
>> - 1, Attrs));
>
> So adding ParamAttr::None is harmless now?

No it isn't.  The if checks for none since ParamAttrs::None is zero.   
This idiom was used in other places in the code and is nice and terse,  
so I adopted it in a couple more places.

-Chris



More information about the llvm-commits mailing list