[PATCH] D79379: Don't add function to import list if it's defined in the same module

Wenlei He via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 4 18:18:46 PDT 2020


wenlei added inline comments.


================
Comment at: llvm/include/llvm/ProfileData/SampleProf.h:531
+    auto *F = M->getFunction(getFuncName());
+    if (!F || !F->getSubprogram()) {
+      // Add to the import list only when it's defined out of module.
----------------
I think we need `F->isDeclaration()` here, `getSubprogram()` tells us whether debug metadata (`!dbg`) is available for this function.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D79379/new/

https://reviews.llvm.org/D79379





More information about the llvm-commits mailing list