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 ------------------
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 ------------------
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits