diff options
author | Yunzhong Gao <Yunzhong_Gao@playstation.sony.com> | 2013-12-03 18:05:14 +0000 |
---|---|---|
committer | Yunzhong Gao <Yunzhong_Gao@playstation.sony.com> | 2013-12-03 18:05:14 +0000 |
commit | 822a02fb4c3a044becbce2aed751702b5ec16855 (patch) | |
tree | eebb9f78765fcbca5920bad0a5c475fd34144717 /lib | |
parent | df9c9da88402e393343d5e199b0ebaa681b3a1ce (diff) | |
download | llvm-822a02fb4c3a044becbce2aed751702b5ec16855.tar.gz llvm-822a02fb4c3a044becbce2aed751702b5ec16855.tar.bz2 llvm-822a02fb4c3a044becbce2aed751702b5ec16855.tar.xz |
Teach the internalize pass to skip dllexported symbols because they could be
referenced in a way that even the linker does not see.
Differential Revision: http://llvm-reviews.chandlerc.com/D2280
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196300 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Transforms/IPO/Internalize.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Transforms/IPO/Internalize.cpp b/lib/Transforms/IPO/Internalize.cpp index 962d3de315..dae69ce091 100644 --- a/lib/Transforms/IPO/Internalize.cpp +++ b/lib/Transforms/IPO/Internalize.cpp @@ -115,6 +115,10 @@ static bool shouldInternalize(const GlobalValue &GV, if (GV.hasAvailableExternallyLinkage()) return false; + // Assume that dllexported symbols are referenced elsewhere + if (GV.hasDLLExportLinkage()) + return false; + // Already has internal linkage if (GV.hasLocalLinkage()) return false; |