llvm.org GIT mirror llvm / 62b8114
Revert "Handle dllexport for global aliases" This reverts commit r199205. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199206 91177308-0d34-0410-b5e6-96231b3b80d8 Nico Rieck 6 years ago
3 changed file(s) with 0 addition(s) and 65 deletion(s). Raw diff Collapse all Expand all
657657 if (I->hasDLLExportStorageClass())
658658 DLLExportedGlobals.push_back(getSymbol(I));
659659
660 for (Module::const_alias_iterator I = M.alias_begin(), E = M.alias_end();
661 I != E; ++I) {
662 const GlobalValue *GV = I;
663 if (!GV->hasDLLExportStorageClass())
664 continue;
665
666 while (const GlobalAlias *A = dyn_cast(GV))
667 GV = A->getAliasedGlobal();
668
669 if (isa(GV))
670 DLLExportedFns.push_back(getSymbol(I));
671 else if (isa(GV))
672 DLLExportedGlobals.push_back(getSymbol(I));
673 }
674
675660 // Output linker support code for dllexported globals on windows.
676661 if (!DLLExportedGlobals.empty() || !DLLExportedFns.empty()) {
677662 const TargetLoweringObjectFileCOFF &TLOFCOFF =
5555 @WeakVar2 = weak_odr dllexport unnamed_addr constant i32 1
5656
5757
58 ; CHECK: .globl alias
59 ; CHECK: alias = notExported
60 @alias = dllexport alias void()* @notExported
61
62 ; CHECK: .globl alias2
63 ; CHECK: alias2 = f1
64 @alias2 = dllexport alias void()* @f1
65
66 ; CHECK: .globl alias3
67 ; CHECK: alias3 = alias
68 @alias3 = dllexport alias void()* @alias
69
70 ; CHECK: .weak weak_alias
71 ; CHECK: weak_alias = f1
72 @weak_alias = dllexport alias weak_odr void()* @f1
73
74
7558 ; CHECK: .section .drectve
7659 ; WIN32: /EXPORT:Var1,DATA
7760 ; WIN32: /EXPORT:Var2,DATA
8366 ; WIN32: /EXPORT:lnk1
8467 ; WIN32: /EXPORT:lnk2
8568 ; WIN32: /EXPORT:weak1
86 ; WIN32: /EXPORT:alias
87 ; WIN32: /EXPORT:alias2
88 ; WIN32: /EXPORT:alias3
89 ; WIN32: /EXPORT:weak_alias
9069 ; MINGW: -export:Var1,data
9170 ; MINGW: -export:Var2,data
9271 ; MINGW: -export:Var3,data
9776 ; MINGW: -export:lnk1
9877 ; MINGW: -export:lnk2
9978 ; MINGW: -export:weak1
100 ; MINGW: -export:alias
101 ; MINGW: -export:alias2
102 ; MINGW: -export:alias3
103 ; MINGW: -export:weak_alias
7070 @WeakVar2 = weak_odr dllexport unnamed_addr constant i32 1
7171
7272
73 ; CHECK: .globl _alias
74 ; CHECK: _alias = _notExported
75 @alias = dllexport alias void()* @notExported
76
77 ; CHECK: .globl _alias2
78 ; CHECK: _alias2 = _f1
79 @alias2 = dllexport alias void()* @f1
80
81 ; CHECK: .globl _alias3
82 ; CHECK: _alias3 = _alias
83 @alias3 = dllexport alias void()* @alias
84
85 ; CHECK: .weak _weak_alias
86 ; CHECK: _weak_alias = _f1
87 @weak_alias = dllexport alias weak_odr void()* @f1
88
89
9073 ; CHECK: .section .drectve
9174 ; WIN32: /EXPORT:_Var1,DATA
9275 ; WIN32: /EXPORT:_Var2,DATA
10184 ; WIN32: /EXPORT:_lnk1
10285 ; WIN32: /EXPORT:_lnk2
10386 ; WIN32: /EXPORT:_weak1
104 ; WIN32: /EXPORT:_alias
105 ; WIN32: /EXPORT:_alias2
106 ; WIN32: /EXPORT:_alias3
107 ; WIN32: /EXPORT:_weak_alias
10887 ; MINGW: -export:_Var1,data
10988 ; MINGW: -export:_Var2,data
11089 ; MINGW: -export:_Var3,data
11897 ; MINGW: -export:_lnk1
11998 ; MINGW: -export:_lnk2
12099 ; MINGW: -export:_weak1
121 ; MINGW: -export:_alias
122 ; MINGW: -export:_alias2
123 ; MINGW: -export:_alias3
124 ; MINGW: -export:_weak_alias