[lld] r226154 - Rename InputGraph.h -> Node.h.
Rui Ueyama
ruiu at google.com
Thu Jan 15 00:58:38 PST 2015
Author: ruiu
Date: Thu Jan 15 02:58:38 2015
New Revision: 226154
URL: http://llvm.org/viewvc/llvm-project?rev=226154&view=rev
Log:
Rename InputGraph.h -> Node.h.
Added:
lld/trunk/include/lld/Core/Node.h
- copied, changed from r226153, lld/trunk/include/lld/Core/InputGraph.h
Removed:
lld/trunk/include/lld/Core/InputGraph.h
Modified:
lld/trunk/include/lld/Core/LinkingContext.h
lld/trunk/include/lld/Driver/Driver.h
Removed: lld/trunk/include/lld/Core/InputGraph.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/include/lld/Core/InputGraph.h?rev=226153&view=auto
==============================================================================
--- lld/trunk/include/lld/Core/InputGraph.h (original)
+++ lld/trunk/include/lld/Core/InputGraph.h (removed)
@@ -1,76 +0,0 @@
-//===- lld/Core/InputGraph.h - Input Graph --------------------------------===//
-//
-// The LLVM Linker
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-///
-/// \file
-///
-/// Inputs to the linker in the form of a Graph.
-///
-//===----------------------------------------------------------------------===//
-
-#ifndef LLD_CORE_INPUT_GRAPH_H
-#define LLD_CORE_INPUT_GRAPH_H
-
-#include "lld/Core/File.h"
-#include "llvm/Option/ArgList.h"
-#include <memory>
-#include <vector>
-
-namespace lld {
-
-// A Node represents a FileNode or other type of Node. In the latter case,
-// the node contains meta information about the input file list.
-// Currently only GroupEnd node is defined as a meta node.
-class Node {
-public:
- enum class Kind { File, GroupEnd };
- Node(Kind type) : _kind(type) {}
- virtual ~Node() {}
- virtual Kind kind() const { return _kind; }
-
-private:
- Kind _kind;
-};
-
-// This is a marker for --end-group. getSize() returns the number of
-// files between the corresponding --start-group and this marker.
-class GroupEnd : public Node {
-public:
- GroupEnd(int size) : Node(Kind::GroupEnd), _size(size) {}
-
- int getSize() const { return _size; }
-
- static inline bool classof(const Node *a) {
- return a->kind() == Kind::GroupEnd;
- }
-
-private:
- int _size;
-};
-
-// A container of File.
-class FileNode : public Node {
-public:
- explicit FileNode(std::unique_ptr<File> f)
- : Node(Node::Kind::File), _file(std::move(f)) {}
-
- virtual ~FileNode() {}
-
- static inline bool classof(const Node *a) {
- return a->kind() == Node::Kind::File;
- }
-
- File *getFile() { return _file.get(); }
-
-protected:
- std::unique_ptr<File> _file;
-};
-
-} // namespace lld
-
-#endif // LLD_CORE_INPUT_GRAPH_H
Modified: lld/trunk/include/lld/Core/LinkingContext.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/include/lld/Core/LinkingContext.h?rev=226154&r1=226153&r2=226154&view=diff
==============================================================================
--- lld/trunk/include/lld/Core/LinkingContext.h (original)
+++ lld/trunk/include/lld/Core/LinkingContext.h Thu Jan 15 02:58:38 2015
@@ -11,8 +11,8 @@
#define LLD_CORE_LINKING_CONTEXT_H
#include "lld/Core/Error.h"
-#include "lld/Core/InputGraph.h"
#include "lld/Core/LLVM.h"
+#include "lld/Core/Node.h"
#include "lld/Core/Reference.h"
#include "lld/Core/range.h"
#include "lld/ReaderWriter/Reader.h"
Copied: lld/trunk/include/lld/Core/Node.h (from r226153, lld/trunk/include/lld/Core/InputGraph.h)
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/include/lld/Core/Node.h?p2=lld/trunk/include/lld/Core/Node.h&p1=lld/trunk/include/lld/Core/InputGraph.h&r1=226153&r2=226154&rev=226154&view=diff
==============================================================================
--- lld/trunk/include/lld/Core/InputGraph.h (original)
+++ lld/trunk/include/lld/Core/Node.h Thu Jan 15 02:58:38 2015
@@ -1,4 +1,4 @@
-//===- lld/Core/InputGraph.h - Input Graph --------------------------------===//
+//===- lld/Core/Node.h - Input file class ---------------------------------===//
//
// The LLVM Linker
//
@@ -9,12 +9,12 @@
///
/// \file
///
-/// Inputs to the linker in the form of a Graph.
+/// The classes in this file represents inputs to the linker.
///
//===----------------------------------------------------------------------===//
-#ifndef LLD_CORE_INPUT_GRAPH_H
-#define LLD_CORE_INPUT_GRAPH_H
+#ifndef LLD_CORE_NODE_H
+#define LLD_CORE_NODE_H
#include "lld/Core/File.h"
#include "llvm/Option/ArgList.h"
@@ -73,4 +73,4 @@ protected:
} // namespace lld
-#endif // LLD_CORE_INPUT_GRAPH_H
+#endif // LLD_CORE_NODE_H
Modified: lld/trunk/include/lld/Driver/Driver.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/include/lld/Driver/Driver.h?rev=226154&r1=226153&r2=226154&view=diff
==============================================================================
--- lld/trunk/include/lld/Driver/Driver.h (original)
+++ lld/trunk/include/lld/Driver/Driver.h Thu Jan 15 02:58:38 2015
@@ -17,8 +17,8 @@
#ifndef LLD_DRIVER_DRIVER_H
#define LLD_DRIVER_DRIVER_H
-#include "lld/Core/InputGraph.h"
#include "lld/Core/LLVM.h"
+#include "lld/Core/Node.h"
#include "llvm/ADT/Triple.h"
#include "llvm/Support/raw_ostream.h"
#include <memory>
More information about the llvm-commits
mailing list