Check in a test case for the problem with late-dropped dllimport (PR20803)

llvm-svn: 216749
This commit is contained in:
Hans Wennborg 2014-08-29 17:36:11 +00:00
parent 4ceced3f59
commit 2029991d74
1 changed files with 15 additions and 4 deletions

View File

@ -50,13 +50,18 @@ __declspec(dllimport) extern int GlobalRedecl4;
USEVAR(GlobalRedecl4)
int GlobalRedecl4; // dllimport ignored
// FIXME: dllimport is dropped in the AST; this should be reflected in codegen (PR02803).
// CHECK: @GlobalRedecl5 = external dllimport global i32
__declspec(dllimport) extern int GlobalRedecl5;
USEVAR(GlobalRedecl5)
extern int GlobalRedecl5; // dllimport ignored
// Redeclaration in local context.
// CHECK: @GlobalRedecl5 = external dllimport global i32
__declspec(dllimport) int GlobalRedecl5;
// CHECK: @GlobalRedecl6 = external dllimport global i32
__declspec(dllimport) int GlobalRedecl6;
int functionScope() {
extern int GlobalRedecl5; // still dllimport
return GlobalRedecl5;
extern int GlobalRedecl6; // still dllimport
return GlobalRedecl6;
}
@ -112,3 +117,9 @@ USE(redecl3)
__declspec(dllimport) void redecl4(void);
USE(redecl4)
void redecl4(void) {} // dllimport ignored
// FIXME: dllimport is dropped in the AST; this should be reflected in codegen (PR20803).
// CHECK-DAG: declare dllimport
__declspec(dllimport) void redecl5(void);
USE(redecl5)
void redecl5(void); // dllimport ignored