systemc-clang 2.0.0
Parsing SystemC constructs
Loading...
Searching...
No Matches
ArrayTypeUtils.h
Go to the documentation of this file.
1#ifndef _ARRAY_TYPE_UTILS_H_
2#define _ARRAY_TYPE_UTILS_H_
3
4#include <vector>
5#include "clang/AST/Type.h"
6
7#undef DEBUG_TYPE
8#define DEBUG_TYPE "ArrayTypeUtils"
9
11namespace clang {
12 class ValueDecl;
13 class Expr;
14 class MemberExpr;
15 class CXXCtorInitializer;
16};
17
18
19namespace sc_ast_matchers {
20namespace utils {
21namespace array_type {
22
23typedef std::pair<std::string,
24 std::tuple<std::size_t, std::size_t, std::size_t>>
26typedef std::map<std::string, std::tuple<std::size_t, std::size_t, std::size_t>>
28// typedef std::map<std::string, std::tuple<std::size_t, std::size_t,
29// std::size_t>> indices;
30typedef std::vector<llvm::APInt> ArraySizesType;
31typedef std::vector<const clang::Expr *> ArraySizesExprType;
32
46
47IndexMapType getArrayInstanceIndex(clang::CXXCtorInitializer *ctor_init);
48
56//ArraySizesType getConstantArraySizes(const clang::FieldDecl *fd);
57ArraySizesType getConstantArraySizes(const clang::ValueDecl *fd);
58
61ArraySizesExprType getArraySubscripts(const clang::Expr *expr);
62
63const clang::MemberExpr *getArrayMemberExprName(const clang::Expr *expr);
64}; // namespace array_type
65}; // namespace utils
66
67}; // namespace sc_ast_matchers
68
69#endif
Clang forward declarations.
Definition FindArgument.h:6
std::pair< std::string, std::tuple< std::size_t, std::size_t, std::size_t > > IndexPairType
ArraySizesType getConstantArraySizes(const clang::ValueDecl *fd)
IndexMapType getArrayInstanceIndex(clang::CXXCtorInitializer *ctor_init)
std::map< std::string, std::tuple< std::size_t, std::size_t, std::size_t > > IndexMapType
ArraySizesExprType getArraySubscripts(const clang::Expr *expr)
std::vector< const clang::Expr * > ArraySizesExprType
std::vector< llvm::APInt > ArraySizesType
const clang::MemberExpr * getArrayMemberExprName(const clang::Expr *expr)