diff options
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r-- | llvm/lib/Transforms/IPO/LowerTypeTests.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/IPO/LowerTypeTests.cpp b/llvm/lib/Transforms/IPO/LowerTypeTests.cpp index d2545af8502..1e4d3d37aae 100644 --- a/llvm/lib/Transforms/IPO/LowerTypeTests.cpp +++ b/llvm/lib/Transforms/IPO/LowerTypeTests.cpp @@ -1716,6 +1716,11 @@ bool LowerTypeTestsModule::lower() { F->clearMetadata(); } + // Update the linkage for extern_weak declarations when a definition + // exists. + if (Linkage == CFL_Definition && F->hasExternalWeakLinkage()) + F->setLinkage(GlobalValue::ExternalLinkage); + // If the function in the full LTO module is a declaration, replace its // type metadata with the type metadata we found in cfi.functions. That // metadata is presumed to be more accurate than the metadata attached |