| 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 a27f81023e68efbe9a6d265bd36bbea467ae4696..d8a53975699bd40ac2d9601a8e214d8d3d17e397 100644
|
| --- a/tools/clang/blink_gc_plugin/RecordInfo.h
|
| +++ b/tools/clang/blink_gc_plugin/RecordInfo.h
|
| @@ -32,13 +32,17 @@ class GraphPoint {
|
|
|
| class BasePoint : public GraphPoint {
|
| public:
|
| - BasePoint(RecordInfo* info, const TracingStatus& status)
|
| - : info_(info), status_(status) {}
|
| - RecordInfo* info() { return info_; }
|
| + BasePoint(const clang::CXXBaseSpecifier& spec,
|
| + RecordInfo* info,
|
| + const TracingStatus& status)
|
| + : spec_(spec), info_(info), status_(status) {}
|
| const TracingStatus NeedsTracing() { return status_; }
|
| // Needed to change the status of bases with a pure-virtual trace.
|
| void MarkUnneeded() { status_ = TracingStatus::Unneeded(); }
|
| + const clang::CXXBaseSpecifier& spec() { return spec_; }
|
| + RecordInfo* info() { return info_; }
|
| private:
|
| + const clang::CXXBaseSpecifier& spec_;
|
| RecordInfo* info_;
|
| TracingStatus status_;
|
| };
|
| @@ -82,9 +86,11 @@ class RecordInfo {
|
| bool IsGCDerived();
|
| bool IsGCAllocated();
|
| bool IsGCFinalized();
|
| + bool IsUnmixedGCMixin();
|
|
|
| bool IsStackAllocated();
|
| bool RequiresTraceMethod();
|
| + bool NeedsFinalization();
|
| TracingStatus NeedsTracing(Edge::NeedsTracingOption);
|
|
|
| private:
|
| @@ -134,6 +140,14 @@ class RecordCache {
|
| return Lookup(clang::dyn_cast<clang::CXXRecordDecl>(decl));
|
| }
|
|
|
| + RecordInfo* Lookup(const clang::Type* type) {
|
| + return Lookup(type->getAsCXXRecordDecl());
|
| + }
|
| +
|
| + RecordInfo* Lookup(const clang::QualType& type) {
|
| + return Lookup(type.getTypePtr());
|
| + }
|
| +
|
| ~RecordCache() {
|
| for (Cache::iterator it = cache_.begin(); it != cache_.end(); ++it) {
|
| if (!it->second.fields_)
|
|
|