Skip to content

Commit 6897004

Browse files
authored
Fix test on Windows
1 parent 00139ae commit 6897004

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

compiler-rt/test/asan/TestCases/Windows/dll_report_globals_symbolization_at_startup.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,8 @@
1010
#include <windows.h>
1111
#include <stdio.h>
1212

13-
extern "C" {
1413
#if defined(EXE)
15-
__declspec(dllimport) int foo_from_dll();
14+
extern "C" __declspec(dllimport) int foo_from_dll();
1615

1716
// CHECK: in DLL(reason=1)
1817
int main(int argc, char **argv) {
@@ -23,6 +22,7 @@ int main(int argc, char **argv) {
2322
// CHECK: in DLL(reason=0)
2423
}
2524
#elif defined(DLL)
25+
extern "C" {
2626
// This global is registered at startup.
2727
int x[42];
2828

@@ -35,7 +35,7 @@ BOOL WINAPI DllMain(HMODULE, DWORD reason, LPVOID) {
3535
fflush(0);
3636
return TRUE;
3737
}
38+
}
3839
#else
3940
# error oops!
4041
#endif
41-
}

0 commit comments

Comments
 (0)