OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "Config.h" | 5 #include "Config.h" |
6 #include "RecordInfo.h" | 6 #include "RecordInfo.h" |
7 | 7 |
8 using namespace clang; | 8 using namespace clang; |
9 using std::string; | 9 using std::string; |
10 | 10 |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 is_eagerly_finalized_ = kTrue; | 179 is_eagerly_finalized_ = kTrue; |
180 break; | 180 break; |
181 } | 181 } |
182 } | 182 } |
183 } | 183 } |
184 } | 184 } |
185 } | 185 } |
186 return is_eagerly_finalized_; | 186 return is_eagerly_finalized_; |
187 } | 187 } |
188 | 188 |
| 189 bool RecordInfo::IsGCRefCounted() { |
| 190 if (!IsGCDerived()) |
| 191 return false; |
| 192 for (const auto& gc_base : gc_base_names_) { |
| 193 if (Config::IsGCRefCountedBase(gc_base)) |
| 194 return true; |
| 195 } |
| 196 return false; |
| 197 } |
| 198 |
189 bool RecordInfo::HasDefinition() { | 199 bool RecordInfo::HasDefinition() { |
190 return record_->hasDefinition(); | 200 return record_->hasDefinition(); |
191 } | 201 } |
192 | 202 |
193 RecordInfo* RecordCache::Lookup(CXXRecordDecl* record) { | 203 RecordInfo* RecordCache::Lookup(CXXRecordDecl* record) { |
194 // Ignore classes annotated with the GC_PLUGIN_IGNORE macro. | 204 // Ignore classes annotated with the GC_PLUGIN_IGNORE macro. |
195 if (!record || Config::IsIgnoreAnnotated(record)) | 205 if (!record || Config::IsIgnoreAnnotated(record)) |
196 return 0; | 206 return 0; |
197 Cache::iterator it = cache_.find(record); | 207 Cache::iterator it = cache_.find(record); |
198 if (it != cache_.end()) | 208 if (it != cache_.end()) |
(...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
664 edge->members().push_back(member); | 674 edge->members().push_back(member); |
665 } | 675 } |
666 // TODO: Handle the case where we fail to create an edge (eg, if the | 676 // TODO: Handle the case where we fail to create an edge (eg, if the |
667 // argument is a primitive type or just not fully known yet). | 677 // argument is a primitive type or just not fully known yet). |
668 } | 678 } |
669 return edge; | 679 return edge; |
670 } | 680 } |
671 | 681 |
672 return new Value(info); | 682 return new Value(info); |
673 } | 683 } |
OLD | NEW |