Print an error, in DEBUG, if we fail to open the JitFuncInfoLogFile
authorBruce Forstall <brucefo@microsoft.com>
Wed, 31 Aug 2016 16:38:54 +0000 (09:38 -0700)
committerBruce Forstall <brucefo@microsoft.com>
Wed, 31 Aug 2016 16:57:43 +0000 (09:57 -0700)
src/jit/compiler.cpp

index c8a362c..8851e8d 100644 (file)
@@ -4774,6 +4774,12 @@ int Compiler::compCompile(CORINFO_METHOD_HANDLE methodHnd,
         {
             assert(compJitFuncInfoFile == nullptr);
             compJitFuncInfoFile = _wfopen(compJitFuncInfoFilename, W("a"));
+            if (compJitFuncInfoFile == nullptr)
+            {
+#if defined(DEBUG) && !defined(FEATURE_PAL) // no 'perror' in the PAL
+                perror("Failed to open JitFuncInfoLogFile");
+#endif // defined(DEBUG) && !defined(FEATURE_PAL)
+            }
         }
     }
 #endif // FUNC_INFO_LOGGING