Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(273)

Side by Side Diff: tools/clang/blink_gc_plugin/RecordInfo.h

Issue 898713004: Revert of Roll Clang 223108:228129 (Closed) Base URL: precise:/work/chromium/src@clang_roll_226907
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « tools/clang/blink_gc_plugin/Edge.h ('k') | tools/clang/blink_gc_plugin/tests/test.sh » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 // This file provides a wrapper for CXXRecordDecl that accumulates GC related 5 // This file provides a wrapper for CXXRecordDecl that accumulates GC related
6 // information about a class. Accumulated information is memoized and the info 6 // information about a class. Accumulated information is memoized and the info
7 // objects are stored in a RecordCache. 7 // objects are stored in a RecordCache.
8 8
9 #ifndef TOOLS_BLINK_GC_PLUGIN_RECORD_INFO_H_ 9 #ifndef TOOLS_BLINK_GC_PLUGIN_RECORD_INFO_H_
10 #define TOOLS_BLINK_GC_PLUGIN_RECORD_INFO_H_ 10 #define TOOLS_BLINK_GC_PLUGIN_RECORD_INFO_H_
11 11
12 #include <map> 12 #include <map>
13 #include <vector> 13 #include <vector>
14 14
15 #include "Edge.h" 15 #include "Edge.h"
16 16
17 #include "clang/AST/AST.h" 17 #include "clang/AST/AST.h"
18 #include "clang/AST/CXXInheritance.h" 18 #include "clang/AST/CXXInheritance.h"
19 19
20 class RecordCache; 20 class RecordCache;
21 21
22 // A potentially tracable and/or lifetime affecting point in the object graph. 22 // A potentially tracable and/or lifetime affecting point in the object graph.
23 class GraphPoint { 23 class GraphPoint {
24 public: 24 public:
25 GraphPoint() : traced_(false) {} 25 GraphPoint() : traced_(false) {}
26 virtual ~GraphPoint() {}
27 void MarkTraced() { traced_ = true; } 26 void MarkTraced() { traced_ = true; }
28 bool IsProperlyTraced() { return traced_ || !NeedsTracing().IsNeeded(); } 27 bool IsProperlyTraced() { return traced_ || !NeedsTracing().IsNeeded(); }
29 virtual const TracingStatus NeedsTracing() = 0; 28 virtual const TracingStatus NeedsTracing() = 0;
30 29
31 private: 30 private:
32 bool traced_; 31 bool traced_;
33 }; 32 };
34 33
35 class BasePoint : public GraphPoint { 34 class BasePoint : public GraphPoint {
36 public: 35 public:
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 } 175 }
177 } 176 }
178 } 177 }
179 178
180 private: 179 private:
181 typedef std::map<clang::CXXRecordDecl*, RecordInfo> Cache; 180 typedef std::map<clang::CXXRecordDecl*, RecordInfo> Cache;
182 Cache cache_; 181 Cache cache_;
183 }; 182 };
184 183
185 #endif // TOOLS_BLINK_GC_PLUGIN_RECORD_INFO_H_ 184 #endif // TOOLS_BLINK_GC_PLUGIN_RECORD_INFO_H_
OLDNEW
« no previous file with comments | « tools/clang/blink_gc_plugin/Edge.h ('k') | tools/clang/blink_gc_plugin/tests/test.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698