PluginAction.h 1.21 KB
Newer Older
Anirudh Kaushik's avatar
Anirudh Kaushik committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
//===-- src/PluginAction.h - systec-clang class definition -------*- C++ -*-===//
//
//                     systemc-clang: SystemC Parser
//
// This file is distributed under the TBD
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
///
/// \file
/// \brief This file contains the class for defining basic plugin actions.
///
//===----------------------------------------------------------------------===//
#ifndef _PLUGIN_ACTION_H_
#define _PLUGIN_ACTION_H_

#include "SystemCClang.h"

using namespace scpar;

template < typename A > class PluginAction
{
public:
24
25
26
	PluginAction (int argc, const char **argv ) {
      llvm::cl::OptionCategory category("systemc-clang options");
		CommonOptionsParser OptionsParser (argc, argv, category );
Anirudh Kaushik's avatar
Anirudh Kaushik committed
27
28
29
		ClangTool Tool (OptionsParser.getCompilations (),
										OptionsParser.getSourcePathList ()
		);
30
31
		//FrontendActionFactory *fe = newFrontendActionFactory < LightsCameraAction < A > >();
		//Tool.run (fe);
32
33
		//Tool.run ( newFrontendActionFactory< LightsCameraAction<SystemCConsumer> >().get());
    Tool.run ( newFrontendActionFactory< LightsCameraAction<A> >().get());
Anirudh Kaushik's avatar
Anirudh Kaushik committed
34
35
36
37
38
39
40
41
42

	};


private:

};

#endif /* _PLUGIN_ACTION_H_ */