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 {
353
353
Sema(const Sema &) = delete;
354
354
void operator=(const Sema &) = delete;
355
355
356
- /// A key method to reduce duplicate debug info from Sema.
357
- virtual void anchor();
358
-
359
356
///Source of additional semantic information.
360
357
ExternalSemaSource *ExternalSource;
361
358
@@ -1527,6 +1524,13 @@ class Sema final {
1527
1524
/// initialized but before it parses anything.
1528
1525
void Initialize();
1529
1526
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
+
1530
1534
const LangOptions &getLangOpts() const { return LangOpts; }
1531
1535
OpenCLOptions &getOpenCLOptions() { return OpenCLFeatures; }
1532
1536
FPOptions &getCurFPFeatures() { return CurFPFeatures; }
You can’t perform that action at this time.
0 commit comments