@@ -26,7 +26,6 @@ struct ExplicitSpec_NotImported {};
26
26
#define USEVARTYPE (type, var ) type UNIQ (use)() { return var; }
27
27
#define USEVAR (var ) USEVARTYPE(int , var)
28
28
#define USE (func ) void UNIQ (use)() { func (); }
29
- #define USE1 (func ) void UNIQ (use)() { func (nullptr ); }
30
29
#define USEMEMFUNC (class, func ) void (class ::*UNIQ (use)())() { return &class ::func; }
31
30
#define USESTATICMEMFUNC (class, func ) void (*UNIQ (use)())() { return &class ::func; }
32
31
#define USECLASS (class ) void UNIQ (USE)() { class x ; }
@@ -317,13 +316,10 @@ namespace ns { __declspec(dllimport) void externalFunc(); }
317
316
USE (ns::externalFunc)
318
317
319
318
// A dllimport function referencing non-imported vars or functions must not be available_externally.
320
-
321
319
__declspec(dllimport) int ImportedVar;
322
320
int NonImportedVar;
323
321
__declspec (dllimport) int ImportedFunc();
324
322
int NonImportedFunc ();
325
- struct ClassWithNonImportedMethod { int f (); };
326
-
327
323
__declspec (dllimport) inline int ReferencingImportedVar() { return ImportedVar; }
328
324
// MO1-DAG: define available_externally dllimport i32 @"\01?ReferencingImportedVar@@YAHXZ"
329
325
__declspec (dllimport) inline int ReferencingNonImportedVar() { return NonImportedVar; }
@@ -332,13 +328,10 @@ __declspec(dllimport) inline int ReferencingImportedFunc() { return ImportedFunc
332
328
// MO1-DAG: define available_externally dllimport i32 @"\01?ReferencingImportedFunc@@YAHXZ"
333
329
__declspec (dllimport) inline int ReferencingNonImportedFunc() { return NonImportedFunc (); }
334
330
// MO1-DAG: declare dllimport i32 @"\01?ReferencingNonImportedFunc@@YAHXZ"()
335
- __declspec (dllimport) inline int ReferencingNonImportedMethod(ClassWithNonImportedMethod *x) { return x->f (); }
336
- // MO1-DAG: declare dllimport i32 @"\01?ReferencingNonImportedMethod
337
331
USE (ReferencingImportedVar)
338
332
USE(ReferencingNonImportedVar)
339
333
USE(ReferencingImportedFunc)
340
334
USE(ReferencingNonImportedFunc)
341
- USE1(ReferencingNonImportedMethod)
342
335
// References to operator new and delete count too, despite not being DeclRefExprs.
343
336
__declspec(dllimport) inline int *ReferencingNonImportedNew() { return new int [2 ]; }
344
337
// MO1-DAG: declare dllimport i32* @"\01?ReferencingNonImportedNew@@YAPAHXZ"
0 commit comments