diff options
author | Devang Patel <dpatel@apple.com> | 2011-02-02 22:35:53 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2011-02-02 22:35:53 +0000 |
commit | e7d93877c6e7029d27bfd1c137fceb472f81f390 (patch) | |
tree | ea32df2a6afbe0ec72bf7c0edb502a72ef06feb8 /include/llvm/Analysis/DebugInfo.h | |
parent | 7e2cb116556e1153401cd6b94d0f51db978f6902 (diff) |
Add support to describe template value parameter in debug info.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124755 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Analysis/DebugInfo.h')
-rw-r--r-- | include/llvm/Analysis/DebugInfo.h | 20 |
1 files changed, 20 insertions, 0 deletions
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: |