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

Unified Diff: tools/clang/blink_gc_plugin/RecordInfo.h

Issue 1645763004: blink_gc_plugin: Make RecordInfo::Get{Fields,Bases} return deterministic order (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Revert the old fix attempt Created 4 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/clang/blink_gc_plugin/BlinkGCPluginConsumer.cpp ('k') | tools/clang/blink_gc_plugin/RecordInfo.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1a25d8342b8a22b5c605079e4a1637be09ecaf5a..b294ffe03b61a1a7ee838c37a0458a2988bb53a8 100644
--- a/tools/clang/blink_gc_plugin/RecordInfo.h
+++ b/tools/clang/blink_gc_plugin/RecordInfo.h
@@ -69,8 +69,15 @@ class FieldPoint : public GraphPoint {
// Wrapper class to lazily collect information about a C++ record.
class RecordInfo {
public:
- typedef std::map<clang::CXXRecordDecl*, BasePoint> Bases;
- typedef std::map<clang::FieldDecl*, FieldPoint> Fields;
+ typedef std::vector<std::pair<clang::CXXRecordDecl*, BasePoint>> Bases;
+
+ struct FieldDeclCmp {
+ bool operator()(clang::FieldDecl* a, clang::FieldDecl *b) const {
+ return a->getLocStart() < b->getLocStart();
+ }
+ };
+ typedef std::map<clang::FieldDecl*, FieldPoint, FieldDeclCmp> Fields;
+
typedef std::vector<const clang::Type*> TemplateArgs;
~RecordInfo();
« no previous file with comments | « tools/clang/blink_gc_plugin/BlinkGCPluginConsumer.cpp ('k') | tools/clang/blink_gc_plugin/RecordInfo.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698