Commit 5f97981e authored by Sebastien Marchand's avatar Sebastien Marchand Committed by Chromium LUCI CQ

ifdef-out IsRunning32bitEmulatedOnArm64 in non PA-E builds

This function is only used from some code behind a similar ifdef, so it
results in some unused function warnings if we don't also ifdef this
function.

See https://ci.chromium.org/ui/p/chrome/builders/official/win-clang/2092/overview
for an example of how this fails:
../../base/allocator/allocator_shim_default_dispatch_to_partition_alloc.cc(120,6): error: unused function 'IsRunning32bitEmulatedOnArm64' [-Werror,-Wunused-function]
bool IsRunning32bitEmulatedOnArm64() {
^

Bug: 1121427
Change-Id: I14ff07fce431fd4aa52fd197c59d70df0237ad20
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2615327Reviewed-by: default avatarWill Harris <wfh@chromium.org>
Commit-Queue: Sébastien Marchand <sebmarchand@chromium.org>
Cr-Commit-Position: refs/heads/master@{#841260}
parent 1260858e
......@@ -5,6 +5,7 @@
#include "base/allocator/allocator_shim_default_dispatch_to_partition_alloc.h"
#include "base/allocator/allocator_shim_internals.h"
#include "base/allocator/buildflags.h"
#include "base/allocator/partition_allocator/memory_reclaimer.h"
#include "base/allocator/partition_allocator/partition_alloc.h"
#include "base/allocator/partition_allocator/partition_alloc_constants.h"
......@@ -117,6 +118,7 @@ base::ThreadSafePartitionRoot* AlignedAllocator() {
}
#if defined(OS_WIN) && defined(ARCH_CPU_X86)
#if BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC)
bool IsRunning32bitEmulatedOnArm64() {
using IsWow64Process2Function = decltype(&IsWow64Process2);
......@@ -135,6 +137,7 @@ bool IsRunning32bitEmulatedOnArm64() {
return true;
return false;
}
#endif // BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC)
// The number of bytes to add to every allocation. Ordinarily zero, but set to 8
// when emulating an x86 on ARM64 to avoid a bug in the Windows x86 emulator.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment