[PATCH] D104986: [ThinLTO] Respect ClearDSOLocalOnDeclarations for unimported functions

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 2 17:06:51 PDT 2021


MaskRay added inline comments.


================
Comment at: llvm/lib/Transforms/Utils/FunctionImportUtils.cpp:128
+    IsImportedDeclaration = true;
+    return GlobalValue::ExternalLinkage;
 
----------------
tejohnson wrote:
> Is the change of the return linkage type needed for this fix, or is it just the returning of IsImportedDeclaration?
> 
> Why not just invoke doImportAsDefinition() in the caller to get this info rather than setting IsImportedDeclaration here? There are also other cases below for other linkage types where we are importing as a declaration but the new var isn't set.
I think invoking `doImportAsDefinition` is superior. Switched the implementation.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D104986



More information about the llvm-commits mailing list