Greatly simplify InputGraph.
authorRui Ueyama <ruiu@google.com>
Tue, 1 Apr 2014 21:55:36 +0000 (21:55 +0000)
committerRui Ueyama <ruiu@google.com>
Tue, 1 Apr 2014 21:55:36 +0000 (21:55 +0000)
commit5632e26d364bb3639a50ae1bcbda117862bf44c0
treef35f78640330ba94bdb5d49713c64ae324e54592
parentc744492f7c19ef6baeb9b60dc2ad7ff9cc2051f5
Greatly simplify InputGraph.

InputGraph has too many knobs and controls that are not being used. This
patch is to remove dead code, unused features and a class. There are two
things that worth noting, besides simple dead code removal:

1. ControlNode class is removed. We had it as the base class of Group
class, but it provides no functionality particularly meaningful. We now
have shallower class hierarchy that is easier to understand.

2. InputGraph provides a feature to replace a node with its internal data.
It is being used to "expand" some type of node, such as a Linker Script
node, with its actual files. We used to have two options when replacing
it -- ExpandOnly or ExpandAndReplace. ExpandOnly was to expand it but not
remove the node from the tree. There is no use of that option in the code,
so it was a dead feature.

Differential Revision: http://llvm-reviews.chandlerc.com/D3252

llvm-svn: 205363
12 files changed:
lld/include/lld/Core/InputGraph.h
lld/include/lld/Driver/CoreInputGraph.h
lld/include/lld/Driver/DarwinInputGraph.h
lld/include/lld/Driver/GnuLdInputGraph.h
lld/include/lld/Driver/WinLinkInputGraph.h
lld/lib/Core/InputGraph.cpp
lld/lib/Driver/CoreDriver.cpp
lld/lib/Driver/Driver.cpp
lld/lib/Driver/GnuLdDriver.cpp
lld/lib/Driver/GnuLdInputGraph.cpp
lld/lib/Driver/WinLinkDriver.cpp
lld/unittests/DriverTests/InputGraphTest.cpp