[all-commits] [llvm/llvm-project] 6dcd9f: [Attributes] Merge calls to getFnAttribute/hasFnAt...

topperc via All-commits all-commits at lists.llvm.org
Sat Aug 29 00:24:10 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 6dcd9f517e96a0ed418539b55decd10aae014752
      https://github.com/llvm/llvm-project/commit/6dcd9f517e96a0ed418539b55decd10aae014752
  Author: Craig Topper <craig.topper at intel.com>
  Date:   2020-08-29 (Sat, 29 Aug 2020)

  Changed paths:
    M llvm/lib/IR/Attributes.cpp

  Log Message:
  -----------
  [Attributes] Merge calls to getFnAttribute/hasFnAttribute using Attribute::isValid. NFC

Rather than calling hasFnAttribute and then calling getFnAttribute
if the attribute exists, its better to just call getFnAttribute and
then check if we got a valid attribute back.




More information about the All-commits mailing list