[lld] r226732 - Fix five of the shared library build targets
Greg Fitzgerald
garious at gmail.com
Wed Jan 21 14:54:57 PST 2015
Author: garious
Date: Wed Jan 21 16:54:56 2015
New Revision: 226732
URL: http://llvm.org/viewvc/llvm-project?rev=226732&view=rev
Log:
Fix five of the shared library build targets
Before this patch there was a cyclic dependency between lldCore and
lldReaderWriter. Only lldConfig could be built as a shared library.
* Moved Reader and Writer base classes into lldCore.
* The following shared libraries can now be built:
lldCore
lldYAML
lldNative
lldPasses
lldReaderWriter
Differential Revision: http://reviews.llvm.org/D7105
From: Greg Fitzgerald <garious at gmail.com>
Added:
lld/trunk/include/lld/Core/Reader.h
- copied, changed from r226706, lld/trunk/include/lld/ReaderWriter/Reader.h
lld/trunk/include/lld/Core/Writer.h
- copied, changed from r226706, lld/trunk/include/lld/ReaderWriter/Writer.h
lld/trunk/lib/Core/Reader.cpp
- copied, changed from r226706, lld/trunk/lib/ReaderWriter/Reader.cpp
lld/trunk/lib/Core/Writer.cpp
- copied, changed from r226706, lld/trunk/lib/ReaderWriter/Writer.cpp
Removed:
lld/trunk/include/lld/ReaderWriter/Reader.h
lld/trunk/include/lld/ReaderWriter/Writer.h
lld/trunk/lib/ReaderWriter/Reader.cpp
lld/trunk/lib/ReaderWriter/Writer.cpp
Modified:
lld/trunk/docs/Readers.rst
lld/trunk/include/lld/Core/LinkingContext.h
lld/trunk/include/lld/Passes/LayoutPass.h
lld/trunk/include/lld/ReaderWriter/CoreLinkingContext.h
lld/trunk/include/lld/ReaderWriter/ELFLinkingContext.h
lld/trunk/include/lld/ReaderWriter/MachOLinkingContext.h
lld/trunk/include/lld/ReaderWriter/PECOFFLinkingContext.h
lld/trunk/lib/Core/CMakeLists.txt
lld/trunk/lib/Core/LinkingContext.cpp
lld/trunk/lib/Driver/CoreDriver.cpp
lld/trunk/lib/Driver/Driver.cpp
lld/trunk/lib/Passes/CMakeLists.txt
lld/trunk/lib/Passes/RoundTripNativePass.cpp
lld/trunk/lib/Passes/RoundTripYAMLPass.cpp
lld/trunk/lib/ReaderWriter/CMakeLists.txt
lld/trunk/lib/ReaderWriter/ELF/ELFReader.h
lld/trunk/lib/ReaderWriter/ELF/OutputELFWriter.h
lld/trunk/lib/ReaderWriter/ELF/SegmentChunks.h
lld/trunk/lib/ReaderWriter/ELF/Writer.cpp
lld/trunk/lib/ReaderWriter/ELF/Writer.h
lld/trunk/lib/ReaderWriter/MachO/MachOLinkingContext.cpp
lld/trunk/lib/ReaderWriter/MachO/WriterMachO.cpp
lld/trunk/lib/ReaderWriter/Native/CMakeLists.txt
lld/trunk/lib/ReaderWriter/Native/Makefile
lld/trunk/lib/ReaderWriter/Native/ReaderNative.cpp
lld/trunk/lib/ReaderWriter/Native/WriterNative.cpp
lld/trunk/lib/ReaderWriter/PECOFF/PECOFFLinkingContext.cpp
lld/trunk/lib/ReaderWriter/PECOFF/ReaderCOFF.cpp
lld/trunk/lib/ReaderWriter/PECOFF/WriterPECOFF.cpp
lld/trunk/lib/ReaderWriter/YAML/CMakeLists.txt
lld/trunk/lib/ReaderWriter/YAML/Makefile
lld/trunk/lib/ReaderWriter/YAML/ReaderWriterYAML.cpp
Modified: lld/trunk/docs/Readers.rst
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/docs/Readers.rst?rev=226732&r1=226731&r2=226732&view=diff
==============================================================================
--- lld/trunk/docs/Readers.rst (original)
+++ lld/trunk/docs/Readers.rst Wed Jan 21 16:54:56 2015
@@ -10,8 +10,8 @@ The purpose of a "Reader" is to take an
and create an `lld::File`:cpp:class: (which is a graph of Atoms)
representing the object file. A Reader inherits from
`lld::Reader`:cpp:class: which lives in
-:file:`include/lld/ReaderWriter/Reader.h` and
-:file:`lib/ReaderWriter/Reader.cpp`.
+:file:`include/lld/Core/Reader.h` and
+:file:`lib/Core/Reader.cpp`.
The Reader infrastructure for an object format ``Foo`` requires the
following pieces in order to fit into lld:
Modified: lld/trunk/include/lld/Core/LinkingContext.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/include/lld/Core/LinkingContext.h?rev=226732&r1=226731&r2=226732&view=diff
==============================================================================
--- lld/trunk/include/lld/Core/LinkingContext.h (original)
+++ lld/trunk/include/lld/Core/LinkingContext.h Wed Jan 21 16:54:56 2015
@@ -16,7 +16,7 @@
#include "lld/Core/Parallel.h"
#include "lld/Core/Reference.h"
#include "lld/Core/range.h"
-#include "lld/ReaderWriter/Reader.h"
+#include "lld/Core/Reader.h"
#include "llvm/Support/ErrorOr.h"
#include "llvm/Support/raw_ostream.h"
#include <string>
Copied: lld/trunk/include/lld/Core/Reader.h (from r226706, lld/trunk/include/lld/ReaderWriter/Reader.h)
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/include/lld/Core/Reader.h?p2=lld/trunk/include/lld/Core/Reader.h&p1=lld/trunk/include/lld/ReaderWriter/Reader.h&r1=226706&r2=226732&rev=226732&view=diff
==============================================================================
--- lld/trunk/include/lld/ReaderWriter/Reader.h (original)
+++ lld/trunk/include/lld/Core/Reader.h Wed Jan 21 16:54:56 2015
@@ -1,4 +1,4 @@
-//===- lld/ReaderWriter/Reader.h - Abstract File Format Reading Interface -===//
+//===- lld/Core/Reader.h - Abstract File Format Reading Interface ---------===//
//
// The LLVM Linker
//
@@ -7,8 +7,8 @@
//
//===----------------------------------------------------------------------===//
-#ifndef LLD_READER_WRITER_READER_H
-#define LLD_READER_WRITER_READER_H
+#ifndef LLD_CORE_READER_H
+#define LLD_CORE_READER_H
#include "lld/Core/LLVM.h"
#include "lld/Core/Reference.h"
Copied: lld/trunk/include/lld/Core/Writer.h (from r226706, lld/trunk/include/lld/ReaderWriter/Writer.h)
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/include/lld/Core/Writer.h?p2=lld/trunk/include/lld/Core/Writer.h&p1=lld/trunk/include/lld/ReaderWriter/Writer.h&r1=226706&r2=226732&rev=226732&view=diff
==============================================================================
--- lld/trunk/include/lld/ReaderWriter/Writer.h (original)
+++ lld/trunk/include/lld/Core/Writer.h Wed Jan 21 16:54:56 2015
@@ -1,4 +1,4 @@
-//===- lld/ReaderWriter/Writer.h - Abstract File Format Interface ---------===//
+//===- lld/Core/Writer.h - Abstract File Format Interface -----------------===//
//
// The LLVM Linker
//
@@ -7,8 +7,8 @@
//
//===----------------------------------------------------------------------===//
-#ifndef LLD_READER_WRITER_WRITER_H
-#define LLD_READER_WRITER_WRITER_H
+#ifndef LLD_CORE_WRITER_H
+#define LLD_CORE_WRITER_H
#include "lld/Core/LLVM.h"
#include <memory>
Modified: lld/trunk/include/lld/Passes/LayoutPass.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/include/lld/Passes/LayoutPass.h?rev=226732&r1=226731&r2=226732&view=diff
==============================================================================
--- lld/trunk/include/lld/Passes/LayoutPass.h (original)
+++ lld/trunk/include/lld/Passes/LayoutPass.h Wed Jan 21 16:54:56 2015
@@ -12,7 +12,7 @@
#include "lld/Core/File.h"
#include "lld/Core/Pass.h"
-#include "lld/ReaderWriter/Reader.h"
+#include "lld/Core/Reader.h"
#include "llvm/ADT/DenseMap.h"
#include <map>
#include <string>
Modified: lld/trunk/include/lld/ReaderWriter/CoreLinkingContext.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/include/lld/ReaderWriter/CoreLinkingContext.h?rev=226732&r1=226731&r2=226732&view=diff
==============================================================================
--- lld/trunk/include/lld/ReaderWriter/CoreLinkingContext.h (original)
+++ lld/trunk/include/lld/ReaderWriter/CoreLinkingContext.h Wed Jan 21 16:54:56 2015
@@ -11,8 +11,8 @@
#define LLD_READER_WRITER_CORE_LINKER_CONTEXT_H
#include "lld/Core/LinkingContext.h"
-#include "lld/ReaderWriter/Reader.h"
-#include "lld/ReaderWriter/Writer.h"
+#include "lld/Core/Reader.h"
+#include "lld/Core/Writer.h"
#include "llvm/Support/ErrorHandling.h"
namespace lld {
Modified: lld/trunk/include/lld/ReaderWriter/ELFLinkingContext.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/include/lld/ReaderWriter/ELFLinkingContext.h?rev=226732&r1=226731&r2=226732&view=diff
==============================================================================
--- lld/trunk/include/lld/ReaderWriter/ELFLinkingContext.h (original)
+++ lld/trunk/include/lld/ReaderWriter/ELFLinkingContext.h Wed Jan 21 16:54:56 2015
@@ -15,8 +15,8 @@
#include "lld/Core/PassManager.h"
#include "lld/Core/STDExtras.h"
#include "lld/Core/range.h"
-#include "lld/ReaderWriter/Reader.h"
-#include "lld/ReaderWriter/Writer.h"
+#include "lld/Core/Reader.h"
+#include "lld/Core/Writer.h"
#include "llvm/ADT/StringSet.h"
#include "llvm/ADT/Triple.h"
#include "llvm/Object/ELF.h"
Modified: lld/trunk/include/lld/ReaderWriter/MachOLinkingContext.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/include/lld/ReaderWriter/MachOLinkingContext.h?rev=226732&r1=226731&r2=226732&view=diff
==============================================================================
--- lld/trunk/include/lld/ReaderWriter/MachOLinkingContext.h (original)
+++ lld/trunk/include/lld/ReaderWriter/MachOLinkingContext.h Wed Jan 21 16:54:56 2015
@@ -11,8 +11,8 @@
#define LLD_READER_WRITER_MACHO_LINKING_CONTEXT_H
#include "lld/Core/LinkingContext.h"
-#include "lld/ReaderWriter/Reader.h"
-#include "lld/ReaderWriter/Writer.h"
+#include "lld/Core/Reader.h"
+#include "lld/Core/Writer.h"
#include "llvm/ADT/StringMap.h"
#include "llvm/ADT/StringSet.h"
#include "llvm/Support/ErrorHandling.h"
Modified: lld/trunk/include/lld/ReaderWriter/PECOFFLinkingContext.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/include/lld/ReaderWriter/PECOFFLinkingContext.h?rev=226732&r1=226731&r2=226732&view=diff
==============================================================================
--- lld/trunk/include/lld/ReaderWriter/PECOFFLinkingContext.h (original)
+++ lld/trunk/include/lld/ReaderWriter/PECOFFLinkingContext.h Wed Jan 21 16:54:56 2015
@@ -11,8 +11,8 @@
#define LLD_READER_WRITER_PECOFF_LINKING_CONTEXT_H
#include "lld/Core/LinkingContext.h"
-#include "lld/ReaderWriter/Reader.h"
-#include "lld/ReaderWriter/Writer.h"
+#include "lld/Core/Reader.h"
+#include "lld/Core/Writer.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/Support/Allocator.h"
#include "llvm/Support/COFF.h"
Removed: lld/trunk/include/lld/ReaderWriter/Reader.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/include/lld/ReaderWriter/Reader.h?rev=226731&view=auto
==============================================================================
--- lld/trunk/include/lld/ReaderWriter/Reader.h (original)
+++ lld/trunk/include/lld/ReaderWriter/Reader.h (removed)
@@ -1,170 +0,0 @@
-//===- lld/ReaderWriter/Reader.h - Abstract File Format Reading Interface -===//
-//
-// The LLVM Linker
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef LLD_READER_WRITER_READER_H
-#define LLD_READER_WRITER_READER_H
-
-#include "lld/Core/LLVM.h"
-#include "lld/Core/Reference.h"
-#include "llvm/Support/FileSystem.h"
-#include "llvm/Support/YAMLTraits.h"
-#include <functional>
-#include <memory>
-#include <vector>
-
-using llvm::sys::fs::file_magic;
-
-namespace llvm {
-namespace yaml {
-class IO;
-}
-}
-
-namespace lld {
-class ELFLinkingContext;
-class File;
-class LinkingContext;
-class PECOFFLinkingContext;
-class TargetHandlerBase;
-class MachOLinkingContext;
-
-/// \brief An abstract class for reading object files, library files, and
-/// executable files.
-///
-/// Each file format (e.g. ELF, mach-o, PECOFF, native, etc) have a concrete
-/// subclass of Reader.
-class Reader {
-public:
- virtual ~Reader() {}
-
- /// Sniffs the file to determine if this Reader can parse it.
- /// The method is called with:
- /// 1) the file_magic enumeration returned by identify_magic()
- /// 2) the file extension (e.g. ".obj")
- /// 3) the whole file content buffer if the above is not enough.
- virtual bool canParse(file_magic magic, StringRef fileExtension,
- const MemoryBuffer &mb) const = 0;
-
- /// \brief Parse a supplied buffer (already filled with the contents of a
- /// file) and create a File object.
- /// The resulting File object takes ownership of the MemoryBuffer.
- virtual std::error_code
- loadFile(std::unique_ptr<MemoryBuffer> mb, const class Registry &,
- std::vector<std::unique_ptr<File>> &result) const = 0;
-};
-
-
-/// \brief An abstract class for handling alternate yaml representations
-/// of object files.
-///
-/// The YAML syntax allows "tags" which are used to specify the type of
-/// the YAML node. In lld, top level YAML documents can be in many YAML
-/// representations (e.g mach-o encoded as yaml, etc). A tag is used to
-/// specify which representation is used in the following YAML document.
-/// To work, there must be a YamlIOTaggedDocumentHandler registered that
-/// handles each tag type.
-class YamlIOTaggedDocumentHandler {
-public:
- virtual ~YamlIOTaggedDocumentHandler();
-
- /// This method is called on each registered YamlIOTaggedDocumentHandler
- /// until one returns true. If the subclass handles tag type !xyz, then
- /// this method should call io.mapTag("!xzy") to see if that is the current
- /// document type, and if so, process the rest of the document using
- /// YAML I/O, then convert the result into an lld::File* and return it.
- virtual bool handledDocTag(llvm::yaml::IO &io, const lld::File *&f) const = 0;
-};
-
-
-/// A registry to hold the list of currently registered Readers and
-/// tables which map Reference kind values to strings.
-/// The linker does not directly invoke Readers. Instead, it registers
-/// Readers based on it configuration and command line options, then calls
-/// the Registry object to parse files.
-class Registry {
-public:
- Registry();
-
- /// Walk the list of registered Readers and find one that can parse the
- /// supplied file and parse it.
- std::error_code loadFile(std::unique_ptr<MemoryBuffer> mb,
- std::vector<std::unique_ptr<File>> &result) const;
-
- /// Walk the list of registered kind tables to convert a Reference Kind
- /// name to a value.
- bool referenceKindFromString(StringRef inputStr, Reference::KindNamespace &ns,
- Reference::KindArch &a,
- Reference::KindValue &value) const;
-
- /// Walk the list of registered kind tables to convert a Reference Kind
- /// value to a string.
- bool referenceKindToString(Reference::KindNamespace ns, Reference::KindArch a,
- Reference::KindValue value, StringRef &) const;
-
- /// Walk the list of registered tag handlers and have the one that handles
- /// the current document type process the yaml into an lld::File*.
- bool handleTaggedDoc(llvm::yaml::IO &io, const lld::File *&file) const;
-
- // These methods are called to dynamically add support for various file
- // formats. The methods are also implemented in the appropriate lib*.a
- // library, so that the code for handling a format is only linked in, if this
- // method is used. Any options that a Reader might need must be passed
- // as parameters to the addSupport*() method.
- void addSupportArchives(bool logLoading);
- void addSupportYamlFiles();
- void addSupportNativeObjects();
- void addSupportCOFFObjects(PECOFFLinkingContext &);
- void addSupportCOFFImportLibraries(PECOFFLinkingContext &);
- void addSupportMachOObjects(MachOLinkingContext &);
- void addSupportELFObjects(bool atomizeStrings, TargetHandlerBase *handler);
- void addSupportELFDynamicSharedObjects(bool useShlibUndefines,
- TargetHandlerBase *handler);
-
- /// To convert between kind values and names, the registry walks the list
- /// of registered kind tables. Each table is a zero terminated array of
- /// KindStrings elements.
- struct KindStrings {
- Reference::KindValue value;
- StringRef name;
- };
-
- /// A Reference Kind value is a tuple of <namespace, arch, value>. All
- /// entries in a conversion table have the same <namespace, arch>. The
- /// array then contains the value/name pairs.
- void addKindTable(Reference::KindNamespace ns, Reference::KindArch arch,
- const KindStrings array[]);
-
-
-private:
- struct KindEntry {
- Reference::KindNamespace ns;
- Reference::KindArch arch;
- const KindStrings *array;
- };
-
- void add(std::unique_ptr<Reader>);
- void add(std::unique_ptr<YamlIOTaggedDocumentHandler>);
-
- std::vector<std::unique_ptr<Reader>> _readers;
- std::vector<std::unique_ptr<YamlIOTaggedDocumentHandler>> _yamlHandlers;
- std::vector<KindEntry> _kindEntries;
-};
-
-// Utilities for building a KindString table. For instance:
-// static const Registry::KindStrings table[] = {
-// LLD_KIND_STRING_ENTRY(R_VAX_ADDR16),
-// LLD_KIND_STRING_ENTRY(R_VAX_DATA16),
-// LLD_KIND_STRING_END
-// };
-#define LLD_KIND_STRING_ENTRY(name) { name, #name }
-#define LLD_KIND_STRING_END { 0, "" }
-
-} // end namespace lld
-
-#endif
Removed: lld/trunk/include/lld/ReaderWriter/Writer.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/include/lld/ReaderWriter/Writer.h?rev=226731&view=auto
==============================================================================
--- lld/trunk/include/lld/ReaderWriter/Writer.h (original)
+++ lld/trunk/include/lld/ReaderWriter/Writer.h (removed)
@@ -1,52 +0,0 @@
-//===- lld/ReaderWriter/Writer.h - Abstract File Format Interface ---------===//
-//
-// The LLVM Linker
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef LLD_READER_WRITER_WRITER_H
-#define LLD_READER_WRITER_WRITER_H
-
-#include "lld/Core/LLVM.h"
-#include <memory>
-#include <vector>
-
-namespace lld {
-class File;
-class ELFLinkingContext;
-class MachOLinkingContext;
-class PECOFFLinkingContext;
-class LinkingContext;
-class TargetHandlerBase;
-
-/// \brief The Writer is an abstract class for writing object files, shared
-/// library files, and executable files. Each file format (e.g. ELF, mach-o,
-/// PECOFF, native, etc) have a concrete subclass of Writer.
-class Writer {
-public:
- virtual ~Writer();
-
- /// \brief Write a file from the supplied File object
- virtual std::error_code writeFile(const File &linkedFile, StringRef path) = 0;
-
- /// \brief This method is called by Core Linking to give the Writer a chance
- /// to add file format specific "files" to set of files to be linked. This is
- /// how file format specific atoms can be added to the link.
- virtual bool createImplicitFiles(std::vector<std::unique_ptr<File> > &);
-
-protected:
- // only concrete subclasses can be instantiated
- Writer();
-};
-
-std::unique_ptr<Writer> createWriterELF(TargetHandlerBase *handler);
-std::unique_ptr<Writer> createWriterMachO(const MachOLinkingContext &);
-std::unique_ptr<Writer> createWriterPECOFF(const PECOFFLinkingContext &);
-std::unique_ptr<Writer> createWriterNative(const LinkingContext &);
-std::unique_ptr<Writer> createWriterYAML(const LinkingContext &);
-} // end namespace lld
-
-#endif
Modified: lld/trunk/lib/Core/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/Core/CMakeLists.txt?rev=226732&r1=226731&r2=226732&view=diff
==============================================================================
--- lld/trunk/lib/Core/CMakeLists.txt (original)
+++ lld/trunk/lib/Core/CMakeLists.txt Wed Jan 21 16:54:56 2015
@@ -3,8 +3,10 @@ add_llvm_library(lldCore
Error.cpp
File.cpp
LinkingContext.cpp
+ Reader.cpp
Resolver.cpp
SymbolTable.cpp
+ Writer.cpp
LINK_LIBS
LLVMSupport
)
Modified: lld/trunk/lib/Core/LinkingContext.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/Core/LinkingContext.cpp?rev=226732&r1=226731&r2=226732&view=diff
==============================================================================
--- lld/trunk/lib/Core/LinkingContext.cpp (original)
+++ lld/trunk/lib/Core/LinkingContext.cpp Wed Jan 21 16:54:56 2015
@@ -11,7 +11,7 @@
#include "lld/Core/LinkingContext.h"
#include "lld/Core/Resolver.h"
#include "lld/Core/Simple.h"
-#include "lld/ReaderWriter/Writer.h"
+#include "lld/Core/Writer.h"
#include "llvm/ADT/Triple.h"
#include "llvm/Support/Process.h"
Copied: lld/trunk/lib/Core/Reader.cpp (from r226706, lld/trunk/lib/ReaderWriter/Reader.cpp)
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/Core/Reader.cpp?p2=lld/trunk/lib/Core/Reader.cpp&p1=lld/trunk/lib/ReaderWriter/Reader.cpp&r1=226706&r2=226732&rev=226732&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/Reader.cpp (original)
+++ lld/trunk/lib/Core/Reader.cpp Wed Jan 21 16:54:56 2015
@@ -1,4 +1,4 @@
-//===- lib/ReaderWriter/Reader.cpp ----------------------------------------===//
+//===- lib/Core/Reader.cpp ------------------------------------------------===//
//
// The LLVM Linker
//
@@ -8,7 +8,7 @@
//===----------------------------------------------------------------------===//
#include "lld/Core/File.h"
-#include "lld/ReaderWriter/Reader.h"
+#include "lld/Core/Reader.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Support/Errc.h"
#include "llvm/Support/FileUtilities.h"
Copied: lld/trunk/lib/Core/Writer.cpp (from r226706, lld/trunk/lib/ReaderWriter/Writer.cpp)
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/Core/Writer.cpp?p2=lld/trunk/lib/Core/Writer.cpp&p1=lld/trunk/lib/ReaderWriter/Writer.cpp&r1=226706&r2=226732&rev=226732&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/Writer.cpp (original)
+++ lld/trunk/lib/Core/Writer.cpp Wed Jan 21 16:54:56 2015
@@ -1,4 +1,4 @@
-//===- lib/ReaderWriter/Writer.cpp ----------------------------------------===//
+//===- lib/Core/Writer.cpp ------------------------------------------------===//
//
// The LLVM Linker
//
@@ -8,7 +8,7 @@
//===----------------------------------------------------------------------===//
#include "lld/Core/File.h"
-#include "lld/ReaderWriter/Writer.h"
+#include "lld/Core/Writer.h"
namespace lld {
Writer::Writer() {
Modified: lld/trunk/lib/Driver/CoreDriver.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/Driver/CoreDriver.cpp?rev=226732&r1=226731&r2=226732&view=diff
==============================================================================
--- lld/trunk/lib/Driver/CoreDriver.cpp (original)
+++ lld/trunk/lib/Driver/CoreDriver.cpp Wed Jan 21 16:54:56 2015
@@ -7,9 +7,9 @@
//
//===----------------------------------------------------------------------===//
+#include "lld/Core/Reader.h"
#include "lld/Driver/Driver.h"
#include "lld/ReaderWriter/CoreLinkingContext.h"
-#include "lld/ReaderWriter/Reader.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/Triple.h"
Modified: lld/trunk/lib/Driver/Driver.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/Driver/Driver.cpp?rev=226732&r1=226731&r2=226732&view=diff
==============================================================================
--- lld/trunk/lib/Driver/Driver.cpp (original)
+++ lld/trunk/lib/Driver/Driver.cpp Wed Jan 21 16:54:56 2015
@@ -13,12 +13,12 @@
#include "lld/Core/LLVM.h"
#include "lld/Core/Parallel.h"
#include "lld/Core/PassManager.h"
+#include "lld/Core/Reader.h"
#include "lld/Core/Resolver.h"
+#include "lld/Core/Writer.h"
#include "lld/Driver/Driver.h"
#include "lld/Passes/RoundTripNativePass.h"
#include "lld/Passes/RoundTripYAMLPass.h"
-#include "lld/ReaderWriter/Reader.h"
-#include "lld/ReaderWriter/Writer.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/ADT/StringSwitch.h"
#include "llvm/Option/Arg.h"
Modified: lld/trunk/lib/Passes/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/Passes/CMakeLists.txt?rev=226732&r1=226731&r2=226732&view=diff
==============================================================================
--- lld/trunk/lib/Passes/CMakeLists.txt (original)
+++ lld/trunk/lib/Passes/CMakeLists.txt Wed Jan 21 16:54:56 2015
@@ -3,6 +3,8 @@ add_llvm_library(lldPasses
RoundTripNativePass.cpp
RoundTripYAMLPass.cpp
LINK_LIBS
- lldReaderWriter
+ lldCore
+ lldNative
+ lldYAML
LLVMSupport
)
Modified: lld/trunk/lib/Passes/RoundTripNativePass.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/Passes/RoundTripNativePass.cpp?rev=226732&r1=226731&r2=226732&view=diff
==============================================================================
--- lld/trunk/lib/Passes/RoundTripNativePass.cpp (original)
+++ lld/trunk/lib/Passes/RoundTripNativePass.cpp Wed Jan 21 16:54:56 2015
@@ -9,8 +9,8 @@
#include "lld/Core/Instrumentation.h"
#include "lld/Core/Simple.h"
+#include "lld/Core/Writer.h"
#include "lld/Passes/RoundTripNativePass.h"
-#include "lld/ReaderWriter/Writer.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/Path.h"
#include <memory>
Modified: lld/trunk/lib/Passes/RoundTripYAMLPass.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/Passes/RoundTripYAMLPass.cpp?rev=226732&r1=226731&r2=226732&view=diff
==============================================================================
--- lld/trunk/lib/Passes/RoundTripYAMLPass.cpp (original)
+++ lld/trunk/lib/Passes/RoundTripYAMLPass.cpp Wed Jan 21 16:54:56 2015
@@ -9,8 +9,8 @@
#include "lld/Core/Instrumentation.h"
#include "lld/Core/Simple.h"
+#include "lld/Core/Writer.h"
#include "lld/Passes/RoundTripYAMLPass.h"
-#include "lld/ReaderWriter/Writer.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/Path.h"
#include <memory>
Modified: lld/trunk/lib/ReaderWriter/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/CMakeLists.txt?rev=226732&r1=226731&r2=226732&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/CMakeLists.txt (original)
+++ lld/trunk/lib/ReaderWriter/CMakeLists.txt Wed Jan 21 16:54:56 2015
@@ -12,11 +12,10 @@ add_llvm_library(lldReaderWriter
CoreLinkingContext.cpp
FileArchive.cpp
LinkerScript.cpp
- Reader.cpp
- Writer.cpp
- FileArchive.cpp
LINK_LIBS
lldCore
+ lldPasses
+ lldYAML
LLVMObject
LLVMSupport
)
Modified: lld/trunk/lib/ReaderWriter/ELF/ELFReader.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/ELFReader.h?rev=226732&r1=226731&r2=226732&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/ELFReader.h (original)
+++ lld/trunk/lib/ReaderWriter/ELF/ELFReader.h Wed Jan 21 16:54:56 2015
@@ -13,7 +13,7 @@
#include "CreateELF.h"
#include "DynamicFile.h"
#include "ELFFile.h"
-#include "lld/ReaderWriter/Reader.h"
+#include "lld/Core/Reader.h"
namespace lld {
namespace elf {
Modified: lld/trunk/lib/ReaderWriter/ELF/OutputELFWriter.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/OutputELFWriter.h?rev=226732&r1=226731&r2=226732&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/OutputELFWriter.h (original)
+++ lld/trunk/lib/ReaderWriter/ELF/OutputELFWriter.h Wed Jan 21 16:54:56 2015
@@ -16,7 +16,7 @@
#include "lld/Core/Parallel.h"
#include "lld/Core/SharedLibraryFile.h"
#include "lld/ReaderWriter/ELFLinkingContext.h"
-#include "lld/ReaderWriter/Writer.h"
+#include "lld/Core/Writer.h"
#include "llvm/ADT/StringSet.h"
#include "llvm/Support/Path.h"
Modified: lld/trunk/lib/ReaderWriter/ELF/SegmentChunks.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/SegmentChunks.h?rev=226732&r1=226731&r2=226732&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/SegmentChunks.h (original)
+++ lld/trunk/lib/ReaderWriter/ELF/SegmentChunks.h Wed Jan 21 16:54:56 2015
@@ -15,7 +15,7 @@
#include "SectionChunks.h"
#include "Writer.h"
#include "lld/Core/range.h"
-#include "lld/ReaderWriter/Writer.h"
+#include "lld/Core/Writer.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Object/ELF.h"
Modified: lld/trunk/lib/ReaderWriter/ELF/Writer.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/Writer.cpp?rev=226732&r1=226731&r2=226732&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/Writer.cpp (original)
+++ lld/trunk/lib/ReaderWriter/ELF/Writer.cpp Wed Jan 21 16:54:56 2015
@@ -7,7 +7,7 @@
//
//===----------------------------------------------------------------------===//
-#include "lld/ReaderWriter/Writer.h"
+#include "lld/Core/Writer.h"
#include "DynamicLibraryWriter.h"
#include "ExecutableWriter.h"
Modified: lld/trunk/lib/ReaderWriter/ELF/Writer.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/Writer.h?rev=226732&r1=226731&r2=226732&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/Writer.h (original)
+++ lld/trunk/lib/ReaderWriter/ELF/Writer.h Wed Jan 21 16:54:56 2015
@@ -11,7 +11,7 @@
#define LLD_READER_WRITER_ELF_WRITER_H
#include "lld/Core/File.h"
-#include "lld/ReaderWriter/Writer.h"
+#include "lld/Core/Writer.h"
namespace lld {
namespace elf {
Modified: lld/trunk/lib/ReaderWriter/MachO/MachOLinkingContext.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/MachO/MachOLinkingContext.cpp?rev=226732&r1=226731&r2=226732&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/MachO/MachOLinkingContext.cpp (original)
+++ lld/trunk/lib/ReaderWriter/MachO/MachOLinkingContext.cpp Wed Jan 21 16:54:56 2015
@@ -14,11 +14,11 @@
#include "MachOPasses.h"
#include "lld/Core/ArchiveLibraryFile.h"
#include "lld/Core/PassManager.h"
+#include "lld/Core/Reader.h"
+#include "lld/Core/Writer.h"
#include "lld/Driver/Driver.h"
#include "lld/Passes/LayoutPass.h"
#include "lld/Passes/RoundTripYAMLPass.h"
-#include "lld/ReaderWriter/Reader.h"
-#include "lld/ReaderWriter/Writer.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/ADT/Triple.h"
#include "llvm/Config/config.h"
Modified: lld/trunk/lib/ReaderWriter/MachO/WriterMachO.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/MachO/WriterMachO.cpp?rev=226732&r1=226731&r2=226732&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/MachO/WriterMachO.cpp (original)
+++ lld/trunk/lib/ReaderWriter/MachO/WriterMachO.cpp Wed Jan 21 16:54:56 2015
@@ -7,10 +7,10 @@
//
//===----------------------------------------------------------------------===//
-#include "lld/ReaderWriter/Writer.h"
#include "ExecutableAtoms.hpp"
#include "MachONormalizedFile.h"
#include "lld/Core/File.h"
+#include "lld/Core/Writer.h"
#include "lld/ReaderWriter/MachOLinkingContext.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/ErrorHandling.h"
Modified: lld/trunk/lib/ReaderWriter/Native/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/Native/CMakeLists.txt?rev=226732&r1=226731&r2=226732&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/Native/CMakeLists.txt (original)
+++ lld/trunk/lib/ReaderWriter/Native/CMakeLists.txt Wed Jan 21 16:54:56 2015
@@ -2,6 +2,6 @@ add_llvm_library(lldNative
ReaderNative.cpp
WriterNative.cpp
LINK_LIBS
- lldReaderWriter
+ lldCore
LLVMSupport
)
Modified: lld/trunk/lib/ReaderWriter/Native/Makefile
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/Native/Makefile?rev=226732&r1=226731&r2=226732&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/Native/Makefile (original)
+++ lld/trunk/lib/ReaderWriter/Native/Makefile Wed Jan 21 16:54:56 2015
@@ -9,6 +9,6 @@
LLD_LEVEL := ../../..
LIBRARYNAME := lldNative
-USEDLIBS = lldReaderWriter.a lldCore.a
+USEDLIBS = lldCore.a
include $(LLD_LEVEL)/Makefile
Modified: lld/trunk/lib/ReaderWriter/Native/ReaderNative.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/Native/ReaderNative.cpp?rev=226732&r1=226731&r2=226732&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/Native/ReaderNative.cpp (original)
+++ lld/trunk/lib/ReaderWriter/Native/ReaderNative.cpp Wed Jan 21 16:54:56 2015
@@ -11,8 +11,8 @@
#include "lld/Core/Atom.h"
#include "lld/Core/Error.h"
#include "lld/Core/File.h"
+#include "lld/Core/Reader.h"
#include "lld/Core/Simple.h"
-#include "lld/ReaderWriter/Reader.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Support/Debug.h"
Modified: lld/trunk/lib/ReaderWriter/Native/WriterNative.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/Native/WriterNative.cpp?rev=226732&r1=226731&r2=226732&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/Native/WriterNative.cpp (original)
+++ lld/trunk/lib/ReaderWriter/Native/WriterNative.cpp Wed Jan 21 16:54:56 2015
@@ -7,10 +7,10 @@
//
//===----------------------------------------------------------------------===//
-#include "lld/ReaderWriter/Writer.h"
#include "NativeFileFormat.h"
#include "lld/Core/File.h"
#include "lld/Core/LinkingContext.h"
+#include "lld/Core/Writer.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/StringRef.h"
Modified: lld/trunk/lib/ReaderWriter/PECOFF/PECOFFLinkingContext.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/PECOFF/PECOFFLinkingContext.cpp?rev=226732&r1=226731&r2=226732&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/PECOFF/PECOFFLinkingContext.cpp (original)
+++ lld/trunk/lib/ReaderWriter/PECOFF/PECOFFLinkingContext.cpp Wed Jan 21 16:54:56 2015
@@ -16,13 +16,13 @@
#include "LoadConfigPass.h"
#include "PDBPass.h"
#include "lld/Core/PassManager.h"
+#include "lld/Core/Reader.h"
#include "lld/Core/Simple.h"
+#include "lld/Core/Writer.h"
#include "lld/Passes/LayoutPass.h"
#include "lld/Passes/RoundTripNativePass.h"
#include "lld/Passes/RoundTripYAMLPass.h"
#include "lld/ReaderWriter/PECOFFLinkingContext.h"
-#include "lld/ReaderWriter/Reader.h"
-#include "lld/ReaderWriter/Writer.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/Support/Allocator.h"
#include "llvm/Support/Path.h"
Modified: lld/trunk/lib/ReaderWriter/PECOFF/ReaderCOFF.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/PECOFF/ReaderCOFF.cpp?rev=226732&r1=226731&r2=226732&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/PECOFF/ReaderCOFF.cpp (original)
+++ lld/trunk/lib/ReaderWriter/PECOFF/ReaderCOFF.cpp Wed Jan 21 16:54:56 2015
@@ -10,9 +10,9 @@
#include "Atoms.h"
#include "lld/Core/Alias.h"
#include "lld/Core/File.h"
+#include "lld/Core/Reader.h"
#include "lld/Driver/Driver.h"
#include "lld/ReaderWriter/PECOFFLinkingContext.h"
-#include "lld/ReaderWriter/Reader.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/Object/COFF.h"
Modified: lld/trunk/lib/ReaderWriter/PECOFF/WriterPECOFF.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/PECOFF/WriterPECOFF.cpp?rev=226732&r1=226731&r2=226732&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/PECOFF/WriterPECOFF.cpp (original)
+++ lld/trunk/lib/ReaderWriter/PECOFF/WriterPECOFF.cpp Wed Jan 21 16:54:56 2015
@@ -23,9 +23,9 @@
#include "WriterImportLibrary.h"
#include "lld/Core/DefinedAtom.h"
#include "lld/Core/File.h"
+#include "lld/Core/Writer.h"
#include "lld/ReaderWriter/AtomLayout.h"
#include "lld/ReaderWriter/PECOFFLinkingContext.h"
-#include "lld/ReaderWriter/Writer.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/Object/COFF.h"
#include "llvm/Support/COFF.h"
Removed: lld/trunk/lib/ReaderWriter/Reader.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/Reader.cpp?rev=226731&view=auto
==============================================================================
--- lld/trunk/lib/ReaderWriter/Reader.cpp (original)
+++ lld/trunk/lib/ReaderWriter/Reader.cpp (removed)
@@ -1,119 +0,0 @@
-//===- lib/ReaderWriter/Reader.cpp ----------------------------------------===//
-//
-// The LLVM Linker
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-#include "lld/Core/File.h"
-#include "lld/ReaderWriter/Reader.h"
-#include "llvm/ADT/StringRef.h"
-#include "llvm/Support/Errc.h"
-#include "llvm/Support/FileUtilities.h"
-#include "llvm/Support/MemoryBuffer.h"
-#include "llvm/Support/Path.h"
-#include <memory>
-#include <system_error>
-
-namespace lld {
-
-YamlIOTaggedDocumentHandler::~YamlIOTaggedDocumentHandler() {}
-
-void Registry::add(std::unique_ptr<Reader> reader) {
- _readers.push_back(std::move(reader));
-}
-
-void Registry::add(std::unique_ptr<YamlIOTaggedDocumentHandler> handler) {
- _yamlHandlers.push_back(std::move(handler));
-}
-
-std::error_code
-Registry::loadFile(std::unique_ptr<MemoryBuffer> mb,
- std::vector<std::unique_ptr<File>> &result) const {
- // Get file type.
- StringRef content(mb->getBufferStart(), mb->getBufferSize());
- llvm::sys::fs::file_magic fileType = llvm::sys::fs::identify_magic(content);
- // Get file extension.
- StringRef extension = llvm::sys::path::extension(mb->getBufferIdentifier());
-
- // Ask each registered reader if it can handle this file type or extension.
- for (const std::unique_ptr<Reader> &reader : _readers) {
- if (!reader->canParse(fileType, extension, *mb))
- continue;
- if (std::error_code ec = reader->loadFile(std::move(mb), *this, result))
- return ec;
- return std::error_code();
- }
-
- // No Reader could parse this file.
- return make_error_code(llvm::errc::executable_format_error);
-}
-
-static const Registry::KindStrings kindStrings[] = {
- {Reference::kindInGroup, "in-group"},
- {Reference::kindLayoutAfter, "layout-after"},
- {Reference::kindLayoutBefore, "layout-before"},
- {Reference::kindGroupChild, "group-child"},
- {Reference::kindAssociate, "associate"},
- LLD_KIND_STRING_END};
-
-Registry::Registry() {
- addKindTable(Reference::KindNamespace::all, Reference::KindArch::all,
- kindStrings);
-}
-
-bool Registry::handleTaggedDoc(llvm::yaml::IO &io,
- const lld::File *&file) const {
- for (const std::unique_ptr<YamlIOTaggedDocumentHandler> &h : _yamlHandlers)
- if (h->handledDocTag(io, file))
- return true;
- return false;
-}
-
-
-void Registry::addKindTable(Reference::KindNamespace ns,
- Reference::KindArch arch,
- const KindStrings array[]) {
- KindEntry entry = { ns, arch, array };
- _kindEntries.push_back(entry);
-}
-
-bool Registry::referenceKindFromString(StringRef inputStr,
- Reference::KindNamespace &ns,
- Reference::KindArch &arch,
- Reference::KindValue &value) const {
- for (const KindEntry &entry : _kindEntries) {
- for (const KindStrings *pair = entry.array; !pair->name.empty(); ++pair) {
- if (!inputStr.equals(pair->name))
- continue;
- ns = entry.ns;
- arch = entry.arch;
- value = pair->value;
- return true;
- }
- }
- return false;
-}
-
-bool Registry::referenceKindToString(Reference::KindNamespace ns,
- Reference::KindArch arch,
- Reference::KindValue value,
- StringRef &str) const {
- for (const KindEntry &entry : _kindEntries) {
- if (entry.ns != ns)
- continue;
- if (entry.arch != arch)
- continue;
- for (const KindStrings *pair = entry.array; !pair->name.empty(); ++pair) {
- if (pair->value != value)
- continue;
- str = pair->name;
- return true;
- }
- }
- return false;
-}
-
-} // end namespace lld
Removed: lld/trunk/lib/ReaderWriter/Writer.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/Writer.cpp?rev=226731&view=auto
==============================================================================
--- lld/trunk/lib/ReaderWriter/Writer.cpp (original)
+++ lld/trunk/lib/ReaderWriter/Writer.cpp (removed)
@@ -1,23 +0,0 @@
-//===- lib/ReaderWriter/Writer.cpp ----------------------------------------===//
-//
-// The LLVM Linker
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-#include "lld/Core/File.h"
-#include "lld/ReaderWriter/Writer.h"
-
-namespace lld {
-Writer::Writer() {
-}
-
-Writer::~Writer() {
-}
-
-bool Writer::createImplicitFiles(std::vector<std::unique_ptr<File> > &) {
- return true;
-}
-} // end namespace lld
Modified: lld/trunk/lib/ReaderWriter/YAML/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/YAML/CMakeLists.txt?rev=226732&r1=226731&r2=226732&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/YAML/CMakeLists.txt (original)
+++ lld/trunk/lib/ReaderWriter/YAML/CMakeLists.txt Wed Jan 21 16:54:56 2015
@@ -1,6 +1,6 @@
add_llvm_library(lldYAML
ReaderWriterYAML.cpp
LINK_LIBS
- lldReaderWriter
+ lldCore
LLVMSupport
)
Modified: lld/trunk/lib/ReaderWriter/YAML/Makefile
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/YAML/Makefile?rev=226732&r1=226731&r2=226732&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/YAML/Makefile (original)
+++ lld/trunk/lib/ReaderWriter/YAML/Makefile Wed Jan 21 16:54:56 2015
@@ -9,6 +9,6 @@
LLD_LEVEL := ../../..
LIBRARYNAME := lldYAML
-USEDLIBS = lldReaderWriter.a lldCore.a
+USEDLIBS = lldCore.a
include $(LLD_LEVEL)/Makefile
Modified: lld/trunk/lib/ReaderWriter/YAML/ReaderWriterYAML.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/YAML/ReaderWriterYAML.cpp?rev=226732&r1=226731&r2=226732&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/YAML/ReaderWriterYAML.cpp (original)
+++ lld/trunk/lib/ReaderWriter/YAML/ReaderWriterYAML.cpp Wed Jan 21 16:54:56 2015
@@ -12,10 +12,10 @@
#include "lld/Core/Error.h"
#include "lld/Core/File.h"
#include "lld/Core/LLVM.h"
+#include "lld/Core/Reader.h"
#include "lld/Core/Reference.h"
#include "lld/Core/Simple.h"
-#include "lld/ReaderWriter/Reader.h"
-#include "lld/ReaderWriter/Writer.h"
+#include "lld/Core/Writer.h"
#include "lld/ReaderWriter/YamlContext.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/StringMap.h"
More information about the llvm-commits
mailing list