diff options
Diffstat (limited to 'lib/Transforms/IPO/SimplifyLibCalls.cpp')
-rw-r--r-- | lib/Transforms/IPO/SimplifyLibCalls.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/Transforms/IPO/SimplifyLibCalls.cpp b/lib/Transforms/IPO/SimplifyLibCalls.cpp index 79cdf28e0a..9f9c52788b 100644 --- a/lib/Transforms/IPO/SimplifyLibCalls.cpp +++ b/lib/Transforms/IPO/SimplifyLibCalls.cpp @@ -178,8 +178,10 @@ public: // All the "well-known" functions are external and have external linkage // because they live in a runtime library somewhere and were (probably) // not compiled by LLVM. So, we only act on external functions that - // have external linkage and non-empty uses. - if (!FI->isExternal() || !FI->hasExternalLinkage() || FI->use_empty()) + // have external or dllimport linkage and non-empty uses. + if (!FI->isExternal() || + !(FI->hasExternalLinkage() || FI->hasDLLImportLinkage()) || + FI->use_empty()) continue; // Get the optimization class that pertains to this function |