diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/Analysis/DIBuilder.h | 18 | ||||
-rw-r--r-- | include/llvm/Analysis/DebugInfo.h | 20 |
2 files changed, 37 insertions, 1 deletions
diff --git a/include/llvm/Analysis/DIBuilder.h b/include/llvm/Analysis/DIBuilder.h index a948ce2c1d..7916934d4a 100644 --- a/include/llvm/Analysis/DIBuilder.h +++ b/include/llvm/Analysis/DIBuilder.h @@ -39,6 +39,7 @@ namespace llvm { class DILexicalBlock; class DISubprogram; class DITemplateTypeParameter; + class DITemplateValueParameter; class DIBuilder { private: @@ -198,7 +199,7 @@ namespace llvm { /// CreateTemplateTypeParameter - Create debugging information for template /// type parameter. - /// @param Scope Scope in which this type is dfiend + /// @param Scope Scope in which this type is defined. /// @param Name Type parameter name. /// @param Ty Parameter type. /// @param File File where this type parameter is defined. @@ -209,6 +210,21 @@ namespace llvm { MDNode *File = 0, unsigned LineNo = 0, unsigned ColumnNo = 0); + /// CreateTemplateValueParameter - Create debugging information for template + /// value parameter. + /// @param Scope Scope in which this type is defined. + /// @param Name Value parameter name. + /// @param Ty Parameter type. + /// @param Value Constant parameter value. + /// @param File File where this type parameter is defined. + /// @param LineNo Line number. + /// @param ColumnNo Column Number. + DITemplateValueParameter + CreateTemplateValueParameter(DIDescriptor Scope, StringRef Name, DIType Ty, + uint64_t Value, + MDNode *File = 0, unsigned LineNo = 0, + unsigned ColumnNo = 0); + /// CreateArrayType - Create debugging information entry for an array. /// @param Size Array size. /// @param AlignInBits Alignment. diff --git a/include/llvm/Analysis/DebugInfo.h b/include/llvm/Analysis/DebugInfo.h index b547263669..bcaf616ef8 100644 --- a/include/llvm/Analysis/DebugInfo.h +++ b/include/llvm/Analysis/DebugInfo.h @@ -123,6 +123,7 @@ namespace llvm { bool isGlobal() const; bool isUnspecifiedParameter() const; bool isTemplateTypeParameter() const; + bool isTemplateValueParameter() const; }; /// DISubrange - This is used to represent ranges, for array bounds. @@ -387,6 +388,25 @@ namespace llvm { unsigned getColumnNumber() const { return getUnsignedField(6); } }; + /// DITemplateValueParameter - This is a wrapper for template value parameter. + class DITemplateValueParameter : public DIDescriptor { + public: + explicit DITemplateValueParameter(const MDNode *N = 0) : DIDescriptor(N) {} + + DIScope getContext() const { return getFieldAs<DIScope>(1); } + StringRef getName() const { return getStringField(2); } + DIType getType() const { return getFieldAs<DIType>(3); } + uint64_t getValue() const { return getUInt64Field(4); } + StringRef getFilename() const { + return getFieldAs<DIFile>(5).getFilename(); + } + StringRef getDirectory() const { + return getFieldAs<DIFile>(5).getDirectory(); + } + unsigned getLineNumber() const { return getUnsignedField(6); } + unsigned getColumnNumber() const { return getUnsignedField(7); } + }; + /// DISubprogram - This is a wrapper for a subprogram (e.g. a function). class DISubprogram : public DIScope { public: |