[PATCH] D32689: DEF: migrate def parser from LLD to LLVM

Martell Malone via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 1 20:52:17 PDT 2017


martell updated this revision to Diff 97386.
martell added a comment.

Changing `StringRef` to `std::string` for the struct makes the tests fail by creating a few memory issues with destructors.
Instead I just allocate a `new std::string` and stored that allocation in the StringRef.
Not sure if we will ever delete the allocation, much like we didn't the Allocator and Saver?
`delete ((std::string) &(E->Name.str())) seems overkill`.


Repository:
  rL LLVM

https://reviews.llvm.org/D32689

Files:
  include/llvm/Object/COFFImportFile.h
  include/llvm/Object/DEFParser.h
  lib/Object/CMakeLists.txt
  lib/Object/COFFImportFile.cpp
  lib/Object/DEFParser.cpp
  tools/lld/COFF/CMakeLists.txt
  tools/lld/COFF/Driver.cpp
  tools/lld/COFF/Driver.h
  tools/lld/COFF/Librarian.cpp
  tools/lld/COFF/ModuleDef.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D32689.97386.patch
Type: text/x-patch
Size: 60994 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170502/72371c96/attachment.bin>


More information about the llvm-commits mailing list