diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2013-08-06 17:57:45 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2013-08-06 17:59:09 +0200 |
commit | 653cdcf50c760ac026931c156c69cdc791a6f0f5 (patch) | |
tree | ec2047b75b051e42c1f03464c5378ed0be663d37 /compilerplugins/clang/plugin.hxx | |
parent | fix android/ios defaults for report builder. (diff) | |
download | core-653cdcf50c760ac026931c156c69cdc791a6f0f5.tar.gz core-653cdcf50c760ac026931c156c69cdc791a6f0f5.zip |
error: cannot use dynamic_cast with -fno-rtti
...with recent Clang trunk towards 3.4
Change-Id: Ie0991c7bd560c30551aeaada426382a889b46391
Diffstat (limited to 'compilerplugins/clang/plugin.hxx')
-rw-r--r-- | compilerplugins/clang/plugin.hxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/compilerplugins/clang/plugin.hxx b/compilerplugins/clang/plugin.hxx index 56dee27ef913..0b6cb1f693ff 100644 --- a/compilerplugins/clang/plugin.hxx +++ b/compilerplugins/clang/plugin.hxx @@ -47,6 +47,7 @@ class Plugin virtual ~Plugin(); virtual void run() = 0; template< typename T > class Registration; + enum { isPPCallback = false }; DiagnosticBuilder report( DiagnosticsEngine::Level level, StringRef message, SourceLocation loc = SourceLocation()); static DiagnosticBuilder report( DiagnosticsEngine::Level level, StringRef message, CompilerInstance& compiler, SourceLocation loc = SourceLocation()); @@ -62,7 +63,7 @@ class Plugin const Stmt* parentStmt( const Stmt* stmt ); Stmt* parentStmt( Stmt* stmt ); private: - static void registerPlugin( Plugin* (*create)( CompilerInstance&, Rewriter& ), const char* optionName, bool isRewriter ); + static void registerPlugin( Plugin* (*create)( CompilerInstance&, Rewriter& ), const char* optionName, bool isRewriter, bool isPPCallback ); template< typename T > static Plugin* createHelper( CompilerInstance& compiler, Rewriter& rewriter ); enum { isRewriter = false }; static unordered_map< const Stmt*, const Stmt* > parents; @@ -186,7 +187,7 @@ template< typename T > inline Plugin::Registration< T >::Registration( const char* optionName ) { - registerPlugin( &T::template createHelper< T >, optionName, T::isRewriter ); + registerPlugin( &T::template createHelper< T >, optionName, T::isRewriter, T::isPPCallback ); } } // namespace |