From e7b9c6e2552a861a949585c38e2a881f5cdcb0a7 Mon Sep 17 00:00:00 2001 From: bloodstalker Date: Fri, 29 Nov 2019 16:05:42 +0330 Subject: added libwasm32 as a lua module to bruiser now. you can get a quick wasm dump like that. some updates here and there to the READMEs. there is also a gitter group now. come say hi.and join please. --- m0/mutator-lvl0.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'm0') diff --git a/m0/mutator-lvl0.cpp b/m0/mutator-lvl0.cpp index cdd625f..abbcb52 100644 --- a/m0/mutator-lvl0.cpp +++ b/m0/mutator-lvl0.cpp @@ -7638,12 +7638,20 @@ public: void EndSourceFileAction() override {} std::unique_ptr CreateASTConsumer(CompilerInstance &CI, StringRef file) override { +#if __clang_major__ <= 9 CI.getPreprocessor().addPPCallbacks(llvm::make_unique(&CI.getSourceManager())); +#elif __clang_major__ >= 10 + CI.getPreprocessor().addPPCallbacks(std::make_unique(&CI.getSourceManager())); +#endif DiagnosticsEngine &DiagEngine = CI.getPreprocessor().getDiagnostics(); Mutator0DiagnosticConsumer* M0DiagConsumer = new Mutator0DiagnosticConsumer; DiagEngine.setClient(M0DiagConsumer, true); TheRewriter.setSourceMgr(CI.getSourceManager(), CI.getLangOpts()); +#if __clang_major__ <= 9 return llvm::make_unique(TheRewriter); +#elif __clang_major__ >= 10 + return std::make_unique(TheRewriter); +#endif } private: -- cgit v1.2.3