diff options
author | Devang Patel <dpatel@apple.com> | 2009-08-31 20:44:45 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2009-08-31 20:44:45 +0000 |
commit | 94f536e037d399e79afa64c060da2ac0d4d6b4a7 (patch) | |
tree | 6db693366f7d4bf9918fb8439c7d4c1cfffb962d /lib/Analysis | |
parent | c9db7a5b14625f78cbd619582db31a985eeddd7d (diff) | |
download | external_llvm-94f536e037d399e79afa64c060da2ac0d4d6b4a7.zip external_llvm-94f536e037d399e79afa64c060da2ac0d4d6b4a7.tar.gz external_llvm-94f536e037d399e79afa64c060da2ac0d4d6b4a7.tar.bz2 |
Introduce DIScope.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80620 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis')
-rw-r--r-- | lib/Analysis/DebugInfo.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/Analysis/DebugInfo.cpp b/lib/Analysis/DebugInfo.cpp index a67539c..e815931 100644 --- a/lib/Analysis/DebugInfo.cpp +++ b/lib/Analysis/DebugInfo.cpp @@ -210,6 +210,22 @@ bool DIDescriptor::isGlobalVariable() const { return Tag == dwarf::DW_TAG_variable; } +/// isScope - Return true if the specified tag is one of the scope +/// related tag. +bool DIDescriptor::isScope() const { + assert (!isNull() && "Invalid descriptor!"); + unsigned Tag = getTag(); + + switch (Tag) { + case dwarf::DW_TAG_compile_unit: + case dwarf::DW_TAG_lexical_block: + case dwarf::DW_TAG_subprogram: + return true; + default: + break; + } + return false; +} //===----------------------------------------------------------------------===// // Simple Descriptor Constructors and other Methods |