| Index: tools/clang/blink_gc_plugin/RecordInfo.cpp
|
| diff --git a/tools/clang/blink_gc_plugin/RecordInfo.cpp b/tools/clang/blink_gc_plugin/RecordInfo.cpp
|
| index 2fa8d5363b92a3ebb30f301121e186615ca209fb..f8ec02527e37749d61798e77d41bf659ab24c492 100644
|
| --- a/tools/clang/blink_gc_plugin/RecordInfo.cpp
|
| +++ b/tools/clang/blink_gc_plugin/RecordInfo.cpp
|
| @@ -174,12 +174,13 @@ RecordInfo::Bases* RecordInfo::CollectBases() {
|
| for (CXXRecordDecl::base_class_iterator it = record_->bases_begin();
|
| it != record_->bases_end();
|
| ++it) {
|
| - if (CXXRecordDecl* base = it->getType()->getAsCXXRecordDecl()) {
|
| + const CXXBaseSpecifier& spec = *it;
|
| + if (CXXRecordDecl* base = spec.getType()->getAsCXXRecordDecl()) {
|
| RecordInfo* info = cache_->Lookup(base);
|
| TracingStatus status = info->InheritsNonPureTrace()
|
| ? TracingStatus::Needed()
|
| : TracingStatus::Unneeded();
|
| - bases->insert(std::make_pair(base, BasePoint(info, status)));
|
| + bases->insert(std::make_pair(base, BasePoint(spec, info, status)));
|
| }
|
| }
|
| return bases;
|
| @@ -241,6 +242,11 @@ void RecordInfo::DetermineTracingMethods() {
|
| }
|
| }
|
|
|
| +// TODO: Add classes with a finalize() method that specialize FinalizerTrait.
|
| +bool RecordInfo::NeedsFinalization() {
|
| + return record_->hasNonTrivialDestructor();
|
| +}
|
| +
|
| // A class needs tracing if:
|
| // - it is allocated on the managed heap,
|
| // - it defines a trace method (of the proper signature), or
|
| @@ -328,7 +334,7 @@ Edge* RecordInfo::CreateEdge(const Type* type) {
|
| size_t count = Config::CollectionDimension(info->name());
|
| if (!info->GetTemplateArgs(count, &args))
|
| return 0;
|
| - Collection* edge = new Collection(on_heap, is_root);
|
| + Collection* edge = new Collection(info, on_heap, is_root);
|
| for (TemplateArgs::iterator it = args.begin(); it != args.end(); ++it) {
|
| if (Edge* member = CreateEdge(*it)) {
|
| edge->members().push_back(member);
|
|
|