Kaydet (Commit) 311fb9d5 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Adapt compilerplugins to Clang trunk towards 3.6

Change-Id: I0b7be1616a3e4206982f9f925de141ed9d53b96e
üst 6d5e6907
......@@ -241,10 +241,17 @@ void PluginHandler::HandleTranslationUnit( ASTContext& context )
}
}
#if (__clang_major__ == 3 && __clang_minor__ >= 6) || __clang_major__ > 3
std::unique_ptr<ASTConsumer> LibreOfficeAction::CreateASTConsumer( CompilerInstance& Compiler, StringRef )
{
return make_unique<PluginHandler>( Compiler, _args );
}
#else
ASTConsumer* LibreOfficeAction::CreateASTConsumer( CompilerInstance& Compiler, StringRef )
{
return new PluginHandler( Compiler, _args );
}
#endif
bool LibreOfficeAction::ParseArgs( const CompilerInstance&, const vector< string >& args )
{
......
......@@ -54,7 +54,12 @@ class LibreOfficeAction
: public PluginASTAction
{
public:
#if (__clang_major__ == 3 && __clang_minor__ >= 6) || __clang_major__ > 3
virtual std::unique_ptr<ASTConsumer> CreateASTConsumer( CompilerInstance& Compiler, StringRef InFile );
#else
virtual ASTConsumer* CreateASTConsumer( CompilerInstance& Compiler, StringRef InFile );
#endif
virtual bool ParseArgs( const CompilerInstance& CI, const vector< string >& args );
private:
vector< string > _args;
......
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