File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -353,9 +353,6 @@ class Sema final {
353353 Sema(const Sema &) = delete;
354354 void operator=(const Sema &) = delete;
355355
356- /// A key method to reduce duplicate debug info from Sema.
357- virtual void anchor();
358-
359356 ///Source of additional semantic information.
360357 ExternalSemaSource *ExternalSource;
361358
@@ -1527,6 +1524,13 @@ class Sema final {
15271524 /// initialized but before it parses anything.
15281525 void Initialize();
15291526
1527+ /// This virtual key function only exists to limit the emission of debug info
1528+ /// describing the Sema class. GCC and Clang only emit debug info for a class
1529+ /// with a vtable when the vtable is emitted. Sema is final and not
1530+ /// polymorphic, but the debug info size savings are so significant that it is
1531+ /// worth adding a vtable just to take advantage of this optimization.
1532+ virtual void anchor();
1533+
15301534 const LangOptions &getLangOpts() const { return LangOpts; }
15311535 OpenCLOptions &getOpenCLOptions() { return OpenCLFeatures; }
15321536 FPOptions &getCurFPFeatures() { return CurFPFeatures; }
You can’t perform that action at this time.
0 commit comments