Define V8_COMPILER_IS_MSVC before first use.

In https://crrev.com/c/3764190, V8_COMPILER_IS_MSVC gets used before it
is defined, so it has no effect. Move the V8_COMPILER_IS_MSVC define up
to fix this.

Change-Id: I94c63ad2a8a7555c85730792c1f91e1285a9b77f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3774095
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82090}
This commit is contained in:
Lei Zhang 2022-07-19 11:58:48 -07:00 committed by V8 LUCI CQ
parent 614dbbff2f
commit 6f7d3bedb1

View File

@ -15,13 +15,6 @@
#include "src/snapshot/embedded/embedded-file-writer.h"
#endif // V8_OS_WIN64
#if defined(V8_COMPILER_IS_MSVC)
#include "src/flags/flags.h"
#endif
namespace v8 {
namespace internal {
// V8_CC_MSVC is true for both MSVC and clang on windows. clang can handle
// __asm__-style inline assembly but MSVC cannot, and thus we need a more
// precise compiler detection that can distinguish between the two. clang on
@ -30,6 +23,13 @@ namespace internal {
#define V8_COMPILER_IS_MSVC
#endif
#if defined(V8_COMPILER_IS_MSVC)
#include "src/flags/flags.h"
#endif
namespace v8 {
namespace internal {
// MSVC uses MASM for x86 and x64, while it has a ARMASM for ARM32 and
// ARMASM64 for ARM64. Since ARMASM and ARMASM64 accept a slightly tweaked
// version of ARM assembly language, they are referred to together in Visual