Also provide an out-of-line dtor for CompilerInvocation.
Cleanup work that may help reduce header inclusion for IntrusiveRefCntPtr.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@208512
91177308-0d34-0410-b5e6-
96231b3b80d8
/// the user. DiagnosticsEngine is tied to one translation unit and one
/// SourceManager.
class DiagnosticsEngine : public RefCountedBase<DiagnosticsEngine> {
+ DiagnosticsEngine(const DiagnosticsEngine &) LLVM_DELETED_FUNCTION;
+ void operator=(const DiagnosticsEngine &) LLVM_DELETED_FUNCTION;
+
public:
/// \brief The level of the diagnostic, after it has been through mapping.
enum Level {
DiagnosticsEngine *Diags = nullptr);
class CompilerInvocationBase : public RefCountedBase<CompilerInvocation> {
+ void operator=(const CompilerInvocationBase &) LLVM_DELETED_FUNCTION;
+
protected:
/// Options controlling the language variant.
IntrusiveRefCntPtr<LangOptions> LangOpts;
public:
CompilerInvocationBase();
+ ~CompilerInvocationBase();
CompilerInvocationBase(const CompilerInvocationBase &X);
case DeclarationName::CXXLiteralOperatorName: {
// FIXME: Was this added in VS2010? Does MS even know how to mangle this?
- DiagnosticsEngine Diags = Context.getDiags();
+ DiagnosticsEngine &Diags = Context.getDiags();
unsigned DiagID = Diags.getCustomDiagID(DiagnosticsEngine::Error,
"cannot mangle this literal operator yet");
Diags.Report(ND->getLocation(), DiagID);
}
if (const BlockDecl *BD = dyn_cast<BlockDecl>(DC)) {
- DiagnosticsEngine Diags = Context.getDiags();
+ DiagnosticsEngine &Diags = Context.getDiags();
unsigned DiagID =
Diags.getCustomDiagID(DiagnosticsEngine::Error,
"cannot mangle a local inside this block yet");
HeaderSearchOpts(new HeaderSearchOptions(X.getHeaderSearchOpts())),
PreprocessorOpts(new PreprocessorOptions(X.getPreprocessorOpts())) {}
+CompilerInvocationBase::~CompilerInvocationBase() {}
+
//===----------------------------------------------------------------------===//
// Deserialization (from args)
//===----------------------------------------------------------------------===//