[PATCH] D122248: [clang][CodeGen]Fix clang crash and add bitfield support in __builtin_dump_struct

Wang Yihan via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 24 11:18:48 PDT 2022


yihanaa marked an inline comment as done.
yihanaa added a comment.

Maybe add the changes under "Attribute Changes in Clang"?



================
Comment at: clang/docs/ReleaseNotes.rst:81
   `Issue 50541 <https://github.com/llvm/llvm-project/issues/50541>`_.
-
+- The builtin function __builtin_dump_struct would crash clang when the target 
+  struct have bitfield. Now it fixed, and __builtin_dump_struct support dump
----------------
erichkeane wrote:
> Perhaps worth making a separate release note for the change in format?  
Okay, Under which ReleaseNotes tag should I add? i can't think of a good idea 😂


================
Comment at: clang/lib/CodeGen/CGBuiltin.cpp:2093
+      // between type-name and ':'
+      if (!FD->getNameAsString().empty())
+        Format += ' ';
----------------
erichkeane wrote:
> This seems like a pretty expensive way to do this... Can you do this as `FD->getDeclName().empty()`?  
Okay


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D122248/new/

https://reviews.llvm.org/D122248



More information about the cfe-commits mailing list