diff options
author | Devang Patel <dpatel@apple.com> | 2011-02-02 21:38:25 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2011-02-02 21:38:25 +0000 |
commit | 7e2cb116556e1153401cd6b94d0f51db978f6902 (patch) | |
tree | 12c42fff5a598ca8d3723a8c5787d97cc624f2ed /include/llvm/Analysis/DebugInfo.h | |
parent | 4b720718fbda1194f925e0a9d931bc220e8b0e3a (diff) |
Add support to describe template parameter type in debug info.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124752 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 f0effb7567..b547263669 100644 --- a/include/llvm/Analysis/DebugInfo.h +++ b/include/llvm/Analysis/DebugInfo.h @@ -122,6 +122,7 @@ namespace llvm { bool isType() const; bool isGlobal() const; bool isUnspecifiedParameter() const; + bool isTemplateTypeParameter() const; }; /// DISubrange - This is used to represent ranges, for array bounds. @@ -356,6 +357,7 @@ namespace llvm { DICompositeType getContainingType() const { return getFieldAs<DICompositeType>(12); } + DIArray getTemplateParams() const { return getFieldAs<DIArray>(13); } /// Verify - Verify that a composite type descriptor is well formed. bool Verify() const; @@ -367,6 +369,24 @@ namespace llvm { void dump() const; }; + /// DITemplateTypeParameter - This is a wrapper for template type parameter. + class DITemplateTypeParameter : public DIDescriptor { + public: + explicit DITemplateTypeParameter(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); } + StringRef getFilename() const { + return getFieldAs<DIFile>(4).getFilename(); + } + StringRef getDirectory() const { + return getFieldAs<DIFile>(4).getDirectory(); + } + unsigned getLineNumber() const { return getUnsignedField(5); } + unsigned getColumnNumber() const { return getUnsignedField(6); } + }; + /// DISubprogram - This is a wrapper for a subprogram (e.g. a function). class DISubprogram : public DIScope { public: |