From: Adrian Prantl Date: Tue, 25 Feb 2014 23:42:11 +0000 (+0000) Subject: Add DIUnspecifiedParameter, so we can pretty-print it. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=bf455c5ae2399dc182f73c961cc68e9342f5ae86;p=oota-llvm.git 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 --- diff --git a/include/llvm/DebugInfo.h b/include/llvm/DebugInfo.h index 4db4a356dfa..ccf62ffb815 100644 --- a/include/llvm/DebugInfo.h +++ b/include/llvm/DebugInfo.h @@ -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: diff --git a/lib/IR/DebugInfo.cpp b/lib/IR/DebugInfo.cpp index f7215dc51e1..0617f672e61 100644 --- a/lib/IR/DebugInfo.cpp +++ b/lib/IR/DebugInfo.cpp @@ -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;