File tree Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -1374,6 +1374,7 @@ void SymbolTable::resolveAlternateNames() {
13741374 auto toUndef = dyn_cast<Undefined>(toSym);
13751375 if (toUndef && (!toUndef->weakAlias || toUndef->isAntiDep ))
13761376 continue ;
1377+ toSym->isUsedInRegularObj = true ;
13771378 if (toSym->isLazy ())
13781379 forceLazy (toSym);
13791380 u->setWeakAlias (toSym);
Original file line number Diff line number Diff line change 1+ ; REQUIRES: x86
2+ ; RUN: mkdir -p %t.dir
3+ ; RUN: llvm-as -o %t.obj %s
4+ ; RUN: lld-link -out:%t.dll -dll -noentry %t.obj -export:test
5+
6+ target datalayout = "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
7+ target triple = "x86_64-unknown-windows-msvc19.33.0"
8+
9+ $alt = comdat any
10+
11+ @alt = weak_odr dso_local global i32 0 , comdat, align 4
12+ @ext = external dso_local global i32 , align 4
13+
14+ ; Function Attrs: noinline nounwind optnone uwtable
15+ define dso_local i32 @test () #0 {
16+ entry:
17+ %0 = load i32 , ptr @ext , align 4
18+ ret i32 %0
19+ }
20+
21+ attributes #0 = { noinline nounwind optnone uwtable }
22+
23+ !llvm.linker.options = !{!0 }
24+
25+ !0 = !{!"/alternatename:ext=alt" }
You can’t perform that action at this time.
0 commit comments