diff options
author | Devang Patel <dpatel@apple.com> | 2009-08-31 21:34:44 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2009-08-31 21:34:44 +0000 |
commit | 4a47c2447110c5163806b46ee1be881adf70ce38 (patch) | |
tree | 9c9113b85edfada55571aee3a00cd561aa1fa34f /lib/Analysis | |
parent | 248d5579576fdfb0f1dca59bc3c6cebb8a6976fc (diff) | |
download | external_llvm-4a47c2447110c5163806b46ee1be881adf70ce38.zip external_llvm-4a47c2447110c5163806b46ee1be881adf70ce38.tar.gz external_llvm-4a47c2447110c5163806b46ee1be881adf70ce38.tar.bz2 |
Derive DICompileUnit from DIScope.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80627 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis')
-rw-r--r-- | lib/Analysis/DebugInfo.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/Analysis/DebugInfo.cpp b/lib/Analysis/DebugInfo.cpp index e815931..3e3b802 100644 --- a/lib/Analysis/DebugInfo.cpp +++ b/lib/Analysis/DebugInfo.cpp @@ -227,6 +227,14 @@ bool DIDescriptor::isScope() const { return false; } +/// isCompileUnit - Return true if the specified tag is DW_TAG_compile_unit. +bool DIDescriptor::isCompileUnit() const { + assert (!isNull() && "Invalid descriptor!"); + unsigned Tag = getTag(); + + return Tag == dwarf::DW_TAG_compile_unit; +} + //===----------------------------------------------------------------------===// // Simple Descriptor Constructors and other Methods //===----------------------------------------------------------------------===// |