[PATCH] D122670: [Clang][CodeGen]Remove anonymous tag locations
Wang Yihan via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Mar 29 10:55:41 PDT 2022
yihanaa updated this revision to Diff 418929.
yihanaa added a comment.
Add this change into ReleaseNotes.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D122670/new/
https://reviews.llvm.org/D122670
Files:
clang/docs/ReleaseNotes.rst
clang/lib/CodeGen/CGBuiltin.cpp
Index: clang/lib/CodeGen/CGBuiltin.cpp
===================================================================
--- clang/lib/CodeGen/CGBuiltin.cpp
+++ clang/lib/CodeGen/CGBuiltin.cpp
@@ -2050,8 +2050,10 @@
RecordDecl *RD = RType->castAs<RecordType>()->getDecl()->getDefinition();
std::string Pad = std::string(Lvl * 4, ' ');
+ PrintingPolicy Policy(Context.getLangOpts());
+ Policy.AnonymousTagLocations = false;
Value *GString =
- CGF.Builder.CreateGlobalStringPtr(RType.getAsString() + " {\n");
+ CGF.Builder.CreateGlobalStringPtr(RType.getAsString(Policy) + " {\n");
Value *Res = CGF.Builder.CreateCall(Func, {GString});
static llvm::DenseMap<QualType, const char *> Types;
Index: clang/docs/ReleaseNotes.rst
===================================================================
--- clang/docs/ReleaseNotes.rst
+++ clang/docs/ReleaseNotes.rst
@@ -116,6 +116,7 @@
- Improve __builtin_dump_struct:
- Support bitfields in struct and union.
- Improve the dump format, dump both bitwidth(if its a bitfield) and field value.
+ - Remove anonymous tag locations.
New Compiler Flags
------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D122670.418929.patch
Type: text/x-patch
Size: 1133 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220329/440f2ba9/attachment.bin>
More information about the cfe-commits
mailing list