diff options
| author | Nagi5Yeq <wu@x-nagi.com> | 2020-05-25 16:14:41 +0800 |
|---|---|---|
| committer | Nagi5Yeq <wu@x-nagi.com> | 2020-05-25 16:14:41 +0800 |
| commit | 958a811b18aee04e4795cf003fd8e3db00312c91 (patch) | |
| tree | 92cbc52f7560af0e08febfe1da38ed657ad29735 /Type.hh | |
| parent | c5e9f890dab0e4595482301d77876793c8bceb8c (diff) | |
finish function calls and lvalue
Diffstat (limited to 'Type.hh')
| -rw-r--r-- | Type.hh | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -3,6 +3,7 @@ #include <memory> #include <string> +#include <vector> #include <llvm/IR/IRBuilder.h> #include <llvm/IR/Module.h> @@ -174,6 +175,19 @@ class PointerType : public Type { std::shared_ptr<Type> DifferenceType_; std::shared_ptr<Type> IndexType_; }; + +class FunctionType : public Type { + public: + FunctionType(std::shared_ptr<Type> ReturnType, + std::vector<std::shared_ptr<Type>> ArgTypes, + std::string&& name); + std::shared_ptr<Type> GetReturnType(); + std::vector<std::shared_ptr<Type>> GetArgTypes(); + + protected: + std::shared_ptr<Type> ReturnType_; + std::vector<std::shared_ptr<Type>> ArgTypes_; +}; } // namespace pcc #endif // PCC_TYPE_H |
