[PATCH] D53986: [lto] Fix a crash caused by accessing an empty ValueInfo
Teresa Johnson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 1 12:05:53 PDT 2018
tejohnson added inline comments.
================
Comment at: lib/IR/ModuleSummaryIndex.cpp:229
+ auto StrId = std::to_string(Id);
+ OS << " " << StrId << " [label=\"" << getNodeVisualName(Id)
<< "\"]; // defined externally\n";
----------------
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.
Repository:
rL LLVM
https://reviews.llvm.org/D53986
More information about the llvm-commits
mailing list