[PATCH] D36346: Fix thinlto cache key computation for cfi-icall.

Peter Collingbourne via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 7 14:57:24 PDT 2017


pcc accepted this revision.
pcc added a comment.
This revision is now accepted and ready to land.

LGTM



================
Comment at: llvm/lib/LTO/LTO.cpp:179
+  auto AddUsedThings = [&](GlobalValueSummary *GS) {
+    for (const ValueInfo &VI : GS->refs())
+      AddUsedCfiGlobal(VI.getGUID());
----------------
So GS can't be null here? If so, you can use dyn_cast below.


================
Comment at: llvm/lib/LTO/LTO.cpp:867
+    for (auto &Name : CombinedIndex.cfiFunctionDefs())
+      CfiFunctionDefs.insert(GlobalValue::getGUID(Name));
+    for (auto &Name : CombinedIndex.cfiFunctionDecls())
----------------
I think you need to call `GlobalValue::dropLLVMManglingEscape` on the function name here (same below).


https://reviews.llvm.org/D36346





More information about the llvm-commits mailing list