FlagProtected = 1 << 1,
FlagFwdDecl = 1 << 2,
FlagAppleBlock = 1 << 3,
- FlagBlockByrefStruct = 1 << 4
+ FlagBlockByrefStruct = 1 << 4,
+ FlagVirtual = 1 << 5
};
protected:
bool isBlockByrefStruct() const {
return (getFlags() & FlagBlockByrefStruct) != 0;
}
+ bool isVirtual() const {
+ return (getFlags() & FlagVirtual) != 0;
+ }
/// dump - print type.
void dump() const;
/// compile unit, like 'static' in C.
unsigned isLocalToUnit() const { return getUnsignedField(9); }
unsigned isDefinition() const { return getUnsignedField(10); }
+
+ unsigned getVirtuality() const {
+ if (DbgNode->getNumElements() < 14)
+ return 0;
+ return getUnsignedField(11);
+ }
+
+ unsigned getVirtualIndex() const {
+ if (DbgNode->getNumElements() < 14)
+ return 0;
+ return getUnsignedField(12);
+ }
+
+ DICompositeType getContainingType() const {
+ assert (DbgNode->getNumElements() >= 14 && "Invalid type!");
+ return getFieldAs<DICompositeType>(13);
+ }
+
StringRef getFilename() const { return getCompileUnit().getFilename();}
StringRef getDirectory() const { return getCompileUnit().getDirectory();}
StringRef LinkageName,
DICompileUnit CompileUnit, unsigned LineNo,
DIType Type, bool isLocalToUnit,
- bool isDefinition);
+ bool isDefinition,
+ unsigned VK = 0,
+ unsigned VIndex = 0,
+ DIType = DIType());
+
+ /// CreateSubprogramDefinition - Create new subprogram descriptor for the
+ /// given declaration.
+ DISubprogram CreateSubprogramDefinition(DISubprogram &SPDeclaration);
/// CreateGlobalVariable - Create a new descriptor for the specified global.
DIGlobalVariable