[llvm] [llvm-pdbutil] Create public symbols in yaml2pdb (PR #157362)
via llvm-commits
llvm-commits at lists.llvm.org
Sun Sep 7 13:29:04 PDT 2025
================
@@ -880,6 +883,23 @@ static void yamlToPdb(StringRef Path) {
IpiBuilder.addTypeRecord(Type.RecordData, std::nullopt);
}
+ auto &GsiBuilder = Builder.getGsiBuilder();
+ const auto &Publics = YamlObj.PublicsStream.value_or(DefaultPublicsStream);
----------------
Nerixyz wrote:
Maybe I'm missing something here, but doesn't the `const auto&` bind to a temporary? Because `YamlObj.PublicsStream` is a `std::optional<PdbPublicsStream>`, then the return of `value_or` is a `PdbPublicsStream`.
The other streams above also do this, and I'd guess this would break in some way if it would bind to a temporary.
https://github.com/llvm/llvm-project/pull/157362
More information about the llvm-commits
mailing list