summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorManman Ren <manman.ren@gmail.com>2013-07-20 00:38:46 +0000
committerManman Ren <manman.ren@gmail.com>2013-07-20 00:38:46 +0000
commit96ea03839becf151b2eda518b4bc55b84f6373bf (patch)
tree8341a3e3bf7ab5d8e7be4f70f7ce4dd1341e536d /include
parentac9e819ca9ad93cfbcf0b7c5b0a7cbbd34cd9176 (diff)
downloadllvm-96ea03839becf151b2eda518b4bc55b84f6373bf.tar.gz
llvm-96ea03839becf151b2eda518b4bc55b84f6373bf.tar.bz2
llvm-96ea03839becf151b2eda518b4bc55b84f6373bf.tar.xz
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.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/llvm/DebugInfo.h b/include/llvm/DebugInfo.h
index 2a00ab02ec..5c74b172e9 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