[all-commits] [llvm/llvm-project] 5e4b33: [Verifier] Improve incompatible attribute type check

Nikita Popov via All-commits all-commits at lists.llvm.org
Wed Jul 14 12:02:30 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 5e4b33fe9218703f0b29e2446159bcf4202d15fa
      https://github.com/llvm/llvm-project/commit/5e4b33fe9218703f0b29e2446159bcf4202d15fa
  Author: Nikita Popov <nikita.ppv at gmail.com>
  Date:   2021-07-14 (Wed, 14 Jul 2021)

  Changed paths:
    M llvm/lib/IR/Attributes.cpp
    M llvm/lib/IR/Verifier.cpp
    M llvm/test/Verifier/align.ll
    M llvm/test/Verifier/byref.ll
    M llvm/test/Verifier/byval-1.ll
    M llvm/test/Verifier/inalloca1.ll
    M llvm/test/Verifier/noundef.ll
    M llvm/test/Verifier/preallocated-invalid.ll
    M llvm/test/Verifier/sret.ll
    M llvm/test/Verifier/swifterror.ll

  Log Message:
  -----------
  [Verifier] Improve incompatible attribute type check

A couple of attributes had explicit checks for incompatibility
with pointer types. However, this is already handled generically
by the typeIncompatible() check. We can drop these after adding
SwiftError to typeIncompatible().

However, the previous implementation of the check prints out all
attributes that are incompatible with a given type, even though
those attributes aren't actually used. This has the annoying
result that the error message changes every time a new attribute
is added to the list. Improve this by explicitly finding which
attribute isn't compatible and printing just that.




More information about the All-commits mailing list