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

Kaining Zhong via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 19 19:34:25 PDT 2021


PRESIDENT810 updated this revision to Diff 380842.
PRESIDENT810 added a comment.

I removed the unnecessary "Function Attrs" line in my test, and wrote some comments to explain why some lines (which are seemingly not testing linker options) is added to the test.

As for resolveDylibPath, I added a saver.save() inside this function to ensure it always returns a saved StringRef. Previously oontvoo says I might should not save a StringRef, which is assumed to be already saved when used, so I'm not very sure if I should save it here (I'm a beginner of llvm and not sure which is the right way to do it... ). Please contact me if this change needs further modification.


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/lc-linker-option.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D111706.380842.patch
Type: text/x-patch
Size: 7339 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211020/2bc36625/attachment.bin>


More information about the llvm-commits mailing list