summaryrefslogtreecommitdiff
path: root/Type.hh
diff options
context:
space:
mode:
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