|
chigraph
master
Systems programming language written for beginners in LLVM
|
A type of data Loose wrapper around llvm::Type*, except it knows which ChiModule it's in and it embeds debug types. More...
#include <chi/DataType.hpp>
Public Member Functions | |
| DataType (ChiModule *chiMod=nullptr, std::string typeName={}, llvm::Type *llvmtype=nullptr, llvm::DIType *debugTy=nullptr) | |
| Constructor. More... | |
| llvm::DIType * | debugType () const |
| Get the debug type. More... | |
| llvm::Type * | llvmType () const |
Get the underlying llvm::Type. More... | |
| ChiModule & | module () const |
| Get the module this is a part of. More... | |
| std::string | qualifiedName () const |
| Get the qualified name of the type (module().fullName() + ":" name()) More... | |
| const std::string & | unqualifiedName () const |
| Get the unqualified name of the type. More... | |
| bool | valid () const |
| Check if the DataType is valid (if it's actually bound to a type and module) More... | |
Related Functions | |
(Note that these are not member functions.) | |
| bool | operator!= (const DataType &lhs, const DataType &rhs) |
| Inequality check. More... | |
| bool | operator== (const DataType &lhs, const DataType &rhs) |
| Equality check. More... | |
A type of data Loose wrapper around llvm::Type*, except it knows which ChiModule it's in and it embeds debug types.
Definition at line 17 of file DataType.hpp.
|
inline |
Constructor.
| chiMod | The module |
| typeName | The ID of the type in the module |
| llvmtype | The underlying type |
| debugTy | The debug type for the DataType |
Definition at line 23 of file DataType.hpp.
|
inline |
|
inline |
|
inline |
Get the module this is a part of.
Definition at line 29 of file DataType.hpp.
Referenced by operator==(), and qualifiedName().
Here is the caller graph for this function:| std::string chi::DataType::qualifiedName | ( | ) | const |
Get the qualified name of the type (module().fullName() + ":" name())
Definition at line 8 of file DataType.cpp.
References chi::ChiModule::fullName(), module(), and unqualifiedName().
Referenced by chi::Context::createConverterNodeType(), chi::GraphFunction::retypeLocalVariable(), and unqualifiedName().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
Get the unqualified name of the type.
Definition at line 32 of file DataType.hpp.
References qualifiedName().
Referenced by operator==(), and qualifiedName().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
Check if the DataType is valid (if it's actually bound to a type and module)
true if valid, false otherwise Definition at line 44 of file DataType.hpp.
Referenced by chi::GraphStruct::addType(), chi::FunctionCompiler::createSubroutineType(), chi::GraphStruct::dataType(), and chi::GraphStruct::modifyType().
Here is the caller graph for this function:Equality check.
Definition at line 60 of file DataType.hpp.
References module(), and unqualifiedName().
Here is the call graph for this function: