summaryrefslogtreecommitdiff
path: root/Type.hh
diff options
context:
space:
mode:
authorNagi5Yeq <wu@x-nagi.com>2020-05-25 16:14:41 +0800
committerNagi5Yeq <wu@x-nagi.com>2020-05-25 16:14:41 +0800
commit958a811b18aee04e4795cf003fd8e3db00312c91 (patch)
tree92cbc52f7560af0e08febfe1da38ed657ad29735 /Type.hh
parentc5e9f890dab0e4595482301d77876793c8bceb8c (diff)
finish function calls and lvalue
Diffstat (limited to 'Type.hh')
-rw-r--r--Type.hh14
1 files changed, 14 insertions, 0 deletions
diff --git a/Type.hh b/Type.hh
index 4413058..ebda567 100644
--- a/Type.hh
+++ b/Type.hh
@@ -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