diff options
| author | Dan Willemsen <dwillemsen@google.com> | 2015-10-01 16:07:48 -0700 |
|---|---|---|
| committer | Dan Willemsen <dwillemsen@google.com> | 2015-10-01 16:12:36 -0700 |
| commit | b248caabf20589d5f5a3adbb1e88d2c286eaa466 (patch) | |
| tree | e9f5a355e9f41e8a3bbc49e7e110419bfae46f19 /symtab.h | |
| parent | a62b02a1251a0f6c452a25fce03258f12472507f (diff) | |
Use ordered containers to prevent changes to ninja files
When using --gen_all_targets / --gen_all_phony_targets, we're changing
the selected targets using unordered containers. This causes trivial
changes to the makefiles to trigger large changes to the generated ninja
files. Switch to using ordered containers so that the order is the same
every time.
Diffstat (limited to 'symtab.h')
| -rw-r--r-- | symtab.h | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -66,6 +66,10 @@ inline bool operator==(const Symbol& x, const Symbol& y) { return x.val() == y.val(); } +inline bool operator<(const Symbol& x, const Symbol& y) { + return x.str() < y.str(); +} + namespace std { template<> struct hash<Symbol> { size_t operator()(const Symbol& s) const { |
