From 90b0bdcd9e03a5b3ec1ffee19a9604f816496d5f Mon Sep 17 00:00:00 2001 From: Dong-Heon Jung Date: Wed, 17 Jul 2019 12:09:40 +0900 Subject: [PATCH] Fix a build error when IBCLOGGER_ENABLED is not defined (#25691) - Even if DACCESS_COMPILE or CROSSGEN_COMPILE is defined, coreclr can be built without IBCLOGGER_ENABLED definition. --- src/vm/ibclogger.h | 44 +++++++++++++++++++++++++++++++------------- 1 file changed, 31 insertions(+), 13 deletions(-) diff --git a/src/vm/ibclogger.h b/src/vm/ibclogger.h index 6aba244..deed372 100644 --- a/src/vm/ibclogger.h +++ b/src/vm/ibclogger.h @@ -349,6 +349,7 @@ public: typedef const void * pfnIBCAccessCallback; +class ThreadLocalIBCInfo; class IBCLoggingDisabler { public: @@ -356,6 +357,10 @@ public: { } + IBCLoggingDisabler(ThreadLocalIBCInfo*) + { + } + ~IBCLoggingDisabler() { } @@ -371,6 +376,10 @@ public: ~ThreadLocalIBCInfo() { } + + void FlushDelayedCallbacks() + { + } }; class IBCLoggerAwareAllocMemTracker : public AllocMemTracker @@ -595,23 +604,13 @@ public: // Methods for enabling/disabling instrumentation. void EnableAllInstr(); void DisableAllInstr(); -#else // IBCLOGGER_ENABLED - void EnableAllInstr() - { - } - - void DisableAllInstr() - { - } -#endif // IBCLOGGER_ENABLED -#ifndef DACCESS_COMPILE void DisableRidAccessOrderInstr(); void DisableMethodDescAccessInstr(); inline BOOL InstrEnabled() { - SUPPORTS_DAC; + SUPPORTS_DAC; return (dwInstrEnabled != 0); } @@ -629,9 +628,28 @@ private: private: DWORD dwInstrEnabled; - + static CrstStatic m_sync; -#endif // DACCESS_COMPILE +#else // IBCLOGGER_ENABLED + void EnableAllInstr() + { + } + + void DisableAllInstr() + { + } + + inline BOOL InstrEnabled() + { + return false; + } + + static CrstStatic * GetSync() + { + _ASSERTE(false); + return NULL; + } +#endif // IBCLOGGER_ENABLED }; #endif // IBCLOGGER_H -- 2.7.4