[cmake] Unbreak LLVM-Config.cmake / llvm_expand_dependencies.
authorPeter Zotov <whitequark@whitequark.org>
Thu, 18 Dec 2014 23:56:52 +0000 (23:56 +0000)
committerPeter Zotov <whitequark@whitequark.org>
Thu, 18 Dec 2014 23:56:52 +0000 (23:56 +0000)
commit827f4eb6a32ec66d8c13ab87447c06c7d0bb83b9
tree46ba78c51f02d1909fcfee0ed016fd3b244ba540
parent73059bd1f10f28f574304c98038b91103cfdb68c
[cmake] Unbreak LLVM-Config.cmake / llvm_expand_dependencies.

The algorithm for sorting libraries in topological order, as
previously implemented, had a few issues:
  * It didn't make any sense.
  * It didn't actually sort libraries in topological order.
  * It hung on some inputs, e.g. "LLVMipo".

This commit replaces the old algorithm with a straightforward port
from llvm-config.cpp.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224554 91177308-0d34-0410-b5e6-96231b3b80d8
cmake/modules/LLVM-Config.cmake