[all-commits] [llvm/llvm-project] 294307: [clang] Rework dontcall attributes

aeubanks via All-commits all-commits at lists.llvm.org
Tue Sep 28 14:21:43 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 2943071e2ee0c7f31f34062a44d12aeb0e3a66fd
      https://github.com/llvm/llvm-project/commit/2943071e2ee0c7f31f34062a44d12aeb0e3a66fd
  Author: Arthur Eubanks <aeubanks at google.com>
  Date:   2021-09-28 (Tue, 28 Sep 2021)

  Changed paths:
    M clang/lib/CodeGen/CodeGenAction.cpp
    M clang/lib/CodeGen/CodeGenModule.cpp
    M clang/test/CodeGen/attr-error.c
    M clang/test/CodeGen/attr-warning.c
    M clang/test/Frontend/backend-attribute-error-warning-optimize.c
    M clang/test/Frontend/backend-attribute-error-warning.c
    A clang/test/Frontend/backend-attribute-error-warning.cpp
    M llvm/docs/LangRef.rst
    M llvm/include/llvm/IR/DiagnosticInfo.h
    M llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp
    M llvm/lib/CodeGen/SelectionDAG/FastISel.cpp
    M llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
    M llvm/lib/IR/DiagnosticInfo.cpp
    M llvm/test/CodeGen/X86/attr-dontcall.ll
    M llvm/test/ThinLTO/X86/dontcall.ll

  Log Message:
  -----------
  [clang] Rework dontcall attributes

To avoid using the AST when emitting diagnostics, split the "dontcall"
attribute into "dontcall-warn" and "dontcall-error", and also add the
frontend attribute value as the LLVM attribute value. This gives us all
the information to report diagnostics we need from within the IR (aside
from access to the original source).

One downside is we directly use LLVM's demangler rather than using the
existing Clang diagnostic pretty printing of symbols.

Reviewed By: nickdesaulniers

Differential Revision: https://reviews.llvm.org/D110364




More information about the All-commits mailing list