Skip to content

Commit 1b9139a

Browse files
committed
Merge branch 'dev' of https://github.com/backengineering/llvm-msvc into dev
2 parents 64751e9 + 870bf55 commit 1b9139a

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

clang/tools/driver/version.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
#define CLANG_LLVM_MSVC_VERSION "v3.2.0"
1+
#define CLANG_LLVM_MSVC_VERSION "v3.2.1"

lld/COFF/InputFiles.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1059,6 +1059,12 @@ void BitcodeFile::parse() {
10591059
} else {
10601060
sym = ctx.symtab.addRegular(this, symName, nullptr, fakeSC, 0,
10611061
objSym.isWeak());
1062+
// Model all symbols with the __imp_ prefix as having external
1063+
// references. If one LTO object defines a __imp_<foo> symbol, and
1064+
// another LTO object refers to <foo> with dllimport, make sure the
1065+
// __imp_ symbol is kept.
1066+
if (symName.starts_with("__imp_"))
1067+
sym->isUsedInRegularObj = true;
10621068
}
10631069
symbols.push_back(sym);
10641070
if (objSym.isUsed())

0 commit comments

Comments
 (0)