22#define GLU_IR_DEC_DI_TYPE_LIFTER_HPP
33
44#include " AST/ASTContext.hpp"
5+ #include " AST/Decls.hpp"
56#include " AST/Types.hpp"
67#include < llvm/IR/DebugInfoMetadata.h>
78
@@ -19,7 +20,7 @@ class DITypeLifter {
1920 // / @brief Lift a DIType to a GLU type
2021 // / @param diType The DIType to lift
2122 // / @return The lifted GLU type, or nullptr if the type could not be lifted
22- glu::types::TypeBase *lift (llvm::DIType const *diType) const ;
23+ glu::types::TypeBase *lift (llvm::DIType const *diType);
2324
2425 // / @brief Handle a DIBasicType and lift it to a GLU type
2526 // / @param arena The memory arena to use for allocation
@@ -34,15 +35,29 @@ class DITypeLifter {
3435 // / @param diCompositeType The DICompositeType to handle
3536 // / @return The lifted GLU type, or nullptr if the type could not be lifted
3637 glu::types::TypeBase *
37- handleComposedTypes (llvm::DICompositeType const *diCompositeType) const ;
38+ handleComposedTypes (llvm::DICompositeType const *diCompositeType);
3839
3940 // / @brief Handle a DIDerivedType and lift it to a GLU type
4041 // / @param typesArena The memory arena to use for type allocation
4142 // / @param astArena The memory arena to use for AST allocation
4243 // / @param diDerivedType The DIDerivedType to handle
4344 // / @return The lifted GLU type, or nullptr if the type could not be lifted
4445 glu::types::TypeBase *
45- handleDerivedType (llvm::DIDerivedType const *diDerivedType) const ;
46+ handleDerivedType (llvm::DIDerivedType const *diDerivedType);
47+
48+ // / @brief Handle a DISubroutineType and lift it to a GLU type
49+ // / @param diSubroutineType The DISubroutineType to handle
50+ // / @return The lifted GLU type, or nullptr if the type could not be lifted
51+ glu::types::TypeBase *
52+ handleSubroutineType (llvm::DISubroutineType const *diSubroutineType);
53+
54+ // / @brief Get the declaration bindings map
55+ // / @return The declaration bindings map
56+ llvm::DenseMap<llvm::DIType const *, glu::ast::DeclBase *> &
57+ getDeclBindings ()
58+ {
59+ return _declBindings;
60+ }
4661};
4762
4863} // namespace glu::irdec
0 commit comments