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:
#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>
-//===- lld/ReaderWriter/Reader.h - Abstract File Format Reading Interface -===//
+//===- lld/Core/Reader.h - Abstract File Format Reading Interface ---------===//
//
// The LLVM Linker
//
//
//===----------------------------------------------------------------------===//
-#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"
-//===- lld/ReaderWriter/Writer.h - Abstract File Format Interface ---------===//
+//===- lld/Core/Writer.h - Abstract File Format Interface -----------------===//
//
// The LLVM Linker
//
//
//===----------------------------------------------------------------------===//
-#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>
#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>
#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 {
#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"
#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"
#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"
Error.cpp
File.cpp
LinkingContext.cpp
+ Reader.cpp
Resolver.cpp
SymbolTable.cpp
+ Writer.cpp
LINK_LIBS
LLVMSupport
)
#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"
-//===- lib/ReaderWriter/Reader.cpp ----------------------------------------===//
+//===- lib/Core/Reader.cpp ------------------------------------------------===//
//
// The LLVM Linker
//
//===----------------------------------------------------------------------===//
#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"
-//===- lib/ReaderWriter/Writer.cpp ----------------------------------------===//
+//===- lib/Core/Writer.cpp ------------------------------------------------===//
//
// The LLVM Linker
//
//===----------------------------------------------------------------------===//
#include "lld/Core/File.h"
-#include "lld/ReaderWriter/Writer.h"
+#include "lld/Core/Writer.h"
namespace lld {
Writer::Writer() {
//
//===----------------------------------------------------------------------===//
+#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"
#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"
RoundTripNativePass.cpp
RoundTripYAMLPass.cpp
LINK_LIBS
- lldReaderWriter
+ lldCore
+ lldNative
+ lldYAML
LLVMSupport
)
#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>
#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>
CoreLinkingContext.cpp
FileArchive.cpp
LinkerScript.cpp
- Reader.cpp
- Writer.cpp
- FileArchive.cpp
LINK_LIBS
lldCore
+ lldPasses
+ lldYAML
LLVMObject
LLVMSupport
)
#include "CreateELF.h"
#include "DynamicFile.h"
#include "ELFFile.h"
-#include "lld/ReaderWriter/Reader.h"
+#include "lld/Core/Reader.h"
namespace lld {
namespace elf {
#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"
#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"
//
//===----------------------------------------------------------------------===//
-#include "lld/ReaderWriter/Writer.h"
+#include "lld/Core/Writer.h"
#include "DynamicLibraryWriter.h"
#include "ExecutableWriter.h"
#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 {
#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"
//
//===----------------------------------------------------------------------===//
-#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"
ReaderNative.cpp
WriterNative.cpp
LINK_LIBS
- lldReaderWriter
+ lldCore
LLVMSupport
)
LLD_LEVEL := ../../..
LIBRARYNAME := lldNative
-USEDLIBS = lldReaderWriter.a lldCore.a
+USEDLIBS = lldCore.a
include $(LLD_LEVEL)/Makefile
#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"
//
//===----------------------------------------------------------------------===//
-#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"
#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"
#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"
#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"
add_llvm_library(lldYAML
ReaderWriterYAML.cpp
LINK_LIBS
- lldReaderWriter
+ lldCore
LLVMSupport
)
LLD_LEVEL := ../../..
LIBRARYNAME := lldYAML
-USEDLIBS = lldReaderWriter.a lldCore.a
+USEDLIBS = lldCore.a
include $(LLD_LEVEL)/Makefile
#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"