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

src/coreclr/src/vm/eetwain.cpp

index 50b421e..75a2529 100644 (file)
@@ -5583,13 +5583,13 @@ size_t EECodeManager::GetFunctionSize(GCInfoToken gcInfoToken)
         SUPPORTS_DAC;
     } CONTRACTL_END;
 
-#if defined(_TARGET_X86_)
+#ifndef USE_GC_INFO_DECODER
     hdrInfo info;
 
     DecodeGCHdrInfo(gcInfoToken, 0, &info);
 
     return info.methodSize;
-#elif defined(USE_GC_INFO_DECODER)
+#else // !USE_GC_INFO_DECODER
 
     GcInfoDecoder gcInfoDecoder(
             gcInfoToken,
@@ -5600,10 +5600,7 @@ size_t EECodeManager::GetFunctionSize(GCInfoToken gcInfoToken)
     _ASSERTE( codeLength > 0 );
     return codeLength;
 
-#else // !_TARGET_X86_ && !USE_GC_INFO_DECODER
-    PORTABILITY_ASSERT("EECodeManager::GetFunctionSize is not implemented on this platform.");
-    return 0;
-#endif
+#endif // USE_GC_INFO_DECODER
 }
 
 /*****************************************************************************