diff options
author | Bruce Forstall <brucefo@microsoft.com> | 2021-05-12 19:36:19 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-12 19:36:19 +0300 |
commit | 72e2c89e10086543954c3424b5fa3ad0cfb135d0 (patch) | |
tree | a2f44580fb77578514e80d2165835c9fa63498c1 /src/coreclr/inc | |
parent | 5297337e5b7db9feef81f612f3d4e70128c7fa55 (diff) |
Introduce enum for BasicBlock and loop flags (#52410)
* Introduce enum for BasicBlock and loop flags
This gives a better debugging experience in Visual Studio. It
also improves type checking: there were a few places still using
`unsigned` instead of `unsigned __int64` when manipulating
BasicBlock flags.
* Make sure debugreturn and contracts are disabled for the JIT build
* Convert GenTree flags, debug flags, and call flags to enums
* Remove bad GT_HWINTRINSIC copy/paste code from GenTree::GetRegSpillFlagByIdx
Diffstat (limited to 'src/coreclr/inc')
-rw-r--r-- | src/coreclr/inc/contract.h | 2 | ||||
-rw-r--r-- | src/coreclr/inc/debugreturn.h | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/coreclr/inc/contract.h b/src/coreclr/inc/contract.h index a50c09ed322..997f12b0b6a 100644 --- a/src/coreclr/inc/contract.h +++ b/src/coreclr/inc/contract.h @@ -217,7 +217,7 @@ // We only enable contracts in _DEBUG builds -#if defined(_DEBUG) && !defined(DISABLE_CONTRACTS) +#if defined(_DEBUG) && !defined(DISABLE_CONTRACTS) && !defined(JIT_BUILD) #define ENABLE_CONTRACTS_DATA #endif diff --git a/src/coreclr/inc/debugreturn.h b/src/coreclr/inc/debugreturn.h index 00c30b62ca6..d052364ff89 100644 --- a/src/coreclr/inc/debugreturn.h +++ b/src/coreclr/inc/debugreturn.h @@ -30,7 +30,7 @@ // earlier because those builds only support C++11 constexpr, which doesn't allow the // use of 'if' statements within the body of a constexpr function. Later builds support // C++14 constexpr. -#if defined(_DEBUG) && (!defined(_MSC_FULL_VER) || _MSC_FULL_VER > 190024315) +#if defined(_DEBUG) && !defined(JIT_BUILD) && (!defined(_MSC_FULL_VER) || _MSC_FULL_VER > 190024315) // Code to generate a compile-time error if return statements appear where they // shouldn't. @@ -107,7 +107,7 @@ typedef __SafeToReturn __ReturnOK; #define DEBUG_OK_TO_RETURN_BEGIN(arg) { typedef __SafeToReturn __ReturnOK; if (0 && __ReturnOK::used()) { } else { #define DEBUG_OK_TO_RETURN_END(arg) } } -#else // defined(_DEBUG) && (!defined(_MSC_FULL_VER) || _MSC_FULL_VER > 190024315) +#else // defined(_DEBUG) && !defined(JIT_BUILD) && (!defined(_MSC_FULL_VER) || _MSC_FULL_VER > 190024315) #define DEBUG_ASSURE_SAFE_TO_RETURN TRUE @@ -117,7 +117,7 @@ typedef __SafeToReturn __ReturnOK; #define DEBUG_OK_TO_RETURN_BEGIN(arg) { #define DEBUG_OK_TO_RETURN_END(arg) } -#endif // defined(_DEBUG) && (!defined(_MSC_FULL_VER) || _MSC_FULL_VER > 190024315) +#endif // defined(_DEBUG) && !defined(JIT_BUILD) && (!defined(_MSC_FULL_VER) || _MSC_FULL_VER > 190024315) #endif // !_PREFAST_ |