[PATCH] D49777: [LTO] Don't internalize declarations

Bob Haarman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 24 22:54:25 PDT 2018


inglorion created this revision.
inglorion added reviewers: pcc, tejohnson.
Herald added subscribers: dexonsmith, steven_wu, JDevlieghere, hiraditya, aprantl, mehdi_amini.

Some links were failing with "Global is external, but doesn't have
external or weak linkage!" in ThinLTO builds with debug
information. This happened when we elide the body of a global that is
referenced by debug info. This results in a declaration, which we
would then internalize - but declarations cannot be internal. This
change avoids the problem by not internalizing these declarations.

Fixes PR38046.


https://reviews.llvm.org/D49777

Files:
  llvm/lib/LTO/LTO.cpp
  llvm/test/LTO/X86/Inputs/pr38046.m.ll
  llvm/test/LTO/X86/pr38046.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D49777.157195.patch
Type: text/x-patch
Size: 18638 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180725/5f91b2f8/attachment-0001.bin>


More information about the llvm-commits mailing list