diff options
author | Manman Ren <manman.ren@gmail.com> | 2013-07-20 00:38:46 +0000 |
---|---|---|
committer | Manman Ren <manman.ren@gmail.com> | 2013-07-20 00:38:46 +0000 |
commit | 96ea03839becf151b2eda518b4bc55b84f6373bf (patch) | |
tree | 8341a3e3bf7ab5d8e7be4f70f7ce4dd1341e536d /include | |
parent | ac9e819ca9ad93cfbcf0b7c5b0a7cbbd34cd9176 (diff) | |
download | external_llvm-96ea03839becf151b2eda518b4bc55b84f6373bf.zip external_llvm-96ea03839becf151b2eda518b4bc55b84f6373bf.tar.gz external_llvm-96ea03839becf151b2eda518b4bc55b84f6373bf.tar.bz2 |
Debug Info Verifier: simplify DIxxx::Verify
Simplify DIxxx:Verify to not call Verify on an operand. Instead, we use
DebugInfoFinder to list all MDNodes that should be a DIScope and all MDNodes
that should be a DIType and we will call Verify on those lists.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186737 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/DebugInfo.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/llvm/DebugInfo.h b/include/llvm/DebugInfo.h index 2a00ab0..5c74b17 100644 --- a/include/llvm/DebugInfo.h +++ b/include/llvm/DebugInfo.h @@ -768,6 +768,8 @@ namespace llvm { /// addType - Add type into Tys. bool addType(DIType DT); + bool addScope(DIScope Scope); + public: typedef SmallVectorImpl<MDNode *>::const_iterator iterator; iterator compile_unit_begin() const { return CUs.begin(); } @@ -778,17 +780,21 @@ namespace llvm { iterator global_variable_end() const { return GVs.end(); } iterator type_begin() const { return TYs.begin(); } iterator type_end() const { return TYs.end(); } + iterator scope_begin() const { return Scopes.begin(); } + iterator scope_end() const { return Scopes.end(); } unsigned compile_unit_count() const { return CUs.size(); } unsigned global_variable_count() const { return GVs.size(); } unsigned subprogram_count() const { return SPs.size(); } unsigned type_count() const { return TYs.size(); } + unsigned scope_count() const { return Scopes.size(); } private: SmallVector<MDNode *, 8> CUs; // Compile Units SmallVector<MDNode *, 8> SPs; // Subprograms SmallVector<MDNode *, 8> GVs; // Global Variables; SmallVector<MDNode *, 8> TYs; // Types + SmallVector<MDNode *, 8> Scopes; // Scopes SmallPtrSet<MDNode *, 64> NodesSeen; }; } // end namespace llvm |