[PATCH] Greatly simplify InputGraph.

Shankar Kalpathi Easwaran shankarke at gmail.com
Tue Apr 1 14:46:21 PDT 2014



================
Comment at: include/lld/Core/InputGraph.h:86
@@ -85,3 @@
-  /// \brief Validate the input graph
-  virtual bool validate();
-
----------------
This is very essential for validating the graph. Currently we dont have code to validate but essentially a place holder to validate command line options.

================
Comment at: include/lld/Core/InputGraph.h:131
@@ -130,3 +118,3 @@
   enum class Kind : uint8_t {
-    Control,    // Represents a type associated with ControlNodes
     File        // Represents a type associated with File Nodes
----------------
One type of control node was Group node which we have. We will have cases in the future to make different kinds of control nodes. If others are ok, with this change being removed, I am ok.

================
Comment at: include/lld/Core/InputGraph.h:186-188
@@ -185,5 +159,1 @@
 
-  /// \brief Is this a hidden node, hidden nodes are not part of
-  /// of the resolver.
-  virtual bool isHidden() const { return false; }
-
----------------
why is this removed ? The linker script node is a hidden node, thats not used by the resolver, and has to be skipped. We have unit tests that capture it (InputGraphTest in unittests).

================
Comment at: lib/Driver/Driver.cpp:58
@@ -57,3 +57,1 @@
   for (auto &ie : inputGraph.inputElements()) {
-    // Skip Hidden elements.
-    if (ie->isHidden())
----------------
see comment above.


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



More information about the llvm-commits mailing list