diff options
author | Shih-wei Liao <sliao@google.com> | 2012-12-15 17:21:00 -0800 |
---|---|---|
committer | Shih-wei Liao <sliao@google.com> | 2012-12-15 17:21:00 -0800 |
commit | 22add6ff3426df1a85089fe6a6e1597ee3b6f300 (patch) | |
tree | c58763780e7b965179d9cdce45f1fc5a5268932d /include/mcld/Support/MemoryAreaFactory.h | |
parent | c842fe71ef087c982cc03d0ea73eeaf455d932d3 (diff) | |
download | mclinker-22add6ff3426df1a85089fe6a6e1597ee3b6f300.tar.gz |
MCLinker upstream commit 0459e386785c.
Change-Id: Ide6790f5a354b7fcc03d812d6c8cf43b1e309ba3
Diffstat (limited to 'include/mcld/Support/MemoryAreaFactory.h')
-rw-r--r-- | include/mcld/Support/MemoryAreaFactory.h | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/include/mcld/Support/MemoryAreaFactory.h b/include/mcld/Support/MemoryAreaFactory.h index be86b8c..b28f096 100644 --- a/include/mcld/Support/MemoryAreaFactory.h +++ b/include/mcld/Support/MemoryAreaFactory.h @@ -6,8 +6,8 @@ // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// -#ifndef MCLD_MEMORY_AREA_FACTORY_H -#define MCLD_MEMORY_AREA_FACTORY_H +#ifndef MCLD_SUPPORT_MEMORY_AREA_FACTORY_H +#define MCLD_SUPPORT_MEMORY_AREA_FACTORY_H #ifdef ENABLE_UNITTEST #include <gtest.h> #endif @@ -20,7 +20,6 @@ namespace mcld { -class RegionFactory; /** \class MemoryAreaFactory * \brief MemoryAreaFactory avoids creating duplicated MemoryAreas of the * same file. @@ -55,19 +54,18 @@ public: FileHandle::OpenMode pMode, FileHandle::Permission pPerm); - void destruct(MemoryArea* pArea); - -protected: // Create a MemoryArea with an universal space. // The created MemoryArea is not moderated by m_HandleToArea. - MemoryArea* create(void* pMemBuffer, size_t pSize); + MemoryArea* produce(void* pMemBuffer, size_t pSize); // Create a MemoryArea by the given file handler - MemoryArea* create(int pFD, FileHandle::OpenMode pMode); + // The created MemoryArea is not moderated by m_HandleToArea. + MemoryArea* produce(int pFD, FileHandle::OpenMode pMode); + + void destruct(MemoryArea* pArea); private: HandleToArea m_HandleToArea; - RegionFactory* m_pRegionFactory; }; } // namespace of mcld |