[llvm] e93f771 - adds `<cstdlib>` to `ProgramStack.cpp` (#194249)

via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 28 11:55:15 PDT 2026


Author: Christopher Di Bella
Date: 2026-04-29T02:55:10+08:00
New Revision: e93f771dc2f75f999616290c68c13c2a17a688ed

URL: https://github.com/llvm/llvm-project/commit/e93f771dc2f75f999616290c68c13c2a17a688ed
DIFF: https://github.com/llvm/llvm-project/commit/e93f771dc2f75f999616290c68c13c2a17a688ed.diff

LOG: adds `<cstdlib>` to `ProgramStack.cpp` (#194249)

Building `LLVMSupport` with libc++ causes Clang to error because
`malloc` and `free` aren't declared before they're used in
`ProgramStack.cpp`.

Added: 
    

Modified: 
    llvm/lib/Support/ProgramStack.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Support/ProgramStack.cpp b/llvm/lib/Support/ProgramStack.cpp
index e48265afb93fd..1f234ab5875ab 100644
--- a/llvm/lib/Support/ProgramStack.cpp
+++ b/llvm/lib/Support/ProgramStack.cpp
@@ -20,6 +20,8 @@
 
 #include "llvm/Support/thread.h"
 
+#include <cstdlib>
+
 using namespace llvm;
 
 uintptr_t llvm::getStackPointer() {


        


More information about the llvm-commits mailing list