[PATCH] D57790: [CodeView] Fix cycles in debug info when merging Types with global hashes
Reid Kleckner via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 6 11:49:29 PST 2019
rnk added inline comments.
================
Comment at: include/llvm/DebugInfo/CodeView/TypeHashing.h:120
+
+ while (UnresolvedRecords) {
+ UnresolvedRecords = false;
----------------
I think there should be a comment before this loop explaining why it's needed, and that it's not performance critical because most objs don't have forward references.
================
Comment at: tools/llvm-readobj/llvm-readobj.cpp:647
+
+ if (opts::CodeViewMergedTypes) {
+ ScopedPrinter W(outs());
----------------
aganea wrote:
> I had to move this here, because otherwise in the old place the TPI stream would reference deleted memory (because `BinaryOrErr` is deleted above when `dumpInput()` exits)
Hm, but won't this print the merged stream once per obj? And won't we still reference deleted memory on the second obj input? I guess the proper fix is to std::move the OwningBinary into a vector in the global ReadObjTypeTableBuilder object.
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D57790/new/
https://reviews.llvm.org/D57790
More information about the llvm-commits
mailing list