How to be dumb on $5/day. Need a tri-state to track valid debug descriptors.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27154 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Jim Laskey
2006-03-26 22:45:20 +00:00
parent bd6be6f52d
commit 98e0410f07
2 changed files with 38 additions and 30 deletions

View File

@ -773,16 +773,21 @@ public:
/// GlobalVariables are valid as DebugInfoDesc objects.
class DIVerifier {
private:
enum {
Unknown = 0,
Invalid,
Valid
};
unsigned DebugVersion; // Version of debug information in use.
std::set<GlobalVariable *> Visited; // Tracks visits during recursion.
std::map<GlobalVariable *, unsigned> Validity;// Tracks prior results.
std::map<unsigned, unsigned> Counts; // Count of fields per Tag type.
/// markVisited - Return true if the GlobalVariable hase been "seen" before.
/// Mark markVisited otherwise.
bool markVisited(GlobalVariable *GV);
public:
DIVerifier() : DebugVersion(LLVMDebugVersion) {}
DIVerifier()
: DebugVersion(LLVMDebugVersion)
, Validity()
, Counts()
{}
~DIVerifier() {}
/// Verify - Return true if the GlobalVariable appears to be a valid