[lld] r262435 - Remove remaining files of Core.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 1 16:37:50 PST 2016


Author: ruiu
Date: Tue Mar  1 18:37:50 2016
New Revision: 262435

URL: http://llvm.org/viewvc/llvm-project?rev=262435&view=rev
Log:
Remove remaining files of Core.

Removed:
    lld/trunk/include/lld/ReaderWriter/CoreLinkingContext.h
    lld/trunk/lib/ReaderWriter/CoreLinkingContext.cpp
Modified:
    lld/trunk/lib/ReaderWriter/CMakeLists.txt

Removed: lld/trunk/include/lld/ReaderWriter/CoreLinkingContext.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/include/lld/ReaderWriter/CoreLinkingContext.h?rev=262434&view=auto
==============================================================================
--- lld/trunk/include/lld/ReaderWriter/CoreLinkingContext.h (original)
+++ lld/trunk/include/lld/ReaderWriter/CoreLinkingContext.h (removed)
@@ -1,47 +0,0 @@
-//===- lld/ReaderWriter/CoreLinkingContext.h ------------------------------===//
-//
-//                             The LLVM Linker
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef LLD_READER_WRITER_CORE_LINKER_CONTEXT_H
-#define LLD_READER_WRITER_CORE_LINKER_CONTEXT_H
-
-#include "lld/Core/LinkingContext.h"
-#include "lld/Core/Reader.h"
-#include "lld/Core/Writer.h"
-#include "llvm/Support/ErrorHandling.h"
-
-namespace lld {
-
-class CoreLinkingContext : public LinkingContext {
-public:
-  CoreLinkingContext();
-
-  enum {
-    TEST_RELOC_CALL32        = 1,
-    TEST_RELOC_PCREL32       = 2,
-    TEST_RELOC_GOT_LOAD32    = 3,
-    TEST_RELOC_GOT_USE32     = 4,
-    TEST_RELOC_LEA32_WAS_GOT = 5,
-  };
-
-  bool validateImpl(raw_ostream &diagnostics) override;
-  void addPasses(PassManager &pm) override;
-
-  void addPassNamed(StringRef name) { _passNames.push_back(name); }
-
-protected:
-  Writer &writer() const override;
-
-private:
-  std::unique_ptr<Writer>  _writer;
-  std::vector<StringRef>   _passNames;
-};
-
-} // end namespace lld
-
-#endif

Modified: lld/trunk/lib/ReaderWriter/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/CMakeLists.txt?rev=262435&r1=262434&r2=262435&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/CMakeLists.txt (original)
+++ lld/trunk/lib/ReaderWriter/CMakeLists.txt Tue Mar  1 18:37:50 2016
@@ -6,7 +6,6 @@ if (MSVC)
 endif()
 
 add_lld_library(lldReaderWriter
-  CoreLinkingContext.cpp
   FileArchive.cpp
 
   ADDITIONAL_HEADER_DIRS

Removed: lld/trunk/lib/ReaderWriter/CoreLinkingContext.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/CoreLinkingContext.cpp?rev=262434&view=auto
==============================================================================
--- lld/trunk/lib/ReaderWriter/CoreLinkingContext.cpp (original)
+++ lld/trunk/lib/ReaderWriter/CoreLinkingContext.cpp (removed)
@@ -1,50 +0,0 @@
-//===- lib/ReaderWriter/CoreLinkingContext.cpp ----------------------------===//
-//
-//                             The LLVM Linker
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-#include "lld/Core/DefinedAtom.h"
-#include "lld/Core/File.h"
-#include "lld/Core/Pass.h"
-#include "lld/Core/PassManager.h"
-#include "lld/Core/Simple.h"
-#include "lld/ReaderWriter/CoreLinkingContext.h"
-#include "llvm/ADT/ArrayRef.h"
-#include "llvm/ADT/STLExtras.h"
-
-using namespace lld;
-
-namespace {
-
-class OrderPass : public Pass {
-public:
-  /// Sorts atoms by position
-  std::error_code perform(SimpleFile &file) override {
-    SimpleFile::DefinedAtomRange defined = file.definedAtoms();
-    std::sort(defined.begin(), defined.end(), DefinedAtom::compareByPosition);
-    return std::error_code();
-  }
-};
-
-} // anonymous namespace
-
-CoreLinkingContext::CoreLinkingContext() {}
-
-bool CoreLinkingContext::validateImpl(raw_ostream &) {
-  _writer = createWriterYAML(*this);
-  return true;
-}
-
-void CoreLinkingContext::addPasses(PassManager &pm) {
-  for (StringRef name : _passNames) {
-    (void)name;
-    assert(name == "order" && "bad pass name");
-    pm.add(llvm::make_unique<OrderPass>());
-  }
-}
-
-Writer &CoreLinkingContext::writer() const { return *_writer; }




More information about the llvm-commits mailing list