Fix a build error when IBCLOGGER_ENABLED is not defined (#25691)
authorDong-Heon Jung <clamp03@gmail.com>
Wed, 17 Jul 2019 03:09:40 +0000 (12:09 +0900)
committerKonstantin Baladurin <k.baladurin@samsung.com>
Wed, 25 Sep 2019 21:24:34 +0000 (00:24 +0300)
- Even if DACCESS_COMPILE or CROSSGEN_COMPILE is defined,
  coreclr can be built without IBCLOGGER_ENABLED definition.

src/vm/ibclogger.h

index 6aba244..deed372 100644 (file)
@@ -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