[libc] Fix warnings for freelist_heap_test/fuzz (#136634)

Fixes #122367
This commit is contained in:
Daniel Thornburgh
2025-04-22 11:11:31 -07:00
committed by GitHub
parent 7c4cb0e836
commit 710ffb69bf
6 changed files with 18 additions and 32 deletions

View File

@@ -30,7 +30,6 @@ if(LLVM_LIBC_FULL_BUILD AND NOT LIBC_TARGET_OS_IS_GPU)
add_libc_fuzzer(
freelist_heap_fuzz
SRCS
fake_heap.s
freelist_heap_fuzz.cpp
DEPENDS
libc.src.__support.freelist_heap

View File

@@ -1,15 +0,0 @@
//===-- Test fake definition for heap symbols -----------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
.globl _end, __llvm_libc_heap_limit
.bss
_end:
.fill 1024
__llvm_libc_heap_limit:

View File

@@ -17,6 +17,15 @@
#include "src/string/memory_utils/inline_memmove.h"
#include "src/string/memory_utils/inline_memset.h"
asm(R"(
.globl _end, __llvm_libc_heap_limit
.bss
_end:
.fill 1024
__llvm_libc_heap_limit:
)";
using LIBC_NAMESPACE::FreeListHeap;
using LIBC_NAMESPACE::inline_memset;
using LIBC_NAMESPACE::cpp::nullopt;

View File

@@ -63,7 +63,6 @@ if(LLVM_LIBC_FULL_BUILD AND NOT LIBC_TARGET_OS_IS_GPU)
SUITE
libc-support-tests
SRCS
fake_heap.s
freelist_heap_test.cpp
DEPENDS
libc.src.__support.CPP.span

View File

@@ -1,15 +0,0 @@
//===-- Test fake definition for heap symbols -----------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
.globl _end, __llvm_libc_heap_limit
.bss
_end:
.fill 1024
__llvm_libc_heap_limit:

View File

@@ -13,6 +13,15 @@
#include "src/string/memcpy.h"
#include "test/UnitTest/Test.h"
asm(R"(
.globl _end, __llvm_libc_heap_limit
.bss
_end:
.fill 1024
__llvm_libc_heap_limit:
)");
using LIBC_NAMESPACE::Block;
using LIBC_NAMESPACE::freelist_heap;
using LIBC_NAMESPACE::FreeListHeap;