Clean up EECodeManager::GetGSCookieAddr (dotnet/coreclr#9425)
authorJonghyun Park <parjong@gmail.com>
Thu, 9 Feb 2017 06:37:46 +0000 (15:37 +0900)
committerJan Kotas <jkotas@microsoft.com>
Thu, 9 Feb 2017 06:37:46 +0000 (22:37 -0800)
Commit migrated from https://github.com/dotnet/coreclr/commit/a336822c4610391e41d720010ab9f7d9969028ad

src/coreclr/src/vm/eetwain.cpp

index 8193c63..94a1ece 100644 (file)
@@ -5451,7 +5451,7 @@ void * EECodeManager::GetGSCookieAddr(PREGDISPLAY     pContext,
     }
 #endif
 
-#if defined(_TARGET_X86_)
+#ifndef USE_GC_INFO_DECODER
     CodeManStateBuf * stateBuf = (CodeManStateBuf*)pState->stateBuf;
     
     /* Extract the necessary information from the info block header */
@@ -5489,7 +5489,7 @@ void * EECodeManager::GetGSCookieAddr(PREGDISPLAY     pContext,
         return PVOID(SIZE_T(pContext->SP + argSize + info->gsCookieOffset));
     }
 
-#elif defined(USE_GC_INFO_DECODER)
+#else // !USE_GC_INFO_DECODER
     GcInfoDecoder gcInfoDecoder(
             gcInfoToken,
             DECODE_GS_COOKIE
@@ -5507,12 +5507,9 @@ void * EECodeManager::GetGSCookieAddr(PREGDISPLAY     pContext,
     }
     return NULL;
 
-#else
-    PORTABILITY_WARNING("EECodeManager::GetGSCookieAddr is not implemented on this platform.");
-    return NULL;
-#endif
+#endif // USE_GC_INFO_DECODER
 }
-#endif
+#endif // !CROSSGEN_COMPILE
 
 #ifndef USE_GC_INFO_DECODER
 /*****************************************************************************