diff options
Diffstat (limited to 'contrib/llvm/tools/lld/COFF/ModuleDef.cpp')
-rw-r--r-- | contrib/llvm/tools/lld/COFF/ModuleDef.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/contrib/llvm/tools/lld/COFF/ModuleDef.cpp b/contrib/llvm/tools/lld/COFF/ModuleDef.cpp index 5e393f4..a273b6f 100644 --- a/contrib/llvm/tools/lld/COFF/ModuleDef.cpp +++ b/contrib/llvm/tools/lld/COFF/ModuleDef.cpp @@ -18,6 +18,7 @@ #include "Config.h" #include "Error.h" +#include "Memory.h" #include "llvm/ADT/StringRef.h" #include "llvm/ADT/StringSwitch.h" #include "llvm/Support/StringSaver.h" @@ -113,7 +114,7 @@ private: class Parser { public: - explicit Parser(StringRef S, StringSaver *A) : Lex(S), Alloc(A) {} + explicit Parser(StringRef S) : Lex(S) {} void parse() { do { @@ -197,9 +198,9 @@ private: if (Config->Machine == I386) { if (!isDecorated(E.Name)) - E.Name = Alloc->save("_" + E.Name); + E.Name = Saver.save("_" + E.Name); if (!E.ExtName.empty() && !isDecorated(E.ExtName)) - E.ExtName = Alloc->save("_" + E.ExtName); + E.ExtName = Saver.save("_" + E.ExtName); } for (;;) { @@ -278,14 +279,11 @@ private: Lexer Lex; Token Tok; std::vector<Token> Stack; - StringSaver *Alloc; }; } // anonymous namespace -void parseModuleDefs(MemoryBufferRef MB, StringSaver *Alloc) { - Parser(MB.getBuffer(), Alloc).parse(); -} +void parseModuleDefs(MemoryBufferRef MB) { Parser(MB.getBuffer()).parse(); } } // namespace coff } // namespace lld |