[all-commits] [llvm/llvm-project] 00797b: [InlineAsm] Improve error messages for invalid con...

Nikita Popov via All-commits all-commits at lists.llvm.org
Tue Jul 12 02:41:35 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 00797b88e0113aeea03045b18b3f63332f850dfe
      https://github.com/llvm/llvm-project/commit/00797b88e0113aeea03045b18b3f63332f850dfe
  Author: Nikita Popov <npopov at redhat.com>
  Date:   2022-07-12 (Tue, 12 Jul 2022)

  Changed paths:
    M llvm/include/llvm/IR/InlineAsm.h
    M llvm/lib/AsmParser/LLParser.cpp
    M llvm/lib/IR/InlineAsm.cpp
    R llvm/test/Assembler/inline-asm-clobber.ll
    A llvm/test/Assembler/inline-asm-constraint-error.ll
    M llvm/test/Assembler/invalid-inline-constraint.ll

  Log Message:
  -----------
  [InlineAsm] Improve error messages for invalid constraint strings

InlineAsm constraint string verification can fail for many reasons,
but used to always print a generic "invalid type for inline asm
constraint string" message -- which is especially confusing if
the actual error is unrelated to the type, e.g. a failure to parse
the constraint string.

Change the verify API to return an Error with a more specific
error message, and print that in the IR parser.




More information about the All-commits mailing list