[llvm-branch-commits] [llvm-branch] r228480 - Merging r228411:
Hans Wennborg
hans at hanshq.net
Fri Feb 6 17:30:01 PST 2015
Author: hans
Date: Fri Feb 6 19:30:01 2015
New Revision: 228480
URL: http://llvm.org/viewvc/llvm-project?rev=228480&view=rev
Log:
Merging r228411:
------------------------------------------------------------------------
r228411 | rnk | 2015-02-06 09:59:49 -0800 (Fri, 06 Feb 2015) | 3 lines
Don't dllexport declarations
Fixes PR22488
------------------------------------------------------------------------
Modified:
llvm/branches/release_36/ (props changed)
llvm/branches/release_36/lib/Target/X86/X86AsmPrinter.cpp
llvm/branches/release_36/test/CodeGen/X86/dllexport.ll
Propchange: llvm/branches/release_36/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Feb 6 19:30:01 2015
@@ -1,3 +1,3 @@
/llvm/branches/Apple/Pertwee:110850,110961
/llvm/branches/type-system-rewrite:133420-134817
-/llvm/trunk:155241,226023,226029,226044,226046,226048,226058,226075,226170-226171,226182,226473,226664,226708,226711,226755,226809,227005,227085,227250,227260-227261,227290,227294,227299,227319,227339,227491,227584,227603,227670,227809,227815,227903,227934,227972,227983,228049,228129,228168,228331,228444
+/llvm/trunk:155241,226023,226029,226044,226046,226048,226058,226075,226170-226171,226182,226473,226664,226708,226711,226755,226809,227005,227085,227250,227260-227261,227290,227294,227299,227319,227339,227491,227584,227603,227670,227809,227815,227903,227934,227972,227983,228049,228129,228168,228331,228411,228444
Modified: llvm/branches/release_36/lib/Target/X86/X86AsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_36/lib/Target/X86/X86AsmPrinter.cpp?rev=228480&r1=228479&r2=228480&view=diff
==============================================================================
--- llvm/branches/release_36/lib/Target/X86/X86AsmPrinter.cpp (original)
+++ llvm/branches/release_36/lib/Target/X86/X86AsmPrinter.cpp Fri Feb 6 19:30:01 2015
@@ -688,11 +688,11 @@ void X86AsmPrinter::EmitEndOfAsmFile(Mod
std::vector<const MCSymbol*> DLLExportedFns, DLLExportedGlobals;
for (const auto &Function : M)
- if (Function.hasDLLExportStorageClass())
+ if (Function.hasDLLExportStorageClass() && !Function.isDeclaration())
DLLExportedFns.push_back(getSymbol(&Function));
for (const auto &Global : M.globals())
- if (Global.hasDLLExportStorageClass())
+ if (Global.hasDLLExportStorageClass() && !Global.isDeclaration())
DLLExportedGlobals.push_back(getSymbol(&Global));
for (const auto &Alias : M.aliases()) {
Modified: llvm/branches/release_36/test/CodeGen/X86/dllexport.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_36/test/CodeGen/X86/dllexport.ll?rev=228480&r1=228479&r2=228480&view=diff
==============================================================================
--- llvm/branches/release_36/test/CodeGen/X86/dllexport.ll (original)
+++ llvm/branches/release_36/test/CodeGen/X86/dllexport.ll Fri Feb 6 19:30:01 2015
@@ -21,6 +21,8 @@ define dllexport void @f2() unnamed_addr
ret void
}
+declare dllexport void @not_defined()
+
; CHECK: .globl _stdfun at 0
define dllexport x86_stdcallcc void @stdfun() nounwind {
ret void
@@ -91,7 +93,6 @@ define weak_odr dllexport void @weak1()
; CHECK: _weak_alias = _f1
@weak_alias = weak_odr dllexport alias void()* @f1
-
; CHECK: .section .drectve
; CHECK-CL: " /EXPORT:_Var1,DATA"
; CHECK-CL: " /EXPORT:_Var2,DATA"
@@ -100,6 +101,7 @@ define weak_odr dllexport void @weak1()
; CHECK-CL: " /EXPORT:_WeakVar2,DATA"
; CHECK-CL: " /EXPORT:_f1"
; CHECK-CL: " /EXPORT:_f2"
+; CHECK-CL-NOT: not_exported
; CHECK-CL: " /EXPORT:_stdfun at 0"
; CHECK-CL: " /EXPORT:@fastfun at 0"
; CHECK-CL: " /EXPORT:_thisfun"
@@ -117,6 +119,7 @@ define weak_odr dllexport void @weak1()
; CHECK-GCC: " -export:WeakVar2,data"
; CHECK-GCC: " -export:f1"
; CHECK-GCC: " -export:f2"
+; CHECK-CL-NOT: not_exported
; CHECK-GCC: " -export:stdfun at 0"
; CHECK-GCC: " -export:@fastfun at 0"
; CHECK-GCC: " -export:thisfun"
More information about the llvm-branch-commits
mailing list