]> granicus.if.org Git - clang/commitdiff
Add a dllimport test.
authorRafael Espindola <rafael.espindola@gmail.com>
Thu, 29 Mar 2018 16:35:52 +0000 (16:35 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Thu, 29 Mar 2018 16:35:52 +0000 (16:35 +0000)
Thanks to rnk for the suggestion.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@328800 91177308-0d34-0410-b5e6-96231b3b80d8

test/CodeGen/flip-dllimport.c [new file with mode: 0644]

diff --git a/test/CodeGen/flip-dllimport.c b/test/CodeGen/flip-dllimport.c
new file mode 100644 (file)
index 0000000..d20479d
--- /dev/null
@@ -0,0 +1,7 @@
+// RUN: %clang_cc1 -triple x86_64-windows-msvc -fms-extensions -emit-llvm -o - %s | FileCheck %s
+
+__declspec(dllimport) void f();
+void g() { f(); } // use it
+
+// CHECK: define dso_local dllexport void @f
+void f() { }