aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Object/COFFImportFile.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Object/COFFImportFile.cpp')
-rw-r--r--llvm/lib/Object/COFFImportFile.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/Object/COFFImportFile.cpp b/llvm/lib/Object/COFFImportFile.cpp
index fd8aca3..a9f150a 100644
--- a/llvm/lib/Object/COFFImportFile.cpp
+++ b/llvm/lib/Object/COFFImportFile.cpp
@@ -691,7 +691,9 @@ Error writeImportLibrary(StringRef ImportName, StringRef Path,
}
if (!E.ImportName.empty() && Name != E.ImportName) {
- Members.push_back(OF.createWeakExternal(E.ImportName, Name, false, M));
+ if (ImportType == IMPORT_CODE)
+ Members.push_back(
+ OF.createWeakExternal(E.ImportName, Name, false, M));
Members.push_back(OF.createWeakExternal(E.ImportName, Name, true, M));
continue;
}