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

Erich Keane via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 24 11:02:50 PDT 2022


erichkeane added inline comments.


================
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
----------------
Perhaps worth making a separate release note for the change in format?  


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


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