[clang] Headers: prefer `corecrt_malloc.h` to `malloc.h` (PR #131668)
Saleem Abdulrasool via cfe-commits
cfe-commits at lists.llvm.org
Mon Mar 17 13:32:21 PDT 2025
https://github.com/compnerd created https://github.com/llvm/llvm-project/pull/131668
This allows us to target a lower level library (corecrt) rather than the higher level library (ucrt) which can be helpful in mordularising the SDK.
>From f8dea4c8a85c018a3c7ef5eadd00f2da96fe1737 Mon Sep 17 00:00:00 2001
From: Saleem Abdulrasool <abdulras at thebrowser.company>
Date: Mon, 17 Mar 2025 13:31:05 -0700
Subject: [PATCH] Headers: prefer `corecrt_malloc.h` to `malloc.h`
This allows us to target a lower level library (corecrt) rather than the
higher level library (ucrt) which can be helpful in mordularising the
SDK.
---
clang/lib/Headers/mm_malloc.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/clang/lib/Headers/mm_malloc.h b/clang/lib/Headers/mm_malloc.h
index d32fe59416277..4052995fff5cd 100644
--- a/clang/lib/Headers/mm_malloc.h
+++ b/clang/lib/Headers/mm_malloc.h
@@ -13,7 +13,7 @@
#include <stdlib.h>
#ifdef _WIN32
-#include <malloc.h>
+#include <corecrt_malloc.h>
#else
#ifndef __cplusplus
extern int posix_memalign(void **__memptr, size_t __alignment, size_t __size);
More information about the cfe-commits
mailing list