rnk updated this revision to Diff 230130. rnk added a comment. - add final, tweak comment
Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70340/new/ https://reviews.llvm.org/D70340 Files: clang/include/clang/Sema/Sema.h clang/lib/Sema/Sema.cpp Index: clang/lib/Sema/Sema.cpp =================================================================== --- clang/lib/Sema/Sema.cpp +++ clang/lib/Sema/Sema.cpp @@ -189,6 +189,9 @@ SemaPPCallbackHandler->set(*this); } +// Anchor Sema's type info to this TU. +void Sema::anchor() {} + void Sema::addImplicitTypedef(StringRef Name, QualType T) { DeclarationName DN = &Context.Idents.get(Name); if (IdResolver.begin(DN) == IdResolver.end()) Index: clang/include/clang/Sema/Sema.h =================================================================== --- clang/include/clang/Sema/Sema.h +++ clang/include/clang/Sema/Sema.h @@ -328,10 +328,13 @@ }; /// Sema - This implements semantic analysis and AST building for C. -class Sema { +class Sema final { Sema(const Sema &) = delete; void operator=(const Sema &) = delete; + /// A key method to reduce duplicate debug info from Sema. + virtual void anchor(); + ///Source of additional semantic information. ExternalSemaSource *ExternalSource;
Index: clang/lib/Sema/Sema.cpp =================================================================== --- clang/lib/Sema/Sema.cpp +++ clang/lib/Sema/Sema.cpp @@ -189,6 +189,9 @@ SemaPPCallbackHandler->set(*this); } +// Anchor Sema's type info to this TU. +void Sema::anchor() {} + void Sema::addImplicitTypedef(StringRef Name, QualType T) { DeclarationName DN = &Context.Idents.get(Name); if (IdResolver.begin(DN) == IdResolver.end()) Index: clang/include/clang/Sema/Sema.h =================================================================== --- clang/include/clang/Sema/Sema.h +++ clang/include/clang/Sema/Sema.h @@ -328,10 +328,13 @@ }; /// Sema - This implements semantic analysis and AST building for C. -class Sema { +class Sema final { Sema(const Sema &) = delete; void operator=(const Sema &) = delete; + /// A key method to reduce duplicate debug info from Sema. + virtual void anchor(); + ///Source of additional semantic information. ExternalSemaSource *ExternalSource;
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits