Displaying 1 result from an estimated 1 matches for "gettypeidentifierstr".
2017 Jun 09
2
Subclassing LLVM Type
...red 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() works.
However , I wish to use "dynamic_cast<>" at runtime but I'm unable to do so.
example - DummyType* dum_type = dynamic_cast<DummyType...