[PATCH] D53986: [lto] Fix a crash caused by accessing an empty ValueInfo
Tom Roeder via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 1 13:19:25 PDT 2018
tmroeder marked an inline comment as done.
tmroeder added inline comments.
================
Comment at: lib/IR/ModuleSummaryIndex.cpp:229
+ auto StrId = std::to_string(Id);
+ OS << " " << StrId << " [label=\"" << getNodeVisualName(Id)
<< "\"]; // defined externally\n";
----------------
tejohnson wrote:
> Always calling the new version means that we will never print the name, even if there is a ValueInfo for this GUID. Can you call the appropriate version of getNodeVisualName based on whether the VI is empty? I.e. invoke ValueInfo::operator bool() on it.
>
Good point, thanks. I've changed this now to take the ValueInfo as an argument again and do that check before calling getNodeVisualName.
Repository:
rL LLVM
https://reviews.llvm.org/D53986
More information about the llvm-commits
mailing list