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;
/// initialized but before it parses anything.
void Initialize();
+ /// This virtual key function only exists to limit the emission of debug info
+ /// describing the Sema class. GCC and Clang only emit debug info for a class
+ /// with a vtable when the vtable is emitted. Sema is final and not
+ /// polymorphic, but the debug info size savings are so significant that it is
+ /// worth adding a vtable just to take advantage of this optimization.
+ virtual void anchor();
+
const LangOptions &getLangOpts() const { return LangOpts; }
OpenCLOptions &getOpenCLOptions() { return OpenCLFeatures; }
FPOptions &getCurFPFeatures() { return CurFPFeatures; }