Fix for PR4642: move work in HTMLPrinter out of the destructor.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91205 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Frontend/HTMLPrint.cpp b/lib/Frontend/HTMLPrint.cpp
index 75e6184..9ea8cb3 100644
--- a/lib/Frontend/HTMLPrint.cpp
+++ b/lib/Frontend/HTMLPrint.cpp
@@ -41,9 +41,9 @@
bool _SyntaxHighlight, bool _HighlightMacros)
: Out(OS), PP(pp), SyntaxHighlight(_SyntaxHighlight),
HighlightMacros(_HighlightMacros) {}
- virtual ~HTMLPrinter();
void Initialize(ASTContext &context);
+ void HandleTranslationUnit(ASTContext &Ctx);
};
}
@@ -58,7 +58,7 @@
R.setSourceMgr(context.getSourceManager(), context.getLangOptions());
}
-HTMLPrinter::~HTMLPrinter() {
+void HTMLPrinter::HandleTranslationUnit(ASTContext &Ctx) {
if (PP.getDiagnostics().hasErrorOccurred())
return;