summaryrefslogtreecommitdiff
path: root/lib/ExecutionEngine/ExecutionEngine.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ExecutionEngine/ExecutionEngine.cpp')
-rw-r--r--lib/ExecutionEngine/ExecutionEngine.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/ExecutionEngine/ExecutionEngine.cpp b/lib/ExecutionEngine/ExecutionEngine.cpp
index 88ec5b3e6a..abc8877ec5 100644
--- a/lib/ExecutionEngine/ExecutionEngine.cpp
+++ b/lib/ExecutionEngine/ExecutionEngine.cpp
@@ -1211,7 +1211,9 @@ void ExecutionEngine::emitGlobals() {
}
// If the existing global is strong, never replace it.
- if (GVEntry->hasExternalLinkage())
+ if (GVEntry->hasExternalLinkage() ||
+ GVEntry->hasDLLImportLinkage() ||
+ GVEntry->hasDLLExportLinkage())
continue;
// Otherwise, we know it's linkonce/weak, replace it if this is a strong