Add DIUnspecifiedParameter, so we can pretty-print it.

This will be used for testcases in CFE.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202207 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Adrian Prantl 2014-02-25 23:42:11 +00:00
parent e8aeccef15
commit bf455c5ae2
2 changed files with 13 additions and 0 deletions

View File

@ -553,6 +553,13 @@ public:
bool Verify() const;
};
/// DIUnspecifiedParameter - This is a wrapper for unspecified parameters.
class DIUnspecifiedParameter : public DIDescriptor {
public:
explicit DIUnspecifiedParameter(const MDNode *N = 0) : DIDescriptor(N) {}
bool Verify() const;
};
/// DITemplateTypeParameter - This is a wrapper for template type parameter.
class DITemplateTypeParameter : public DIDescriptor {
public:

View File

@ -45,6 +45,7 @@ bool DIDescriptor::Verify() const {
DILexicalBlockFile(DbgNode).Verify() ||
DISubrange(DbgNode).Verify() || DIEnumerator(DbgNode).Verify() ||
DIObjCProperty(DbgNode).Verify() ||
DIUnspecifiedParameter(DbgNode).Verify() ||
DITemplateTypeParameter(DbgNode).Verify() ||
DITemplateValueParameter(DbgNode).Verify() ||
DIImportedEntity(DbgNode).Verify());
@ -607,6 +608,11 @@ bool DILexicalBlockFile::Verify() const {
return isLexicalBlockFile() && DbgNode->getNumOperands() == 3;
}
/// \brief Verify that an unspecified parameter descriptor is well formed.
bool DIUnspecifiedParameter::Verify() const {
return isUnspecifiedParameter() && DbgNode->getNumOperands() == 1;
}
/// \brief Verify that the template type parameter descriptor is well formed.
bool DITemplateTypeParameter::Verify() const {
return isTemplateTypeParameter() && DbgNode->getNumOperands() == 7;