summaryrefslogtreecommitdiffstats
path: root/test/CodeGenCXX/dllimport.cpp
diff options
context:
space:
mode:
authorDenis Zobnin <d.zobnin.bugzilla@gmail.com>2016-05-25 11:32:42 +0000
committerDenis Zobnin <d.zobnin.bugzilla@gmail.com>2016-05-25 11:32:42 +0000
commit99820de7331ca010fbe35b13cc74b47dc5d9297d (patch)
tree02ff17bd49b1ae99942b44fc4d7f4d34ed882915 /test/CodeGenCXX/dllimport.cpp
parentada82963bed764c000dda5e1bbceacbdd148e6d9 (diff)
[ms][dll] #26935 Defining a dllimport function should cause it to be exported
If we have some function with dllimport attribute and then we have the function definition in the same module but without dllimport attribute we should add dllexport attribute to this function definition. The same should be done for variables. Example: struct __declspec(dllimport) C3 { ~C3(); }; C3::~C3() {;} // we should export this definition. Patch by Andrew V. Tischenko Differential revision: http://reviews.llvm.org/D18953 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@270686 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenCXX/dllimport.cpp')
-rw-r--r--test/CodeGenCXX/dllimport.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/CodeGenCXX/dllimport.cpp b/test/CodeGenCXX/dllimport.cpp
index 2b159207a5..021de44789 100644
--- a/test/CodeGenCXX/dllimport.cpp
+++ b/test/CodeGenCXX/dllimport.cpp
@@ -264,7 +264,7 @@ __declspec(dllimport) void redecl2();
void redecl2();
USE(redecl2)
-// MSC-DAG: define void @"\01?redecl3@@YAXXZ"()
+// MSC-DAG: define dllexport void @"\01?redecl3@@YAXXZ"()
// GNU-DAG: define void @_Z7redecl3v()
__declspec(dllimport) void redecl3();
void redecl3() {} // dllimport ignored
@@ -276,7 +276,7 @@ USE(redecl3)
// GNU-DAG: declare dllimport void @_Z7friend1v()
// MSC-DAG: declare void @"\01?friend2@@YAXXZ"()
// GNU-DAG: declare void @_Z7friend2v()
-// MSC-DAG: define void @"\01?friend3@@YAXXZ"()
+// MSC-DAG: define dllexport void @"\01?friend3@@YAXXZ"()
// GNU-DAG: define void @_Z7friend3v()
// MSC-DAG: declare void @"\01?friend4@@YAXXZ"()
// GNU-DAG: declare void @_Z7friend4v()