[compiler-rt] 6897004 - Fix test on Windows

via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 8 20:50:31 PDT 2024


Author: Vitaly Buka
Date: 2024-08-08T20:50:27-07:00
New Revision: 689700439ab07619a822cf1d902b90ee2b6037fe

URL: https://github.com/llvm/llvm-project/commit/689700439ab07619a822cf1d902b90ee2b6037fe
DIFF: https://github.com/llvm/llvm-project/commit/689700439ab07619a822cf1d902b90ee2b6037fe.diff

LOG: Fix test on Windows

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/compiler-rt/test/asan/TestCases/Windows/dll_report_globals_symbolization_at_startup.cpp b/compiler-rt/test/asan/TestCases/Windows/dll_report_globals_symbolization_at_startup.cpp
index e3efa0a1a4fd27..06a632e6708b1e 100644
--- a/compiler-rt/test/asan/TestCases/Windows/dll_report_globals_symbolization_at_startup.cpp
+++ b/compiler-rt/test/asan/TestCases/Windows/dll_report_globals_symbolization_at_startup.cpp
@@ -10,9 +10,8 @@
 #include <windows.h>
 #include <stdio.h>
 
-extern "C" {
 #if defined(EXE)
-__declspec(dllimport) int foo_from_dll();
+extern "C" __declspec(dllimport) int foo_from_dll();
 
 // CHECK: in DLL(reason=1)
 int main(int argc, char **argv) {
@@ -23,6 +22,7 @@ int main(int argc, char **argv) {
 // CHECK: in DLL(reason=0)
 }
 #elif defined(DLL)
+extern "C" {
 // This global is registered at startup.
 int x[42];
 
@@ -35,7 +35,7 @@ BOOL WINAPI DllMain(HMODULE, DWORD reason, LPVOID) {
   fflush(0);
   return TRUE;
 }
+}
 #else
 # error oops!
 #endif
-}


        


More information about the llvm-commits mailing list