Zonr Chang | 3a9ca1f | 2010-10-06 17:52:56 +0800 | [diff] [blame] | 1 | #ifndef _SLANG_COMPILER_SLANG_RS_HPP |
| 2 | #define _SLANG_COMPILER_SLANG_RS_HPP |
| 3 | |
| 4 | #include "slang.h" |
| 5 | |
| 6 | namespace slang { |
| 7 | class RSContext; |
| 8 | |
| 9 | class SlangRS : public Slang { |
| 10 | private: |
| 11 | // Context for RenderScript |
| 12 | RSContext *mRSContext; |
| 13 | |
| 14 | bool mAllowRSPrefix; |
| 15 | |
| 16 | protected: |
| 17 | virtual void initDiagnostic(); |
| 18 | virtual void initPreprocessor(); |
| 19 | virtual void initASTContext(); |
| 20 | |
| 21 | virtual clang::ASTConsumer |
| 22 | *createBackend(const clang::CodeGenOptions& CodeGenOpts, |
| 23 | llvm::raw_ostream *OS, |
| 24 | Slang::OutputType OT); |
| 25 | |
| 26 | |
| 27 | public: |
Zonr Chang | 592a954 | 2010-10-07 20:03:58 +0800 | [diff] [blame^] | 28 | static bool IsRSHeaderFile(const char *File); |
| 29 | |
Zonr Chang | 3a9ca1f | 2010-10-06 17:52:56 +0800 | [diff] [blame] | 30 | SlangRS(const char *Triple, const char *CPU, const char **Features); |
| 31 | |
| 32 | // The package name that's really applied will be filled in |
| 33 | // RealPackageNameBuf. BufSize is the size of buffer RealPackageNameBuf. |
| 34 | bool reflectToJava(const char *outputPackageName, |
| 35 | char *RealPackageNameBuf, int BufSize); |
| 36 | bool reflectToJavaPath(const char *OutputPathName); |
| 37 | |
| 38 | inline void allowRSPrefix(bool V = true) { mAllowRSPrefix = V; } |
| 39 | |
| 40 | virtual ~SlangRS(); |
| 41 | }; |
| 42 | } |
| 43 | |
| 44 | #endif // _SLANG_COMPILER_SLANG_RS_HPP |