commit c075a70cbe0896e588f8b4c4eb670ef1362c05e4
parent 1d5957cf764a556fb1cd02e090a7af85ffc663c5
Author: Kyle Milz <kyle@0x30.net>
Date: Thu, 12 Jan 2017 23:06:41 -0700
inst: move InstrumentActionFactory to more related header
Diffstat:
2 files changed, 23 insertions(+), 23 deletions(-)
diff --git a/inst_action.h b/inst_action.h
@@ -28,3 +28,26 @@ private:
bool m_is_citruninst;
std::string m_compiler_file_name;
};
+
+//
+// Needed because we pass custom stuff down into the ASTFrontendAction
+//
+class InstrumentActionFactory : public clang::tooling::FrontendActionFactory {
+public:
+ InstrumentActionFactory(InstrumentLogger &log, bool citruninst, std::vector<std::string> const &src_files) :
+ m_log(log),
+ m_is_citruninst(citruninst),
+ m_source_files(src_files),
+ m_i(0)
+ {};
+
+ clang::ASTFrontendAction *create() {
+ return new InstrumentAction(m_log, m_is_citruninst, m_source_files[m_i++]);
+ }
+
+private:
+ InstrumentLogger& m_log;
+ bool m_is_citruninst;
+ std::vector<std::string> m_source_files;
+ int m_i;
+};
diff --git a/inst_frontend.h b/inst_frontend.h
@@ -30,26 +30,3 @@ private:
std::vector<std::string> m_source_files;
std::map<std::string, std::string> m_temp_file_map;
};
-
-//
-// Needed because we pass custom stuff down into the ASTFrontendAction
-//
-class InstrumentActionFactory : public clang::tooling::FrontendActionFactory {
-public:
- InstrumentActionFactory(InstrumentLogger &log, bool citruninst, std::vector<std::string> const &src_files) :
- m_log(log),
- m_is_citruninst(citruninst),
- m_source_files(src_files),
- m_i(0)
- {};
-
- clang::ASTFrontendAction *create() {
- return new InstrumentAction(m_log, m_is_citruninst, m_source_files[m_i++]);
- }
-
-private:
- InstrumentLogger& m_log;
- bool m_is_citruninst;
- std::vector<std::string> m_source_files;
- int m_i;
-};