| Index: tools/clang/blink_gc_plugin/RecordInfo.h
|
| diff --git a/tools/clang/blink_gc_plugin/RecordInfo.h b/tools/clang/blink_gc_plugin/RecordInfo.h
|
| index 39c13f01c6dd9dca7134df1787854fd8b7e27a41..e672282f4f00f365cd8a95473e9dad459ef69b23 100644
|
| --- a/tools/clang/blink_gc_plugin/RecordInfo.h
|
| +++ b/tools/clang/blink_gc_plugin/RecordInfo.h
|
| @@ -16,6 +16,7 @@
|
|
|
| #include "clang/AST/AST.h"
|
| #include "clang/AST/CXXInheritance.h"
|
| +#include "clang/Frontend/CompilerInstance.h"
|
|
|
| class RecordCache;
|
|
|
| @@ -26,6 +27,7 @@ class GraphPoint {
|
| virtual ~GraphPoint() {}
|
| void MarkTraced() { traced_ = true; }
|
| bool IsProperlyTraced() { return traced_ || !NeedsTracing().IsNeeded(); }
|
| + bool IsInproperlyTraced() { return traced_ && NeedsTracing().IsIllegal(); }
|
| virtual const TracingStatus NeedsTracing() = 0;
|
|
|
| private:
|
| @@ -158,6 +160,11 @@ class RecordInfo {
|
|
|
| class RecordCache {
|
| public:
|
| + RecordCache(clang::CompilerInstance& instance)
|
| + : instance_(instance)
|
| + {
|
| + }
|
| +
|
| RecordInfo* Lookup(clang::CXXRecordDecl* record);
|
|
|
| RecordInfo* Lookup(const clang::CXXRecordDecl* record) {
|
| @@ -188,7 +195,11 @@ class RecordCache {
|
| }
|
| }
|
|
|
| + clang::CompilerInstance& instance() const { return instance_; }
|
| +
|
| private:
|
| + clang::CompilerInstance& instance_;
|
| +
|
| typedef std::map<clang::CXXRecordDecl*, RecordInfo> Cache;
|
| Cache cache_;
|
| };
|
|
|