return 0;
}
- bool isDerivedType() const { return get() && isa<MDDerivedTypeBase>(get()); }
- bool isCompositeType() const {
- return get() && isa<MDCompositeTypeBase>(get());
- }
- bool isSubroutineType() const {
- return get() && isa<MDSubroutineType>(get());
- }
- bool isBasicType() const { return get() && isa<MDBasicType>(get()); }
- bool isVariable() const { return get() && isa<MDLocalVariable>(get()); }
- bool isSubprogram() const { return get() && isa<MDSubprogram>(get()); }
- bool isGlobalVariable() const {
- return get() && isa<MDGlobalVariable>(get());
- }
- bool isScope() const { return get() && isa<MDScope>(get()); }
- bool isFile() const { return get() && isa<MDFile>(get()); }
- bool isCompileUnit() const { return get() && isa<MDCompileUnit>(get()); }
- bool isNameSpace() const{ return get() && isa<MDNamespace>(get()); }
- bool isLexicalBlockFile() const {
- return get() && isa<MDLexicalBlockFile>(get());
- }
- bool isLexicalBlock() const {
- return get() && isa<MDLexicalBlockBase>(get());
- }
- bool isSubrange() const { return get() && isa<MDSubrange>(get()); }
- bool isEnumerator() const { return get() && isa<MDEnumerator>(get()); }
- bool isType() const { return get() && isa<MDType>(get()); }
- bool isTemplateTypeParameter() const {
- return get() && isa<MDTemplateTypeParameter>(get());
- }
- bool isTemplateValueParameter() const {
- return get() && isa<MDTemplateValueParameter>(get());
- }
- bool isObjCProperty() const { return get() && isa<MDObjCProperty>(get()); }
- bool isImportedEntity() const {
- return get() && isa<MDImportedEntity>(get());
- }
- bool isExpression() const { return get() && isa<MDExpression>(get()); }
-
void print(raw_ostream &OS) const;
void dump() const;
/// \brief This is used to represent ranges, for array bounds.
class DISubrange : public DIDescriptor {
public:
- explicit DISubrange(const MDNode *N = nullptr) : DIDescriptor(N) {}
+ DISubrange() = default;
DISubrange(const MDSubrange *N) : DIDescriptor(N) {}
MDSubrange *get() const {
/// type/precision or a file/line pair for location info.
class DIEnumerator : public DIDescriptor {
public:
- explicit DIEnumerator(const MDNode *N = nullptr) : DIDescriptor(N) {}
+ DIEnumerator() = default;
DIEnumerator(const MDEnumerator *N) : DIDescriptor(N) {}
MDEnumerator *get() const {
/// (DICompileUnit, DISubprogram, etc.), but not for, e.g., a DIType.
class DIScope : public DIDescriptor {
public:
- explicit DIScope(const MDNode *N = nullptr) : DIDescriptor(N) {}
+ DIScope() = default;
DIScope(const MDScope *N) : DIDescriptor(N) {}
MDScope *get() const { return cast_or_null<MDScope>(DIDescriptor::get()); }
/// others do not require a huge and empty descriptor full of zeros.
class DIType : public DIScope {
public:
- explicit DIType(const MDNode *N = nullptr) : DIScope(N) {}
+ DIType() = default;
DIType(const MDType *N) : DIScope(N) {}
MDType *get() const { return cast_or_null<MDType>(DIDescriptor::get()); }
/// \brief A basic type, like 'int' or 'float'.
class DIBasicType : public DIType {
public:
- explicit DIBasicType(const MDNode *N = nullptr) : DIType(N) {}
+ DIBasicType() = default;
DIBasicType(const MDBasicType *N) : DIType(N) {}
MDBasicType *get() const {
/// Or, a data member of a class/struct/union.
class DIDerivedType : public DIType {
public:
- explicit DIDerivedType(const MDNode *N = nullptr) : DIType(N) {}
+ DIDerivedType() = default;
DIDerivedType(const MDDerivedTypeBase *N) : DIType(N) {}
MDDerivedTypeBase *get() const {
void setArraysHelper(MDNode *Elements, MDNode *TParams);
public:
- explicit DICompositeType(const MDNode *N = nullptr) : DIDerivedType(N) {}
+ DICompositeType() = default;
DICompositeType(const MDCompositeTypeBase *N) : DIDerivedType(N) {}
MDCompositeTypeBase *get() const {
class DISubroutineType : public DICompositeType {
public:
- explicit DISubroutineType(const MDNode *N = nullptr) : DICompositeType(N) {}
+ DISubroutineType() = default;
DISubroutineType(const MDSubroutineType *N) : DICompositeType(N) {}
MDSubroutineType *get() const {
/// \brief This is a wrapper for a file.
class DIFile : public DIScope {
public:
- explicit DIFile(const MDNode *N = nullptr) : DIScope(N) {}
+ DIFile() = default;
DIFile(const MDFile *N) : DIScope(N) {}
MDFile *get() const { return cast_or_null<MDFile>(DIDescriptor::get()); }
/// \brief A wrapper for a compile unit.
class DICompileUnit : public DIScope {
public:
- explicit DICompileUnit(const MDNode *N = nullptr) : DIScope(N) {}
+ DICompileUnit() = default;
DICompileUnit(const MDCompileUnit *N) : DIScope(N) {}
MDCompileUnit *get() const {
/// \brief This is a wrapper for a subprogram (e.g. a function).
class DISubprogram : public DIScope {
public:
- explicit DISubprogram(const MDNode *N = nullptr) : DIScope(N) {}
+ DISubprogram() = default;
DISubprogram(const MDSubprogram *N) : DIScope(N) {}
MDSubprogram *get() const {
/// \brief This is a wrapper for a lexical block.
class DILexicalBlock : public DIScope {
public:
- explicit DILexicalBlock(const MDNode *N = nullptr) : DIScope(N) {}
+ DILexicalBlock() = default;
DILexicalBlock(const MDLexicalBlockBase *N) : DIScope(N) {}
MDLexicalBlockBase *get() const {
/// \brief This is a wrapper for a lexical block with a filename change.
class DILexicalBlockFile : public DIScope {
public:
- explicit DILexicalBlockFile(const MDNode *N = nullptr) : DIScope(N) {}
+ DILexicalBlockFile() = default;
DILexicalBlockFile(const MDLexicalBlockFile *N) : DIScope(N) {}
MDLexicalBlockFile *get() const {
/// \brief A wrapper for a C++ style name space.
class DINameSpace : public DIScope {
public:
- explicit DINameSpace(const MDNode *N = nullptr) : DIScope(N) {}
+ DINameSpace() = default;
DINameSpace(const MDNamespace *N) : DIScope(N) {}
MDNamespace *get() const {
/// \brief This is a wrapper for template type parameter.
class DITemplateTypeParameter : public DIDescriptor {
public:
- explicit DITemplateTypeParameter(const MDNode *N = nullptr)
- : DIDescriptor(N) {}
+ DITemplateTypeParameter() = default;
DITemplateTypeParameter(const MDTemplateTypeParameter *N) : DIDescriptor(N) {}
MDTemplateTypeParameter *get() const {
/// \brief This is a wrapper for template value parameter.
class DITemplateValueParameter : public DIDescriptor {
public:
- explicit DITemplateValueParameter(const MDNode *N = nullptr)
- : DIDescriptor(N) {}
+ DITemplateValueParameter() = default;
DITemplateValueParameter(const MDTemplateValueParameter *N)
: DIDescriptor(N) {}
DIFile getFile() const { return DIFile(get()->getFile()); }
public:
- explicit DIGlobalVariable(const MDNode *N = nullptr) : DIDescriptor(N) {}
+ DIGlobalVariable() = default;
DIGlobalVariable(const MDGlobalVariable *N) : DIDescriptor(N) {}
MDGlobalVariable *get() const {
unsigned getFlags() const { return get()->getFlags(); }
public:
- explicit DIVariable(const MDNode *N = nullptr) : DIDescriptor(N) {}
+ DIVariable() = default;
DIVariable(const MDLocalVariable *N) : DIDescriptor(N) {}
MDLocalVariable *get() const {
/// and have DW_OP_plus consume the topmost elements on the stack.
class DIExpression : public DIDescriptor {
public:
- explicit DIExpression(const MDNode *N = nullptr) : DIDescriptor(N) {}
+ DIExpression() = default;
DIExpression(const MDExpression *N) : DIDescriptor(N) {}
MDExpression *get() const {
/// This object is not associated with any DWARF tag.
class DILocation : public DIDescriptor {
public:
- explicit DILocation(const MDNode *N) : DIDescriptor(N) {}
+ DILocation() = default;
DILocation(const MDLocation *N) : DIDescriptor(N) {}
MDLocation *get() const {
class DIObjCProperty : public DIDescriptor {
public:
- explicit DIObjCProperty(const MDNode *N) : DIDescriptor(N) {}
+ DIObjCProperty() = default;
DIObjCProperty(const MDObjCProperty *N) : DIDescriptor(N) {}
MDObjCProperty *get() const {
class DIImportedEntity : public DIDescriptor {
public:
DIImportedEntity() = default;
- explicit DIImportedEntity(const MDNode *N) : DIDescriptor(N) {}
DIImportedEntity(const MDImportedEntity *N) : DIDescriptor(N) {}
MDImportedEntity *get() const {