[llvm] r221755 - Remove the now unused StringRefMemoryObject.h.

Rafael Espindola rafael.espindola at gmail.com
Tue Nov 11 18:13:28 PST 2014


Author: rafael
Date: Tue Nov 11 20:13:27 2014
New Revision: 221755

URL: http://llvm.org/viewvc/llvm-project?rev=221755&view=rev
Log:
Remove the now unused StringRefMemoryObject.h.

Removed:
    llvm/trunk/include/llvm/Support/StringRefMemoryObject.h
    llvm/trunk/lib/Support/StringRefMemoryObject.cpp
Modified:
    llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldChecker.cpp
    llvm/trunk/lib/MC/MCDisassembler/Disassembler.cpp
    llvm/trunk/lib/Support/CMakeLists.txt
    llvm/trunk/tools/llvm-mc/Disassembler.cpp
    llvm/trunk/tools/llvm-objdump/llvm-objdump.h

Removed: llvm/trunk/include/llvm/Support/StringRefMemoryObject.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/StringRefMemoryObject.h?rev=221754&view=auto
==============================================================================
--- llvm/trunk/include/llvm/Support/StringRefMemoryObject.h (original)
+++ llvm/trunk/include/llvm/Support/StringRefMemoryObject.h (removed)
@@ -1,41 +0,0 @@
-//===- llvm/Support/StringRefMemoryObject.h ---------------------*- C++ -*-===//
-//
-//                     The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-//
-// This file contains the declaration of the StringRefMemObject class, a simple
-// wrapper around StringRef implementing the MemoryObject interface.
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef LLVM_SUPPORT_STRINGREFMEMORYOBJECT_H
-#define LLVM_SUPPORT_STRINGREFMEMORYOBJECT_H
-
-#include "llvm/ADT/StringRef.h"
-#include "llvm/Support/Compiler.h"
-#include "llvm/Support/MemoryObject.h"
-
-namespace llvm {
-
-/// StringRefMemoryObject - Simple StringRef-backed MemoryObject
-class StringRefMemoryObject : public MemoryObject {
-  StringRef Bytes;
-  uint64_t Base;
-public:
-  StringRefMemoryObject(StringRef Bytes, uint64_t Base = 0)
-    : Bytes(Bytes), Base(Base) {}
-
-  uint64_t getBase() const override { return Base; }
-  uint64_t getExtent() const override { return Bytes.size(); }
-
-  int readByte(uint64_t Addr, uint8_t *Byte) const override;
-  int readBytes(uint64_t Addr, uint64_t Size, uint8_t *Buf) const override;
-};
-
-}
-
-#endif

Modified: llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldChecker.cpp?rev=221755&r1=221754&r2=221755&view=diff
==============================================================================
--- llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldChecker.cpp (original)
+++ llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldChecker.cpp Tue Nov 11 20:13:27 2014
@@ -12,7 +12,6 @@
 #include "llvm/MC/MCContext.h"
 #include "llvm/MC/MCDisassembler.h"
 #include "llvm/MC/MCInst.h"
-#include "llvm/Support/StringRefMemoryObject.h"
 #include "llvm/Support/Path.h"
 #include "RuntimeDyldCheckerImpl.h"
 #include "RuntimeDyldImpl.h"

Modified: llvm/trunk/lib/MC/MCDisassembler/Disassembler.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCDisassembler/Disassembler.cpp?rev=221755&r1=221754&r2=221755&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MCDisassembler/Disassembler.cpp (original)
+++ llvm/trunk/lib/MC/MCDisassembler/Disassembler.cpp Tue Nov 11 20:13:27 2014
@@ -21,7 +21,6 @@
 #include "llvm/MC/MCSymbolizer.h"
 #include "llvm/Support/ErrorHandling.h"
 #include "llvm/Support/FormattedStream.h"
-#include "llvm/Support/StringRefMemoryObject.h"
 #include "llvm/Support/TargetRegistry.h"
 
 using namespace llvm;

Modified: llvm/trunk/lib/Support/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/CMakeLists.txt?rev=221755&r1=221754&r2=221755&view=diff
==============================================================================
--- llvm/trunk/lib/Support/CMakeLists.txt (original)
+++ llvm/trunk/lib/Support/CMakeLists.txt Tue Nov 11 20:13:27 2014
@@ -85,7 +85,6 @@ add_llvm_library(LLVMSupport
   StringMap.cpp
   StringPool.cpp
   StringRef.cpp
-  StringRefMemoryObject.cpp
   SystemUtils.cpp
   Timer.cpp
   ToolOutputFile.cpp

Removed: llvm/trunk/lib/Support/StringRefMemoryObject.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/StringRefMemoryObject.cpp?rev=221754&view=auto
==============================================================================
--- llvm/trunk/lib/Support/StringRefMemoryObject.cpp (original)
+++ llvm/trunk/lib/Support/StringRefMemoryObject.cpp (removed)
@@ -1,29 +0,0 @@
-//===- lib/Support/StringRefMemoryObject.cpp --------------------*- C++ -*-===//
-//
-//                     The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-#include "llvm/Support/StringRefMemoryObject.h"
-
-using namespace llvm;
-
-int StringRefMemoryObject::readByte(uint64_t Addr, uint8_t *Byte) const {
-  if (Addr >= Base + getExtent() || Addr < Base)
-    return -1;
-  *Byte = Bytes[Addr - Base];
-  return 0;
-}
-
-int StringRefMemoryObject::readBytes(uint64_t Addr,
-                                     uint64_t Size,
-                                     uint8_t *Buf) const {
-  uint64_t Offset = Addr - Base;
-  if (Addr >= Base + getExtent() || Offset + Size > getExtent() || Addr < Base)
-    return -1;
-  memcpy(Buf, Bytes.data() + Offset, Size);
-  return 0;
-}

Modified: llvm/trunk/tools/llvm-mc/Disassembler.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-mc/Disassembler.cpp?rev=221755&r1=221754&r2=221755&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-mc/Disassembler.cpp (original)
+++ llvm/trunk/tools/llvm-mc/Disassembler.cpp Tue Nov 11 20:13:27 2014
@@ -22,7 +22,6 @@
 #include "llvm/MC/MCStreamer.h"
 #include "llvm/MC/MCSubtargetInfo.h"
 #include "llvm/Support/MemoryBuffer.h"
-#include "llvm/Support/StringRefMemoryObject.h"
 #include "llvm/Support/SourceMgr.h"
 #include "llvm/Support/TargetRegistry.h"
 #include "llvm/Support/raw_ostream.h"

Modified: llvm/trunk/tools/llvm-objdump/llvm-objdump.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-objdump/llvm-objdump.h?rev=221755&r1=221754&r2=221755&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-objdump/llvm-objdump.h (original)
+++ llvm/trunk/tools/llvm-objdump/llvm-objdump.h Tue Nov 11 20:13:27 2014
@@ -13,7 +13,6 @@
 #include "llvm/ADT/StringRef.h"
 #include "llvm/Support/CommandLine.h"
 #include "llvm/Support/DataTypes.h"
-#include "llvm/Support/StringRefMemoryObject.h"
 
 namespace llvm {
 namespace object {





More information about the llvm-commits mailing list