citrun

watch C/C++ source code execute
Log | Files | Refs | LICENSE

commit 38ba5f3fb08d0622d55165d5fef7541dcd766f65
parent 42c136fb7c54b0a02f3eff41ae81a319b8d1927e
Author: Kyle Milz <kyle@0x30.net>
Date:   Wed, 27 Jul 2016 20:38:46 -0600

src: remove LLVM_VER

Diffstat:
MJamrules | 7+------
Msrc/Jamfile | 1-
Msrc/inst_action.cc | 8--------
Msrc/inst_action.h | 4----
Msrc/inst_main.cc | 4----
5 files changed, 1 insertion(+), 23 deletions(-)

diff --git a/Jamrules b/Jamrules @@ -18,24 +18,19 @@ C++FLAGS += -std=c++11 ; if $(OS) = OPENBSD { C++ = eg++ ; - LLVM_VER = 38 ; - PKG_CONFIG_LIBS = gl glew freetype2 ; LINKLIBS on citrun-gl = -lestdc++ -lm -lglut ; LINKLIBS on citrun-inst = -lestdc++ ; } if $(OS) = MACOSX { - LLVM_VER = 37 ; - PKG_CONFIG_LIBS = glew freetype2 ; LINKLIBS on citrun-gl = -framework OpenGL -framework GLUT -lc++ -lm ; LINKLIBS on citrun-inst = -lc++ ; } if $(OS) = LINUX { - LLVM_VER = 35 ; - + # llvm version is 3.5 on Debian, which is too old. PKG_CONFIG_LIBS = gl glew freetype2 ; LINKLIBS on citrun-gl = -lbsd -lstdc++ -lm -lglut ; LINKLIBS on citrun-inst = -lstdc++ -lbsd ; diff --git a/src/Jamfile b/src/Jamfile @@ -57,7 +57,6 @@ Stringize runtime_h.h : $(TOP)/lib/runtime.h ; ObjectC++Flags $(INST_SRCS) : `llvm-config --cxxflags` ; ObjectC++Flags $(INST_SRCS) : -DCITRUN_LIB=$(CITRUN_LIB) -DCITRUN_PATH=$(CITRUN_PATH) ; -ObjectC++Flags $(INST_SRCS) : -DLLVM_VER=$(LLVM_VER) ; LINKFLAGS on citrun-inst = `llvm-config --ldflags` ; diff --git a/src/inst_action.cc b/src/inst_action.cc @@ -23,11 +23,7 @@ #include "inst_action.h" #include "runtime_h.h" -#if LLVM_VER > 35 std::unique_ptr<clang::ASTConsumer> -#else -clang::ASTConsumer * -#endif InstrumentAction::CreateASTConsumer(clang::CompilerInstance &CI, clang::StringRef file) { // llvm::errs() << "** Creating AST consumer for: " << file << "\n"; @@ -36,11 +32,7 @@ InstrumentAction::CreateASTConsumer(clang::CompilerInstance &CI, clang::StringRe // Hang onto a reference to this so we can read from it later InstrumentASTConsumer = new RewriteASTConsumer(TheRewriter); -#if LLVM_VER > 35 return std::unique_ptr<clang::ASTConsumer>(InstrumentASTConsumer); -#else - return InstrumentASTConsumer; -#endif } void diff --git a/src/inst_action.h b/src/inst_action.h @@ -45,11 +45,7 @@ public: InstrumentAction() {}; void EndSourceFileAction() override; -#if LLVM_VER > 35 std::unique_ptr<clang::ASTConsumer> CreateASTConsumer(clang::CompilerInstance &, clang::StringRef) override; -#else - clang::ASTConsumer *CreateASTConsumer(clang::CompilerInstance &, clang::StringRef) override; -#endif private: clang::Rewriter TheRewriter; diff --git a/src/inst_main.cc b/src/inst_main.cc @@ -106,11 +106,7 @@ instrument(int argc, char *argv[], std::vector<std::string> const &source_files) // that will return a new MyFrontendAction object every time. To // further customize this, we could create our own factory class. // int ret = Tool.run(new MFAF(inst_files)); -#if LLVM_VER > 34 int ret = Tool.run(&(*clang::tooling::newFrontendActionFactory<InstrumentAction>())); -#else - int ret = Tool.run(clang::tooling::newFrontendActionFactory<InstrumentAction>()); -#endif return ret; }