/frameworks/compile/slang/ |
H A D | slang_rs_object_ref_count.cpp | 21 #include "clang/AST/DeclGroup.h" 22 #include "clang/AST/Expr.h" 23 #include "clang/AST/NestedNameSpecifier.h" 24 #include "clang/AST/OperationKinds.h" 25 #include "clang/AST/Stmt.h" 26 #include "clang/AST/StmtVisitor.h" 38 clang::FunctionDecl * 40 clang::FunctionDecl * 43 void RSObjectRefCount::GetRSRefCountingFunctions(clang::ASTContext &C) { 49 clang [all...] |
H A D | slang_rs_ast_replace.h | 20 #include "clang/AST/StmtVisitor.h" 23 #include "clang/AST/ASTContext.h" 25 namespace clang { namespace 33 class RSASTReplace : public clang::StmtVisitor<RSASTReplace> { 35 clang::ASTContext &C; 36 clang::Stmt *mOuterStmt; 37 clang::Stmt *mOldStmt; 38 clang::Stmt *mNewStmt; 39 clang::Expr *mOldExpr; 40 clang [all...] |
H A D | slang_rs_object_ref_count.h | 23 #include "clang/AST/StmtVisitor.h" 28 namespace clang { namespace 45 class RSObjectRefCount : public clang::StmtVisitor<RSObjectRefCount> { 49 clang::CompoundStmt *mCS; // Associated compound statement ({ ... }) 50 std::list<clang::VarDecl*> mRSO; // Declared RS objects in this scope 53 explicit Scope(clang::CompoundStmt *CS) : mCS(CS) { 56 inline void addRSObject(clang::VarDecl* VD) { 60 void ReplaceRSObjectAssignment(clang::BinaryOperator *AS); 62 void AppendRSObjectInit(clang::VarDecl *VD, 63 clang [all...] |
H A D | slang_rs_check_ast.h | 22 #include "clang/AST/ASTContext.h" 23 #include "clang/AST/StmtVisitor.h" 30 class RSCheckAST : public clang::StmtVisitor<RSCheckAST> { 33 clang::ASTContext &C; 34 clang::SourceManager &mSM; 46 void WarnOnSetElementAt(clang::CallExpr*); 60 void VisitStmt(clang::Stmt *S); 62 void VisitCallExpr(clang::CallExpr *CE); 64 void VisitCastExpr(clang::CastExpr *CE); 66 void VisitExpr(clang [all...] |
H A D | slang_rs_pragma_handler.h | 22 #include "clang/Lex/Pragma.h" 24 namespace clang { namespace 34 class RSPragmaHandler : public clang::PragmaHandler { 39 : clang::PragmaHandler(Name), 47 virtual void handleInt(clang::Preprocessor &PP, clang::Token &Tok, 51 void handleItemListPragma(clang::Preprocessor &PP, 52 clang::Token &FirstToken); 55 void handleNonParamPragma(clang::Preprocessor &PP, 56 clang [all...] |
H A D | slang_rs_check_ast.cpp | 26 void RSCheckAST::VisitStmt(clang::Stmt *S) { 30 for (clang::Stmt::child_iterator I = S->child_begin(), E = S->child_end(); 33 if (clang::Stmt *Child = *I) { 39 void RSCheckAST::WarnOnSetElementAt(clang::CallExpr *E) { 40 clang::FunctionDecl *Decl; 41 Decl = clang::dyn_cast_or_null<clang::FunctionDecl>(E->getCalleeDecl()); 47 clang::Expr *Expr; 48 clang::ImplicitCastExpr *ImplCast; 50 ImplCast = clang [all...] |
H A D | slang_pragma_recorder.cpp | 21 #include "clang/Basic/TokenKinds.h" 23 #include "clang/Lex/Preprocessor.h" 24 #include "clang/Lex/Token.h" 28 bool PragmaRecorder::GetPragmaNameFromToken(const clang::Token &Token, 32 else if (Token.is(clang::tok::identifier)) 40 bool PragmaRecorder::GetPragmaValueFromToken(const clang::Token &Token, 43 if (Token.is(clang::tok::r_paren)) 55 void PragmaRecorder::HandlePragma(clang::Preprocessor &PP, 56 clang::PragmaIntroducerKind Introducer, 57 clang [all...] |
H A D | slang_rs_pragma_handler.cpp | 22 #include "clang/Basic/TokenKinds.h" 24 #include "clang/Lex/LiteralSupport.h" 25 #include "clang/Lex/Preprocessor.h" 26 #include "clang/Lex/Token.h" 46 void HandlePragma(clang::Preprocessor &PP, 47 clang::PragmaIntroducerKind Introducer, 48 clang::Token &FirstToken) { 58 void HandlePragma(clang::Preprocessor &PP, 59 clang::PragmaIntroducerKind Introducer, 60 clang [all...] |
H A D | slang_diagnostic_buffer.cpp | 19 #include "clang/Basic/SourceLocation.h" 20 #include "clang/Basic/SourceManager.h" 36 clang::DiagnosticsEngine::Level DiagLevel, 37 clang::Diagnostic const &Info) { 38 clang::SourceLocation const &SrcLoc = Info.getLocation(); 49 case clang::DiagnosticsEngine::Note: { 53 case clang::DiagnosticsEngine::Warning: { 57 case clang::DiagnosticsEngine::Error: { 61 case clang::DiagnosticsEngine::Fatal: {
|
H A D | slang_pragma_recorder.h | 24 #include "clang/Lex/Pragma.h" 26 namespace clang { namespace 35 class PragmaRecorder : public clang::PragmaHandler { 39 static bool GetPragmaNameFromToken(const clang::Token &Token, 42 static bool GetPragmaValueFromToken(const clang::Token &Token, 48 virtual void HandlePragma(clang::Preprocessor &PP, 49 clang::PragmaIntroducerKind Introducer, 50 clang::Token &FirstToken);
|
H A D | slang_backend.h | 20 #include "clang/AST/ASTConsumer.h" 39 namespace clang { namespace 56 class Backend : public clang::ASTConsumer { 58 const clang::TargetOptions &mTargetOpts; 67 clang::CodeGenerator *mGen; 88 clang::SourceManager &mSourceMgr; 105 void AnnotateFunction(clang::FunctionDecl *FD); 114 clang::DiagnosticsEngine &mDiagEngine; 115 const clang::CodeGenOptions &mCodeGenOpts; 129 void HandleTranslationUnitPre(clang [all...] |
H A D | slang_rs_export_type.cpp | 22 #include "clang/AST/ASTContext.h" 23 #include "clang/AST/Attr.h" 24 #include "clang/AST/RecordLayout.h" 92 clang::BuiltinType::Kind builtinTypeKind; 102 {clang::BuiltinType::Bool, DataTypeBoolean, 104 {clang::BuiltinType::Char_U, DataTypeUnsigned8, 106 {clang::BuiltinType::UChar, DataTypeUnsigned8, 108 {clang::BuiltinType::Char16, DataTypeSigned16, 110 {clang::BuiltinType::Char32, DataTypeSigned32, 112 {clang 195 ConstantArrayTypeExportableHelper( const clang::ConstantArrayType *CAT, llvm::SmallPtrSet<const clang::Type*, 8>& SPS, slang::RSContext *Context, const clang::VarDecl *VD, const clang::RecordDecl *TopLevelRecord) argument 451 ValidateTypeHelper( slang::RSContext *Context, clang::ASTContext &C, const clang::Type *&T, clang::NamedDecl *ND, clang::SourceLocation Loc, llvm::SmallPtrSet<const clang::Type*, 8>& SPS, bool InCompositeType, clang::RecordDecl *UnionDecl, unsigned int TargetAPI, bool IsFilterscript, bool IsExtern) argument [all...] |
H A D | slang.h | 35 #include "clang/Basic/LangOptions.h" 36 #include "clang/Basic/TargetOptions.h" 37 #include "clang/Frontend/CodeGenOptions.h" 38 #include "clang/Lex/ModuleLoader.h" 51 namespace clang { namespace 64 } // namespace clang 72 class Slang : public clang::ModuleLoader { 87 clang::LangOptions LangOpts; 89 clang::CodeGenOptions CodeGenOpts; 95 clang [all...] |
H A D | slang_rs_ast_replace.cpp | 26 clang::Stmt *OuterStmt, 27 clang::Stmt *OldStmt, 28 clang::Stmt *NewStmt) { 35 mOldExpr = llvm::dyn_cast<clang::Expr>(OldStmt); 37 mNewExpr = llvm::dyn_cast<clang::Expr>(NewStmt); 42 void RSASTReplace::ReplaceInCompoundStmt(clang::CompoundStmt *CS) { 43 clang::Stmt **UpdatedStmtList = new clang::Stmt*[CS->size()]; 46 clang::CompoundStmt::body_iterator bI = CS->body_begin(); 47 clang [all...] |
H A D | slang_rs_context.h | 25 #include "clang/Lex/Preprocessor.h" 26 #include "clang/AST/Mangle.h" 38 namespace clang { namespace 44 } // namespace clang 66 clang::Preprocessor &mPP; 67 clang::ASTContext &mCtx; 90 std::unique_ptr<clang::MangleContext> mMangleCtx; 94 bool processExportVar(const clang::VarDecl *VD); 95 bool processExportFunc(const clang::FunctionDecl *FD); 106 RSContext(clang [all...] |
H A D | slang_rs_export_foreach.h | 24 #include "clang/AST/Decl.h" 31 namespace clang { namespace 33 } // namespace clang 42 typedef llvm::SmallVectorImpl<const clang::ParmVarDecl*> InVec; 57 llvm::SmallVector<const clang::ParmVarDecl*, 16> mIns; 58 const clang::ParmVarDecl *mOut; 59 const clang::ParmVarDecl *mUsrData; 64 clang::QualType mResultType; // return type (if present). 76 mResultType(clang::QualType()), mHasReturnType(false), 81 const clang [all...] |
H A D | slang_rs_export_var.h | 22 #include "clang/AST/Decl.h" 23 #include "clang/AST/Expr.h" 42 clang::Expr::EvalResult mInit; 46 llvm::SmallVector<clang::Expr::EvalResult, 0> mInitArray; 49 const clang::VarDecl *VD, 58 inline const clang::APValue &getInit() const { return mInit.Val; } 62 inline const clang::APValue &getInitArray(unsigned int i) const {
|
H A D | slang_diagnostic_buffer.h | 23 #include "clang/Basic/Diagnostic.h" 34 class DiagnosticBuffer : public clang::DiagnosticConsumer { 47 virtual void HandleDiagnostic(clang::DiagnosticsEngine::Level DiagLevel, 48 const clang::Diagnostic &Info) override;
|
H A D | slang_rs_export_element.h | 22 #include "clang/Lex/Token.h" 29 namespace clang { namespace 32 } // namespace clang 58 const clang::Type *T, 67 const clang::DeclaratorDecl *DD);
|
H A D | slang_rs_context.cpp | 21 #include "clang/AST/ASTContext.h" 22 #include "clang/AST/Decl.h" 23 #include "clang/AST/DeclBase.h" 24 #include "clang/AST/Mangle.h" 25 #include "clang/AST/Type.h" 27 #include "clang/Basic/Linkage.h" 28 #include "clang/Basic/TargetInfo.h" 45 RSContext::RSContext(clang::Preprocessor &PP, 46 clang::ASTContext &Ctx, 47 const clang [all...] |
H A D | slang_rs_export_func.cpp | 21 #include "clang/AST/ASTContext.h" 22 #include "clang/AST/Decl.h" 36 const clang::FunctionDecl *FD) { 38 const clang::ASTContext &C = FD->getASTContext(); 51 const clang::FunctionDecl *FD) { 67 clang::ASTContext &Ctx = Context->getASTContext(); 71 clang::RecordDecl *RD = 72 clang::RecordDecl::Create(Ctx, clang::TTK_Struct, 74 clang [all...] |
H A D | slang_rs_export_var.cpp | 19 #include "clang/AST/ASTContext.h" 20 #include "clang/AST/Type.h" 30 const clang::VarDecl *VD, 40 const clang::Expr *Initializer = VD->getAnyInitializer(); 50 clang::Expr::NPC_ValueDependentIsNotNull)) { 51 mInit.Val = clang::APValue(llvm::APSInt(1)); 61 const clang::InitListExpr *IList = 62 static_cast<const clang::InitListExpr*>(Initializer); 73 clang::Expr::EvalResult tempInit; 98 clang [all...] |
H A D | slang_rs_export_element.cpp | 19 #include "clang/AST/Decl.h" 20 #include "clang/AST/Type.h" 22 #include "clang/Basic/SourceLocation.h" 23 #include "clang/Basic/IdentifierTable.h" 72 const clang::Type *T, 88 case clang::Type::Builtin: 89 case clang::Type::Pointer: { 102 case clang::Type::ExtVector: { 107 static_cast<const clang::ExtVectorType*>( 131 const clang [all...] |
H A D | slang_rs_export_type.h | 25 #include "clang/AST/Decl.h" 26 #include "clang/AST/Type.h" 37 inline const clang::Type* GetCanonicalType(const clang::Type* T) { 44 inline const clang::Type* GetCanonicalType(clang::QualType QT) { 48 inline const clang::Type* GetExtVectorElementType(const clang::ExtVectorType *T) { 55 inline const clang::Type* GetPointeeType(const clang [all...] |
H A D | slang_rs_export_foreach.cpp | 21 #include "clang/AST/ASTContext.h" 22 #include "clang/AST/Attr.h" 23 #include "clang/AST/Decl.h" 24 #include "clang/AST/TypeLoc.h" 99 RSContext *Context, const clang::FunctionDecl *FD) { 120 if (FD->hasAttr<clang::KernelAttr>()) { 131 RSContext *Context, const clang::FunctionDecl *FD) { 139 clang::ASTContext &C = Context->getASTContext(); 156 const clang::ParmVarDecl *PVD = FD->getParamDecl(i); 157 clang [all...] |