Use proper ifdef for EmitProfilerComCallXXX methods (dotnet/coreclr#12502)
authorJonghyun Park <parjong@gmail.com>
Wed, 28 Jun 2017 18:44:18 +0000 (03:44 +0900)
committerJan Kotas <jkotas@microsoft.com>
Wed, 28 Jun 2017 18:44:18 +0000 (11:44 -0700)
Commit migrated from https://github.com/dotnet/coreclr/commit/aff5a085543f339a24a5e58f37c1641394155c45

src/coreclr/src/vm/i386/stublinkerx86.cpp
src/coreclr/src/vm/i386/stublinkerx86.h

index 195dd45..c1b0b19 100644 (file)
@@ -2537,7 +2537,7 @@ VOID StubLinkerCPU::X86EmitCurrentAppDomainFetch(X86Reg dstreg, unsigned preserv
 
 #if defined(_TARGET_X86_)
 
-#ifdef PROFILING_SUPPORTED
+#if defined(PROFILING_SUPPORTED) && !defined(FEATURE_STUBS_AS_IL)
 VOID StubLinkerCPU::EmitProfilerComCallProlog(TADDR pFrameVptr, X86Reg regFrame)
 {
     STANDARD_VM_CONTRACT;
@@ -2621,7 +2621,7 @@ VOID StubLinkerCPU::EmitProfilerComCallEpilog(TADDR pFrameVptr, X86Reg regFrame)
         _ASSERTE(!"Unrecognized vtble passed to EmitComMethodStubEpilog with profiling turned on.");
     }
 }
-#endif // PROFILING_SUPPORTED
+#endif // PROFILING_SUPPORTED && !FEATURE_STUBS_AS_IL
 
 
 #ifndef FEATURE_STUBS_AS_IL
index 9fbc17d..76d1f95 100644 (file)
@@ -250,10 +250,14 @@ class StubLinkerCPU : public StubLinker
                               );
         VOID X86EmitPushEBPframe();
 
+#if defined(_TARGET_X86_)
+#if defined(PROFILING_SUPPORTED) && !defined(FEATURE_STUBS_AS_IL)
         // These are used to emit calls to notify the profiler of transitions in and out of
         // managed code through COM->COM+ interop or N/Direct
         VOID EmitProfilerComCallProlog(TADDR pFrameVptr, X86Reg regFrame);
         VOID EmitProfilerComCallEpilog(TADDR pFrameVptr, X86Reg regFrame);
+#endif // PROFILING_SUPPORTED && !FEATURE_STUBS_AS_IL
+#endif // _TARGET_X86_