diff options
| author | Rui Ueyama <ruiu@google.com> | 2014-01-16 20:30:36 +0000 |
|---|---|---|
| committer | Rui Ueyama <ruiu@google.com> | 2014-01-16 20:30:36 +0000 |
| commit | 686738e2267cb7e55c7e4b28fc9f19388a4c9f7b (patch) | |
| tree | 211731c7f017111c24ea8a1923511ef9c0bf9b31 /llvm/lib/Object | |
| parent | 5efa665f7bda1e4e6afb415ce05f847d0ffe00b5 (diff) | |
| download | bcm5719-llvm-686738e2267cb7e55c7e4b28fc9f19388a4c9f7b.tar.gz bcm5719-llvm-686738e2267cb7e55c7e4b28fc9f19388a4c9f7b.zip | |
Use static instead of anonymous namespace.
llvm-svn: 199419
Diffstat (limited to 'llvm/lib/Object')
| -rw-r--r-- | llvm/lib/Object/COFFObjectFile.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/llvm/lib/Object/COFFObjectFile.cpp b/llvm/lib/Object/COFFObjectFile.cpp index 007d28e6bdf..3663cd9c9a6 100644 --- a/llvm/lib/Object/COFFObjectFile.cpp +++ b/llvm/lib/Object/COFFObjectFile.cpp @@ -23,16 +23,13 @@ using namespace llvm; using namespace object; -namespace { using support::ulittle8_t; using support::ulittle16_t; using support::ulittle32_t; using support::little16_t; -} -namespace { // Returns false if size is greater than the buffer size. And sets ec. -bool checkSize(const MemoryBuffer *M, error_code &EC, uint64_t Size) { +static bool checkSize(const MemoryBuffer *M, error_code &EC, uint64_t Size) { if (M->getBufferSize() < Size) { EC = object_error::unexpected_eof; return false; @@ -43,8 +40,8 @@ bool checkSize(const MemoryBuffer *M, error_code &EC, uint64_t Size) { // Sets Obj unless any bytes in [addr, addr + size) fall outsize of m. // Returns unexpected_eof if error. template<typename T> -error_code getObject(const T *&Obj, const MemoryBuffer *M, const uint8_t *Ptr, - const size_t Size = sizeof(T)) { +static error_code getObject(const T *&Obj, const MemoryBuffer *M, + const uint8_t *Ptr, const size_t Size = sizeof(T)) { uintptr_t Addr = uintptr_t(Ptr); if (Addr + Size < Addr || Addr + Size < Size || @@ -54,7 +51,6 @@ error_code getObject(const T *&Obj, const MemoryBuffer *M, const uint8_t *Ptr, Obj = reinterpret_cast<const T *>(Addr); return object_error::success; } -} const coff_symbol *COFFObjectFile::toSymb(DataRefImpl Ref) const { const coff_symbol *Addr = reinterpret_cast<const coff_symbol*>(Ref.p); @@ -1003,4 +999,4 @@ ObjectFile *ObjectFile::createCOFFObjectFile(MemoryBuffer *Object) { error_code EC; return new COFFObjectFile(Object, EC); } -} // end namespace llvm +} |

