[PATCH] D122618: [Lint][Verifier] NFC: Rename 'Assert*' macros to 'Check*'.

Tom Honermann via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 28 14:36:09 PDT 2022


tahonermann created this revision.
Herald added subscribers: jeroen.dobbelaere, kosarev, hiraditya.
Herald added a project: All.
tahonermann added reviewers: bkramer, nikic, ibookstein, aeubanks.
tahonermann added subscribers: erichkeane, aaron.ballman.
tahonermann published this revision for review.
tahonermann added a comment.
Herald added subscribers: llvm-commits, aheejin.
Herald added a project: LLVM.

I've added some reviewers based on prior git history for the changed files. Please feel free to resign or nominate another reviewer!


The LLVM IR verifier and analysis linter defines and uses several macros in
code that performs validation of IR expectations. Previously, these macros
were named with an 'Assert' prefix. These names were misleading since the
macro definitions are not conditioned on build kind; they are defined
identically in builds that have asserts enabled and those that do not. This
was confusing since an LLVM developer might expect these macros to be
conditionally enabled as 'assert' is. Further confusion was possible since
the LLVM IR verifier is implicitly disabled (in Clang::ConstructJob()) for
builds without asserts enabled, but only for Clang driver invocations; not
for clang -cc1 invocations. This could make it appear that the macros were
not active for builds without asserts enabled, e.g. when investigating
behavior using the Clang driver, and thus lead to surprises when running
tests that exercise the clang -cc1 interface.

This change renames this set of macros as follows:

  Assert -> Check
  AssertDI -> CheckDI
  AssertTBAA -> CheckTBAA


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D122618

Files:
  llvm/lib/Analysis/Lint.cpp
  llvm/lib/IR/Verifier.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D122618.418705.patch
Type: text/x-patch
Size: 299713 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220328/e3a8b83f/attachment-0001.bin>


More information about the llvm-commits mailing list