[PATCH] D111706: [lld-macho] Fix dangling string reference when adding frameworks

Kaining Zhong via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 18 01:46:28 PDT 2021


PRESIDENT810 updated this revision to Diff 380307.
PRESIDENT810 retitled this revision from "[lld-macho] Use StringRef's hash code as keys of loadedArchives" to "[lld-macho] Fix dangling string reference when adding frameworks".
PRESIDENT810 added a comment.

Hello.

I added %t to paths in my test, and they should be ok now. I also changed a few functions related to adding frameworks, so now they return StringRef instances instead of std::string, and their values are all saved by saver.save(). In this way I think we don't need to change the key of loadArchives to hash_code.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D111706/new/

https://reviews.llvm.org/D111706

Files:
  lld/MachO/Driver.cpp
  lld/MachO/Driver.h
  lld/MachO/DriverUtils.cpp
  lld/MachO/InputFiles.cpp
  lld/test/MachO/Inputs/MacOSX.sdk/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation.tbd
  lld/test/MachO/multi-loaded-archive.yaml

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D111706.380307.patch
Type: text/x-patch
Size: 17899 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211018/c637399c/attachment.bin>


More information about the llvm-commits mailing list