Print aliases in topological order, that is, for any alias a = b,
b must be printed before a. This is because on some targets (e.g. PowerPC)
linker expects aliases in such an order to generate correct TOC information.
For example, on PowerPC, GCC will produce following symbol:
~ % readelf -s tcmalloc_gcc.pic.o|grep '_Znam\b' 1057: 00000000000001e4 100 FUNC GLOBAL DEFAULT [<localentry>: 8] 508 _Znam
But LLVM without this change will produce:
~ % readelf -s tcmalloc_llvm.pic.o|grep '_Znam\b' 870: 0000000000000000 100 FUNC GLOBAL DEFAULT 94 _Znam
I'm not sure if it's the right change, since I don't know who is supposed to do this ordering.
Nit: No braces around single conditionals.