[PATCH] D110364: [clang] Rework dontcall attributes

Arthur Eubanks via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 28 11:30:35 PDT 2021


aeubanks created this revision.
Herald added subscribers: ormris, dexonsmith, jdoerfert, pengfei, steven_wu, hiraditya.
aeubanks updated this revision to Diff 374663.
aeubanks added a comment.
aeubanks added reviewers: dblaikie, nickdesaulniers.
aeubanks published this revision for review.
Herald added projects: clang, LLVM.
Herald added subscribers: llvm-commits, cfe-commits.

update


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.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D110364

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D110364.374663.patch
Type: text/x-patch
Size: 19879 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210928/fdee4ddb/attachment-0001.bin>


More information about the cfe-commits mailing list