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 | |
199 bool RecordInfo::HasDefinition() { | 189 bool RecordInfo::HasDefinition() { |
200 return record_->hasDefinition(); | 190 return record_->hasDefinition(); |
201 } | 191 } |
202 | 192 |
203 RecordInfo* RecordCache::Lookup(CXXRecordDecl* record) { | 193 RecordInfo* RecordCache::Lookup(CXXRecordDecl* record) { |
204 // Ignore classes annotated with the GC_PLUGIN_IGNORE macro. | 194 // Ignore classes annotated with the GC_PLUGIN_IGNORE macro. |
205 if (!record || Config::IsIgnoreAnnotated(record)) | 195 if (!record || Config::IsIgnoreAnnotated(record)) |
206 return 0; | 196 return 0; |
207 Cache::iterator it = cache_.find(record); | 197 Cache::iterator it = cache_.find(record); |
208 if (it != cache_.end()) | 198 if (it != cache_.end()) |
(...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
648 edge->members().push_back(member); | 638 edge->members().push_back(member); |
649 } | 639 } |
650 // TODO: Handle the case where we fail to create an edge (eg, if the | 640 // TODO: Handle the case where we fail to create an edge (eg, if the |
651 // argument is a primitive type or just not fully known yet). | 641 // argument is a primitive type or just not fully known yet). |
652 } | 642 } |
653 return edge; | 643 return edge; |
654 } | 644 } |
655 | 645 |
656 return new Value(info); | 646 return new Value(info); |
657 } | 647 } |
OLD | NEW |