Commit 717bf221 authored by rmrf's avatar rmrf
Browse files

Successful compile with clang-7.0.0 but linking errors

parent e403f492
......@@ -58,7 +58,7 @@ endif(USE_SAUTO)
clangAnalysis
clangARCMigrate
clangRewriteFrontend
clangRewriteCore
clangRewrite
clangEdit
clangAST
clangLex
......
......@@ -21,16 +21,15 @@ using namespace scpar;
template < typename A > class PluginAction
{
public:
PluginAction (int argc, const char **argv
) {
CommonOptionsParser OptionsParser (argc, argv
);
PluginAction (int argc, const char **argv ) {
llvm::cl::OptionCategory category("systemc-clang options");
CommonOptionsParser OptionsParser (argc, argv, category );
ClangTool Tool (OptionsParser.getCompilations (),
OptionsParser.getSourcePathList ()
);
FrontendActionFactory *fe =
newFrontendActionFactory < LightsCameraAction < A > >();
Tool.run (fe);
//FrontendActionFactory *fe = newFrontendActionFactory < LightsCameraAction < A > >();
//Tool.run (fe);
Tool.run ( newFrontendActionFactory< LightsCameraAction<SystemCConsumer> >().get());
};
......
......@@ -202,6 +202,7 @@ void FindGPUMacro::dump(){
void FindGPUMacro::analyze_value_decl(ValueDecl *val) {
QualType type = val->getType();
/*
std::pair<uint64_t, unsigned> fieldInfo =
val->getASTContext().getTypeInfo(val->getType());
uint64_t typeSize = fieldInfo.first;
......@@ -211,6 +212,7 @@ void FindGPUMacro::analyze_value_decl(ValueDecl *val) {
<< ", size (bits): " << typeSize
<< ", align (bits): " << fieldAlign
<< "\n";
*/
}
void FindGPUMacro::analyze_array_base(Expr *base, bool isLHS) {
......
......@@ -288,9 +288,7 @@ void Transition::dump(raw_ostream & os)
}
////////////////////////////////////////////////////////////////////////////////////////
SuspensionAutomata::SuspensionAutomata(vector<WaitContainer*> waitCalls, CXXMethodDecl * d, ASTContext * a, raw_ostream & os):_d(d), _a(a), _os(os),
_cfg
(NULL)
SuspensionAutomata::SuspensionAutomata(vector<WaitContainer*> waitCalls, CXXMethodDecl * d, ASTContext * a, raw_ostream & os):_d(d), _a(a), _os(os)
{
for (int i = 0; i<waitCalls.size(); i++) {
......
......@@ -160,7 +160,7 @@ namespace scpar {
vector<CallExpr*> _waitCalls;
susCFGSuccIDMapType susCFGSuccIDMap;
susCFGStateMapType susCFGStateMap;
CFG *_cfg;
unique_ptr<CFG> _cfg;
ASTContext *_a;
raw_ostream & _os;
susCFGVectorType _susCFGVector;
......
......@@ -91,10 +91,10 @@ namespace scpar
{
protected:
virtual ASTConsumer * CreateASTConsumer(CompilerInstance & ci,
StringRef)
{
return new A(ci);
virtual std::unique_ptr<clang::ASTConsumer> CreateASTConsumer(CompilerInstance & ci, llvm::StringRef inFile) {
// virtual ASTConsumer * CreateASTConsumer(CompilerInstance & ci, StringRef) {
return std::unique_ptr<clang::ASTConsumer>(new SystemCConsumer(ci));
//return new A(ci);
};
}; // End class LightsCameraAction
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment