================
@@ -5083,15 +5083,17 @@ class Sema final : public SemaBase {
return true;
}
- /// WeakTopLevelDecl - Translation-unit scoped declarations generated by
- /// \#pragma weak during processing of other Decls.
- /// I couldn't figure out a clean way to generate these in-line, so
- /// we store them here and handle separately -- which is a hack.
- /// It would be best to refactor this.
- SmallVector<Decl *, 2> WeakTopLevelDecl;
-
- /// WeakTopLevelDeclDecls - access to \#pragma weak-generated Decls
- SmallVectorImpl<Decl *> &WeakTopLevelDecls() { return WeakTopLevelDecl; }
+ /// SynthesizedTopLevelDecls - Synthesized translation unit level
+ /// declarations generated during semantic analysis. These are
+ /// separately recorded and emitted after all other declarations.
+ SmallVector<Decl *, 2> SynthesizedTopLevelDecls;
+
+ void addSynthesizedTopLevelDecl(Decl *D) {
+ SynthesizedTopLevelDecls.push_back(D);
+ }
+ SmallVectorImpl<Decl *> &getSynthesizedTopLevelDecls() {
----------------
tahonermann wrote:
Yes! Thank you! Done in
https://github.com/llvm/llvm-project/pull/208958/changes/1b5c185b8fe602ba9677c676b752a8b775231aa9.
https://github.com/llvm/llvm-project/pull/208958
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits