[PATCH] D121961: [clang] Produce a "multiversion" annotation in textual AST output.

Tom Honermann via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 17 14:53:16 PDT 2022


tahonermann created this revision.
tahonermann added reviewers: erichkeane, aaron.ballman.
Herald added a project: All.
tahonermann published this revision for review.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

This change adds a "multiversion" annotation to textual AST output.
For example:

  FunctionDecl 0xb6628b0 <t.c:1:1, col:13> col:5 multiversion foo 'int (void)'


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D121961

Files:
  clang/lib/AST/TextNodeDumper.cpp


Index: clang/lib/AST/TextNodeDumper.cpp
===================================================================
--- clang/lib/AST/TextNodeDumper.cpp
+++ clang/lib/AST/TextNodeDumper.cpp
@@ -283,6 +283,8 @@
       OS << " constexpr";
     if (FD->isConsteval())
       OS << " consteval";
+    if (FD->isMultiVersion())
+      OS << " multiversion";
   }
 
   if (!isa<FunctionDecl>(*D)) {


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D121961.416326.patch
Type: text/x-patch
Size: 385 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220317/55e7755d/attachment.bin>


More information about the cfe-commits mailing list