[PATCH] Remove dead code and unused file

Jean-Daniel Dupas mailing at xenonium.com
Mon Jan 5 05:17:08 PST 2015


Remove some unused code, files, and obsolete comment

REPOSITORY
  rL LLVM

http://reviews.llvm.org/D6840

Files:
  lib/ReaderWriter/MachO/ArchHandler.cpp
  lib/ReaderWriter/MachO/ArchHandler.h
  lib/ReaderWriter/MachO/GOTPass.hpp
  lib/ReaderWriter/MachO/MachOLinkingContext.cpp

Index: lib/ReaderWriter/MachO/ArchHandler.cpp
===================================================================
--- lib/ReaderWriter/MachO/ArchHandler.cpp
+++ lib/ReaderWriter/MachO/ArchHandler.cpp
@@ -123,23 +123,6 @@
   relocs.push_back(reloc);
 }
 
-
-int16_t ArchHandler::readS16(const uint8_t *addr, bool isBig) {
-    return read16(addr, isBig);
-}
-
-int32_t ArchHandler::readS32(const uint8_t *addr, bool isBig) {
-  return read32(addr, isBig);
-}
-
-uint32_t ArchHandler::readU32(const uint8_t *addr, bool isBig) {
-  return read32(addr, isBig);
-}
-
-  int64_t ArchHandler::readS64(const uint8_t *addr, bool isBig) {
-  return read64(addr, isBig);
-}
-
 bool ArchHandler::isDwarfCIE(bool isBig, const DefinedAtom *atom) {
   assert(atom->contentType() == DefinedAtom::typeCFI);
   uint32_t size = read32(atom->rawContent().data(), isBig);
Index: lib/ReaderWriter/MachO/ArchHandler.h
===================================================================
--- lib/ReaderWriter/MachO/ArchHandler.h
+++ lib/ReaderWriter/MachO/ArchHandler.h
@@ -286,12 +286,6 @@
   static void appendReloc(normalized::Relocations &relocs, uint32_t offset,
                           uint32_t symbol, uint32_t value,
                           RelocPattern pattern);
-
-
-  static int16_t  readS16(const uint8_t *addr, bool isBig);
-  static int32_t  readS32(const uint8_t *addr, bool isBig);
-  static uint32_t readU32(const uint8_t *addr, bool isBig);
-  static int64_t  readS64(const uint8_t *addr, bool isBig);
 };
 
 } // namespace mach_o
Index: lib/ReaderWriter/MachO/GOTPass.hpp
===================================================================
--- lib/ReaderWriter/MachO/GOTPass.hpp
+++ lib/ReaderWriter/MachO/GOTPass.hpp
@@ -1,31 +0,0 @@
-//===- lib/ReaderWriter/MachO/GOTPass.hpp ---------------------------------===//
-//
-//                             The LLVM Linker
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef LLD_READER_WRITER_MACHO_GOT_PASS_H
-#define LLD_READER_WRITER_MACHO_GOT_PASS_H
-
-#include "lld/Core/DefinedAtom.h"
-#include "lld/Core/SharedLibraryAtom.h"
-#include "lld/Core/File.h"
-#include "lld/Core/Reference.h"
-#include "lld/Core/Pass.h"
-
-#include "MachOPasses.h"
-#include "ReferenceKinds.h"
-#include "StubAtoms.hpp"
-
-namespace lld {
-namespace mach_o {
-
-
-} // namespace mach_o
-} // namespace lld
-
-
-#endif // LLD_READER_WRITER_MACHO_GOT_PASS_H
Index: lib/ReaderWriter/MachO/MachOLinkingContext.cpp
===================================================================
--- lib/ReaderWriter/MachO/MachOLinkingContext.cpp
+++ lib/ReaderWriter/MachO/MachOLinkingContext.cpp
@@ -529,8 +529,6 @@
 }
 
 bool MachOLinkingContext::validateImpl(raw_ostream &diagnostics) {
-  // TODO: if -arch not specified, look at arch of first .o file.
-
   if (_currentVersion && _outputMachOType != MH_DYLIB) {
     diagnostics << "error: -current_version can only be used with dylibs\n";
     return false;

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D6840.17792.patch
Type: text/x-patch
Size: 3092 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150105/1b769324/attachment.bin>


More information about the llvm-commits mailing list