[AsmPrinter] Print aliases in topological order
authorTim Shen <timshen91@gmail.com>
Thu, 31 Mar 2016 22:08:19 +0000 (22:08 +0000)
committerTim Shen <timshen91@gmail.com>
Thu, 31 Mar 2016 22:08:19 +0000 (22:08 +0000)
commit800ed436e543997e061348ec5b700a45b3b3d675
treed959b2cbd3d1409cd99f5e30fb7e0d4efd184902
parentb472856a73118fe8cebc2b53f5cd963e2125d518
[AsmPrinter] Print aliases in topological order

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.

GCC also prints aliases in topological order.

llvm-svn: 265064
llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
llvm/test/CodeGen/Generic/asm-printer-topological-order.ll [new file with mode: 0644]