[Lldb-commits] [lldb] [lldb][test] Fix simulator test for std::unique_ptr (PR #99357)

Leandro Lupori via lldb-commits lldb-commits at lists.llvm.org
Wed Jul 17 10:15:11 PDT 2024


https://github.com/luporl created https://github.com/llvm/llvm-project/pull/99357

libcxx-simulators/unique_ptr/main.cpp uses __builtin_printf, that
maps to printf on Windows. Include stdio.h to avoid linker errors
on Windows.
See https://lab.llvm.org/buildbot/#/builders/141/builds/853


>From 9d34bd13ee92b1bb1eacac522c6167cbf607f0fa Mon Sep 17 00:00:00 2001
From: Leandro Lupori <leandro.lupori at linaro.org>
Date: Wed, 17 Jul 2024 14:08:47 -0300
Subject: [PATCH] [lldb][test] Fix simulator test for std::unique_ptr

libcxx-simulators/unique_ptr/main.cpp uses __builtin_printf, that
maps to printf on Windows. Include stdio.h to avoid linker errors
on Windows.
See https://lab.llvm.org/buildbot/#/builders/141/builds/853
---
 .../data-formatter-stl/libcxx-simulators/unique_ptr/main.cpp    | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx-simulators/unique_ptr/main.cpp b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx-simulators/unique_ptr/main.cpp
index 08324e24f9cc4..a6bfaa3febebb 100644
--- a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx-simulators/unique_ptr/main.cpp
+++ b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx-simulators/unique_ptr/main.cpp
@@ -1,5 +1,7 @@
 #include <libcxx-simulators-common/compressed_pair.h>
 
+#include <stdio.h>
+
 namespace std {
 namespace __lldb {
 template <class _Tp> struct default_delete {



More information about the lldb-commits mailing list