diff options
| author | Rui Ueyama <ruiu@google.com> | 2013-11-15 21:12:11 +0000 |
|---|---|---|
| committer | Rui Ueyama <ruiu@google.com> | 2013-11-15 21:12:11 +0000 |
| commit | 94f2271d6342ddda5812ae639e873a7913acdc83 (patch) | |
| tree | f86de578638b23630cea9584e0ee4c803878732f | |
| parent | ca9b0b6863fcb5bc14f107b34fc90cb058a53c15 (diff) | |
| download | bcm5719-llvm-94f2271d6342ddda5812ae639e873a7913acdc83.tar.gz bcm5719-llvm-94f2271d6342ddda5812ae639e873a7913acdc83.zip | |
[PECOFF] Remove unnecessary static member.
llvm-svn: 194851
| -rw-r--r-- | lld/lib/ReaderWriter/PECOFF/ReaderImportHeader.cpp | 27 |
1 files changed, 10 insertions, 17 deletions
diff --git a/lld/lib/ReaderWriter/PECOFF/ReaderImportHeader.cpp b/lld/lib/ReaderWriter/PECOFF/ReaderImportHeader.cpp index 5228c649814..abf1f646116 100644 --- a/lld/lib/ReaderWriter/PECOFF/ReaderImportHeader.cpp +++ b/lld/lib/ReaderWriter/PECOFF/ReaderImportHeader.cpp @@ -150,35 +150,28 @@ namespace coff { namespace { +uint8_t FuncAtomContent[] = { + 0xff, 0x25, 0x00, 0x00, 0x00, 0x00, // jmp *0x0 + 0x90, 0x90 // nop; nop +}; + /// The defined atom for jump table. class FuncAtom : public COFFLinkerInternalAtom { public: FuncAtom(const File &file, StringRef symbolName) - : COFFLinkerInternalAtom(file, std::vector<uint8_t>(rawContent), - symbolName) {} + : COFFLinkerInternalAtom( + file, + std::vector<uint8_t>(FuncAtomContent, + FuncAtomContent + sizeof(FuncAtomContent)), + symbolName) {} virtual uint64_t ordinal() const { return 0; } virtual Scope scope() const { return scopeGlobal; } virtual ContentType contentType() const { return typeCode; } virtual Alignment alignment() const { return Alignment(1); } virtual ContentPermissions permissions() const { return permR_X; } - -private: - static std::vector<uint8_t> rawContent; }; -// MSVC doesn't seem to like C++11 initializer list, so initialize the -// vector from an array. -namespace { -uint8_t FuncAtomContent[] = { - 0xff, 0x25, 0x00, 0x00, 0x00, 0x00, // jmp *0x0 - 0x90, 0x90 // nop; nop -}; -} // anonymous namespace - -std::vector<uint8_t> FuncAtom::rawContent( - FuncAtomContent, FuncAtomContent + sizeof(FuncAtomContent)); - class FileImportLibrary : public File { public: FileImportLibrary(const LinkingContext &context, |

