mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-27 04:18:42 +00:00
Don't dllexport declarations
Fixes PR22488 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228411 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
1 parent
e003f1ac8c
commit
6dc42dd2da
2 files changed
+6
-3
No files matched your search
@@ -695,11 +695,11 @@ void X86AsmPrinter::EmitEndOfAsmFile(Module &M) {
|
|||||||
std::vector<const MCSymbol*> DLLExportedFns, DLLExportedGlobals;
|
std::vector<const MCSymbol*> DLLExportedFns, DLLExportedGlobals;
|
||||||
|
|
||||||
for (const auto &Function : M)
|
for (const auto &Function : M)
|
||||||
if (Function.hasDLLExportStorageClass())
|
if (Function.hasDLLExportStorageClass() && !Function.isDeclaration())
|
||||||
DLLExportedFns.push_back(getSymbol(&Function));
|
DLLExportedFns.push_back(getSymbol(&Function));
|
||||||
|
|
||||||
for (const auto &Global : M.globals())
|
for (const auto &Global : M.globals())
|
||||||
if (Global.hasDLLExportStorageClass())
|
if (Global.hasDLLExportStorageClass() && !Global.isDeclaration())
|
||||||
DLLExportedGlobals.push_back(getSymbol(&Global));
|
DLLExportedGlobals.push_back(getSymbol(&Global));
|
||||||
|
|
||||||
for (const auto &Alias : M.aliases()) {
|
for (const auto &Alias : M.aliases()) {
|
||||||
|
|||||||
@@ -21,6 +21,8 @@ define dllexport void @f2() unnamed_addr {
|
|||||||
ret void
|
ret void
|
||||||
}
|
}
|
||||||
|
|
||||||
|
declare dllexport void @not_defined()
|
||||||
|
|
||||||
; CHECK: .globl _stdfun@0
|
; CHECK: .globl _stdfun@0
|
||||||
define dllexport x86_stdcallcc void @stdfun() nounwind {
|
define dllexport x86_stdcallcc void @stdfun() nounwind {
|
||||||
ret void
|
ret void
|
||||||
@@ -86,7 +88,6 @@ define weak_odr dllexport void @weak1() {
|
|||||||
; CHECK: _weak_alias = _f1
|
; CHECK: _weak_alias = _f1
|
||||||
@weak_alias = weak_odr dllexport alias void()* @f1
|
@weak_alias = weak_odr dllexport alias void()* @f1
|
||||||
|
|
||||||
|
|
||||||
; CHECK: .section .drectve
|
; CHECK: .section .drectve
|
||||||
; CHECK-CL: " /EXPORT:_Var1,DATA"
|
; CHECK-CL: " /EXPORT:_Var1,DATA"
|
||||||
; CHECK-CL: " /EXPORT:_Var2,DATA"
|
; CHECK-CL: " /EXPORT:_Var2,DATA"
|
||||||
@@ -95,6 +96,7 @@ define weak_odr dllexport void @weak1() {
|
|||||||
; CHECK-CL: " /EXPORT:_WeakVar2,DATA"
|
; CHECK-CL: " /EXPORT:_WeakVar2,DATA"
|
||||||
; CHECK-CL: " /EXPORT:_f1"
|
; CHECK-CL: " /EXPORT:_f1"
|
||||||
; CHECK-CL: " /EXPORT:_f2"
|
; CHECK-CL: " /EXPORT:_f2"
|
||||||
|
; CHECK-CL-NOT: not_exported
|
||||||
; CHECK-CL: " /EXPORT:_stdfun@0"
|
; CHECK-CL: " /EXPORT:_stdfun@0"
|
||||||
; CHECK-CL: " /EXPORT:@fastfun@0"
|
; CHECK-CL: " /EXPORT:@fastfun@0"
|
||||||
; CHECK-CL: " /EXPORT:_thisfun"
|
; CHECK-CL: " /EXPORT:_thisfun"
|
||||||
@@ -112,6 +114,7 @@ define weak_odr dllexport void @weak1() {
|
|||||||
; CHECK-GCC: " -export:WeakVar2,data"
|
; CHECK-GCC: " -export:WeakVar2,data"
|
||||||
; CHECK-GCC: " -export:f1"
|
; CHECK-GCC: " -export:f1"
|
||||||
; CHECK-GCC: " -export:f2"
|
; CHECK-GCC: " -export:f2"
|
||||||
|
; CHECK-CL-NOT: not_exported
|
||||||
; CHECK-GCC: " -export:stdfun@0"
|
; CHECK-GCC: " -export:stdfun@0"
|
||||||
; CHECK-GCC: " -export:@fastfun@0"
|
; CHECK-GCC: " -export:@fastfun@0"
|
||||||
; CHECK-GCC: " -export:thisfun"
|
; CHECK-GCC: " -export:thisfun"
|
||||||
|
|||||||
Reference in new issue
Block a user