diff options
author | Brian Sullivan <briansul@microsoft.com> | 2017-06-15 11:16:42 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-15 11:16:42 -0700 |
commit | d734877cd86016296fc6c6e884a2b119339545ec (patch) | |
tree | 15a4c5b4d32a2978b6d1e4033e58f79addcb35ca | |
parent | dd2181cde582168752335d7859c92b3274028f77 (diff) | |
parent | f79d7e81f70739ab9ae266382aecdfd8c750d06d (diff) | |
download | coreclr-d734877cd86016296fc6c6e884a2b119339545ec.tar.gz coreclr-d734877cd86016296fc6c6e884a2b119339545ec.tar.bz2 coreclr-d734877cd86016296fc6c6e884a2b119339545ec.zip |
Merge pull request #12287 from briansull/nowarn-SIMD
Crossgen - Disable the Target-dependent SIMD vector types warning
-rw-r--r-- | src/inc/corcompile.h | 9 | ||||
-rw-r--r-- | src/vm/compile.cpp | 12 | ||||
-rw-r--r-- | src/zap/zapcode.cpp | 2 | ||||
-rw-r--r-- | src/zap/zapimage.cpp | 11 | ||||
-rw-r--r-- | src/zap/zapimage.h | 2 |
5 files changed, 29 insertions, 7 deletions
diff --git a/src/inc/corcompile.h b/src/inc/corcompile.h index f1c2314499..d7ac28d89f 100644 --- a/src/inc/corcompile.h +++ b/src/inc/corcompile.h @@ -1378,9 +1378,12 @@ class ICorCompileDataStore // Returns ZapImage virtual ZapImage * GetZapImage() = 0; - // Reports an error during preloading. Return the error code to propagate, - // or S_OK to ignore the error - virtual void Error(mdToken token, HRESULT hr, LPCWSTR description) = 0; + // Report an error during preloading: + // 'token' is the metadata token that triggered the error + // hr is the HRESULT from the thrown Exception, or S_OK if we don't have an thrown exception + // resID is the resourceID with additional information from the thrown Exception, or 0 + // + virtual void Error(mdToken token, HRESULT hr, UINT _resID, LPCWSTR description) = 0; }; diff --git a/src/vm/compile.cpp b/src/vm/compile.cpp index 49b329e295..269e1948df 100644 --- a/src/vm/compile.cpp +++ b/src/vm/compile.cpp @@ -6838,10 +6838,20 @@ void CEEPreloader::Error(mdToken token, Exception * pException) { STANDARD_VM_CONTRACT; + HRESULT hr = pException->GetHR(); + UINT resID = 0; + StackSString msg; #ifdef CROSSGEN_COMPILE pException->GetMessage(msg); + + // Do we have an EEException with a resID? + if (EEMessageException::IsEEMessageException(pException)) + { + EEMessageException * pEEMessageException = (EEMessageException *) pException; + resID = pEEMessageException->GetResID(); + } #else { GCX_COOP(); @@ -6860,7 +6870,7 @@ void CEEPreloader::Error(mdToken token, Exception * pException) } #endif - m_pData->Error(token, pException->GetHR(), msg.GetUnicode()); + m_pData->Error(token, hr, resID, msg.GetUnicode()); } CEEInfo *g_pCEEInfo = NULL; diff --git a/src/zap/zapcode.cpp b/src/zap/zapcode.cpp index 738428354d..8d412225ca 100644 --- a/src/zap/zapcode.cpp +++ b/src/zap/zapcode.cpp @@ -983,7 +983,7 @@ void ZapMethodEntryPoint::Resolve(ZapImage * pImage) { mdMethodDef token; pImage->GetCompileInfo()->GetMethodDef(GetHandle(), &token); - pImage->Error(token, S_OK, W("MapMethodEntryPoint failed")); + pImage->Error(token, S_OK, 0, W("MapMethodEntryPoint failed")); } else #endif diff --git a/src/zap/zapimage.cpp b/src/zap/zapimage.cpp index 61cf099898..469b84176e 100644 --- a/src/zap/zapimage.cpp +++ b/src/zap/zapimage.cpp @@ -3553,7 +3553,7 @@ void ZapImage::FileNotFoundError(LPCWSTR pszMessage) fileNotFoundErrorsTable.Append(message); } -void ZapImage::Error(mdToken token, HRESULT hr, LPCWSTR message) +void ZapImage::Error(mdToken token, HRESULT hr, UINT resID, LPCWSTR message) { // Missing dependencies are reported as fatal errors in code:CompilationDomain::BindAssemblySpec. // Avoid printing redundant error message for them. @@ -3562,12 +3562,21 @@ void ZapImage::Error(mdToken token, HRESULT hr, LPCWSTR message) CorZapLogLevel level = CORZAP_LOGLEVEL_ERROR; + // Some warnings are demoted to informational level + if (resID == IDS_EE_SIMD_NGEN_DISALLOWED) + { + // Supress printing of "Target-dependent SIMD vector types may not be used with ngen." + level = CORZAP_LOGLEVEL_INFO; + } + if (m_zapper->m_pOpt->m_ignoreErrors) { #ifdef CROSSGEN_COMPILE // Warnings should not go to stderr during crossgen if (level == CORZAP_LOGLEVEL_ERROR) + { level = CORZAP_LOGLEVEL_WARNING; + } #endif m_zapper->Print(level, W("Warning: ")); } diff --git a/src/zap/zapimage.h b/src/zap/zapimage.h index f0bcbcb033..582c9a3e88 100644 --- a/src/zap/zapimage.h +++ b/src/zap/zapimage.h @@ -829,7 +829,7 @@ public: // Returns ZapImage virtual ZapImage * GetZapImage(); - void Error(mdToken token, HRESULT error, LPCWSTR message); + void Error(mdToken token, HRESULT error, UINT resID, LPCWSTR message); // Returns virtual section for EE datastructures ZapVirtualSection * GetSection(CorCompileSection section) |