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. --- bruiser/bruiser.cpp | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'bruiser/bruiser.cpp') diff --git a/bruiser/bruiser.cpp b/bruiser/bruiser.cpp index 440e72c..dcf3e30 100644 --- a/bruiser/bruiser.cpp +++ b/bruiser/bruiser.cpp @@ -897,7 +897,11 @@ public: DiagnosticsEngine &DE = CI.getPreprocessor().getDiagnostics(); DE.setClient(BDCProto, false); 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: @@ -919,7 +923,11 @@ class LiveActionListVars : public ASTFrontendAction { DiagnosticsEngine &DE = CI.getPreprocessor().getDiagnostics(); DE.setClient(BDCProto, false); 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: @@ -940,7 +948,11 @@ class LiveActionListFuncs : public ASTFrontendAction { DiagnosticsEngine &DE = CI.getPreprocessor().getDiagnostics(); DE.setClient(BDCProto, false); 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: @@ -961,7 +973,11 @@ class LiveActionListStructs : public ASTFrontendAction { DiagnosticsEngine &DE = CI.getPreprocessor().getDiagnostics(); DE.setClient(BDCProto, false); 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: @@ -982,7 +998,11 @@ class LiveActionListClasses : public ASTFrontendAction { DiagnosticsEngine &DE = CI.getPreprocessor().getDiagnostics(); DE.setClient(BDCProto, false); 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: @@ -1003,7 +1023,11 @@ class LiveActionListUnions : public ASTFrontendAction { DiagnosticsEngine &DE = CI.getPreprocessor().getDiagnostics(); DE.setClient(BDCProto, false); 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: @@ -1024,7 +1048,11 @@ class LiveActionListArrays : public ASTFrontendAction { DiagnosticsEngine &DE = CI.getPreprocessor().getDiagnostics(); DE.setClient(BDCProto, false); 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: @@ -2290,6 +2318,7 @@ class RunLoop { } } + char* prv_command; /*cli execution loop*/ while((command = linenoise(">>>")) != NULL) { //FIXME-if the current command is the same as last command skip adding to history @@ -2297,6 +2326,7 @@ class RunLoop { linenoiseHistorySave(SHELL_HISTORY_FILE.c_str()); le.RunChunk(command); linenoiseFree(command); + //prv_commnad = command; } return 0; } -- cgit v1.2.3