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