[llvm] [ThinLTO] Use StringRef instead of std::string (PR #97963)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 8 08:09:58 PDT 2024
luxufan wrote:
> Who is the owner of the string? Can you make sure that there is one in the bitcode reader case and also document at the structure definition who that owner is?
In the bitcode reader, the owner is the [string table]( https://github.com/llvm/llvm-project/blob/a5bfe20f6fd8957f870f8ffcf836d7737864e063/llvm/lib/Bitcode/Reader/BitcodeReader.cpp#L7499) of the bitcode module
In the ll parser, the owner is the index itself since this patch uses Index->saveString to save the string in the index.
https://github.com/llvm/llvm-project/pull/97963
More information about the llvm-commits
mailing list