blob: dfee4c9034743fae40a6cd645b3357a458e3d3e9 [file] [log] [blame]
Zonr Chang3a9ca1f2010-10-06 17:52:56 +08001#ifndef _SLANG_COMPILER_SLANG_RS_HPP
2#define _SLANG_COMPILER_SLANG_RS_HPP
3
4#include "slang.h"
5
6namespace slang {
7 class RSContext;
8
9class 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 Chang592a9542010-10-07 20:03:58 +080028 static bool IsRSHeaderFile(const char *File);
29
Shih-wei Liaob81c6a42010-10-10 14:15:00 -070030 SlangRS(const std::string &Triple, const std::string &CPU,
31 const std::vector<std::string> &Features);
Zonr Chang3a9ca1f2010-10-06 17:52:56 +080032
Shih-wei Liaob81c6a42010-10-10 14:15:00 -070033 // The package name that's really applied will be filled in RealPackageName.
34 bool reflectToJava(const std::string &OutputPathBase,
35 const std::string &OutputPackageName,
36 std::string *RealPackageName);
37
38 virtual void reset();
Zonr Chang3a9ca1f2010-10-06 17:52:56 +080039
40 inline void allowRSPrefix(bool V = true) { mAllowRSPrefix = V; }
41
42 virtual ~SlangRS();
43};
44}
45
46#endif // _SLANG_COMPILER_SLANG_RS_HPP