diff options
author | Devang Patel <dpatel@apple.com> | 2009-08-31 22:00:15 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2009-08-31 22:00:15 +0000 |
commit | 5e005d814f13f1796cf9e32c7525a5241fface1a (patch) | |
tree | 57eab7d31e4f06fbf0af3a82eb556d77d931f122 /include/llvm/Analysis | |
parent | a5505cb9c992cb4bde5656fb6bd14d89b8f1a744 (diff) | |
download | llvm-5e005d814f13f1796cf9e32c7525a5241fface1a.tar.gz llvm-5e005d814f13f1796cf9e32c7525a5241fface1a.tar.bz2 llvm-5e005d814f13f1796cf9e32c7525a5241fface1a.tar.xz |
Rename DIBlock as DILexicalBlock.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80633 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Analysis')
-rw-r--r-- | include/llvm/Analysis/DebugInfo.h | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/include/llvm/Analysis/DebugInfo.h b/include/llvm/Analysis/DebugInfo.h index e6737d0ef0..f27d03b7d0 100644 --- a/include/llvm/Analysis/DebugInfo.h +++ b/include/llvm/Analysis/DebugInfo.h @@ -96,6 +96,7 @@ namespace llvm { bool isGlobalVariable() const; bool isScope() const; bool isCompileUnit() const; + bool isLexicalBlock() const; }; /// DISubrange - This is used to represent ranges, for array bounds. @@ -419,12 +420,14 @@ namespace llvm { void dump() const; }; - /// DIBlock - This is a wrapper for a block (e.g. a function, scope, etc). - class DIBlock : public DIDescriptor { + /// DILexicalBlock - This is a wrapper for a lexical block. + class DILexicalBlock : public DIScope { public: - explicit DIBlock(MDNode *N = 0) - : DIDescriptor(N, dwarf::DW_TAG_lexical_block) {} - + explicit DILexicalBlock(MDNode *N = 0) { + DbgNode = N; + if (DbgNode && !isLexicalBlock()) + DbgNode = 0; + } DIDescriptor getContext() const { return getDescriptorField(1); } }; @@ -524,9 +527,9 @@ namespace llvm { DICompileUnit CompileUnit, unsigned LineNo, DIType Type); - /// CreateBlock - This creates a descriptor for a lexical block with the - /// specified parent context. - DIBlock CreateBlock(DIDescriptor Context); + /// CreateLexicalBlock - This creates a descriptor for a lexical block + /// with the specified parent context. + DILexicalBlock CreateLexicalBlock(DIDescriptor Context); /// InsertStopPoint - Create a new llvm.dbg.stoppoint intrinsic invocation, /// inserting it at the end of the specified basic block. |