RuntimePlatformAgnosticPch.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. //-------------------------------------------------------------------------------------------------------
  2. // Copyright (C) Microsoft. All rights reserved.
  3. // Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
  4. //-------------------------------------------------------------------------------------------------------
  5. #pragma once
  6. #ifdef _WIN32
  7. #include "CommonMin.h"
  8. #else
  9. #include "pal.h"
  10. #endif
  11. #ifdef _MSC_VER
  12. #pragma warning(push)
  13. #if defined(PROFILE_RECYCLER_ALLOC) || defined(HEAP_TRACK_ALLOC) || defined(ENABLE_DEBUG_CONFIG_OPTIONS)
  14. #ifdef _UCRT
  15. #include <typeinfo>
  16. #else
  17. #include <typeinfo.h>
  18. #endif
  19. #endif
  20. #pragma warning(pop)
  21. #endif
  22. // Minimal definitions to use AssertMsg in the PAL
  23. #ifndef _WIN32
  24. #define DbgRaiseAssertionFailure() __builtin_trap()
  25. #define __analysis_assume(x)
  26. #define __in
  27. #define __inout
  28. #ifndef USE_ICU
  29. #ifndef TRUE
  30. #define TRUE 1
  31. #endif
  32. #ifndef FALSE
  33. #define FALSE 0
  34. #endif
  35. #else
  36. #define U_USING_ICU_NAMESPACE 0
  37. #include <unicode/umachine.h>
  38. #endif
  39. namespace Js
  40. {
  41. class Throw
  42. {
  43. public:
  44. static bool ReportAssert(const char* fileName, unsigned int lineNumber, const char* error, const char* message);
  45. static void LogAssert();
  46. static void __declspec(noreturn) FatalInternalError();
  47. };
  48. }
  49. #include <Core/Assertions.h>
  50. #endif