Displaying 1 result from an estimated 1 matches for "typeidentifier".
2017 Jun 09
2
Subclassing LLVM Type
...erate IR.
I want to use this approach as most of my AST is already configured to
accept a Type* and not a DummyType* ( which is my own class )
I explored this a bit and did manage to create one.
========== DummyType class =========
class DummyType : public llvm::Type
{
private:
std::string typeIdentifier;
public:
DummyType(const std::string& typeIdentifier,TypeID tyId):typeIdentifier(typeIdentifier),Type(TheContext,tyId)
{
}
std::string getTypeIdentifierString() const
{
return this->typeIdentifier ;
}
};
============================================
Now ,
Type* ty = new DummyType() wo...