-
Notifications
You must be signed in to change notification settings - Fork 14.4k
[lldb][test] Move std::function from libcxx to generic directory #147701
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Michael137
wants to merge
2
commits into
llvm:main
Choose a base branch
from
Michael137:lldb/consolidate-stl-tests-function
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
[lldb][test] Move std::function from libcxx to generic directory #147701
Michael137
wants to merge
2
commits into
llvm:main
from
Michael137:lldb/consolidate-stl-tests-function
+51
−59
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@llvm/pr-subscribers-lldb Author: Michael Buch (Michael137) ChangesThis just moves the test from Split out from #146740 Full diff: https://github.com/llvm/llvm-project/pull/147701.diff 3 Files Affected:
diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/function/Makefile b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/function/Makefile
similarity index 51%
rename from lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/function/Makefile
rename to lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/function/Makefile
index b016f006747da..99998b20bcb05 100644
--- a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/function/Makefile
+++ b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/function/Makefile
@@ -1,5 +1,3 @@
CXX_SOURCES := main.cpp
-CXXFLAGS_EXTRAS := -std=c++11
-USE_LIBCPP := 1
include Makefile.rules
diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/function/TestLibCxxFunction.py b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/function/TestDataFormatterStdFunction.py
similarity index 92%
rename from lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/function/TestLibCxxFunction.py
rename to lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/function/TestDataFormatterStdFunction.py
index 80461b996328f..64d704c07c0ae 100644
--- a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/function/TestLibCxxFunction.py
+++ b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/function/TestDataFormatterStdFunction.py
@@ -2,14 +2,13 @@
Test lldb data formatter subsystem.
"""
-
import lldb
from lldbsuite.test.decorators import *
from lldbsuite.test.lldbtest import *
from lldbsuite.test import lldbutil
-class LibCxxFunctionTestCase(TestBase):
+class StdFunctionTestCase(TestBase):
# Run frame var for a variable twice. Verify we do not hit the cache
# the first time but do the second time.
def run_frame_var_check_cache_use(
@@ -34,10 +33,8 @@ def run_frame_var_check_cache_use(
substrs=["lldb_private::CompileUnit::FindFunction"],
)
- @add_test_categories(["libc++"])
- def test(self):
- """Test that std::function as defined by libc++ is correctly printed by LLDB"""
- self.build()
+ def do_test(self):
+ """Test that std::function is correctly printed by LLDB"""
self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
bkpt = self.target().FindBreakpointByID(
@@ -82,3 +79,8 @@ def test(self):
self.expect(
"frame variable f5", substrs=["f5 = Function = Bar::add_num(int) const"]
)
+
+ @add_test_categories(["libc++"])
+ def test_libcxx(self):
+ self.build(dictionary={"USE_LIBCPP": 1})
+ self.do_test()
diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/function/main.cpp b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/function/main.cpp
similarity index 100%
rename from lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/function/main.cpp
rename to lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/function/main.cpp
|
✅ With the latest revision this PR passed the C/C++ code formatter. |
labath
approved these changes
Jul 9, 2025
This just moves the test from `libcxx` to `generic`. There are currently no `std::function` formatters for libstdc++ so I didn't add a test-case for it. Split out from llvm#146740
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This just moves the test from
libcxx
togeneric
. There are currently nostd::function
formatters for libstdc++ so I didn't add a test-case for it.Split out from #146740