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

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


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

  Changed paths:
    M clang/lib/CodeGen/CMakeLists.txt
    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
    M llvm/utils/gn/secondary/clang/lib/CodeGen/BUILD.gn

  Log Message:
  -----------
  Reland [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.

Previous revisions didn't properly declare the new dependencies.

Reviewed By: nickdesaulniers

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




More information about the All-commits mailing list