Skip to content

Commit d6343e6

Browse files
committed
[lldb] Skip TestLimitDebugInfo on windows
The test does not work on windows, because clang will emit full type information for __declspec(dllexport) types even under -flimit-debug-info. __declspec(dllexport) is needed to be able to use the type across shared library boundaries on windows, which makes this a pretty good heuristic, but defeats the purpose of this test. I am going to create (in another patch) an basic assembly test, so that the relevant code gets at least some coverage on windows hosts. This also reverts commit 1276855, which added the __declspec annotations -- they are not necessary anymore, and they needlessly complicate the test.
1 parent db4d5f7 commit d6343e6

3 files changed

Lines changed: 7 additions & 16 deletions

File tree

‎lldb/test/API/functionalities/limit-debug-info/Makefile‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@ CFLAGS_EXTRAS = $(LIMIT_DEBUG_INFO_FLAGS)
22
LD_EXTRAS = -L. -lone -ltwo
33
CXX_SOURCES = main.cpp
44

5-
ONE_CXXFLAGS = $(LIMIT_DEBUG_INFO_FLAGS) -DIN_ONE
5+
ONE_CXXFLAGS = $(LIMIT_DEBUG_INFO_FLAGS)
66
ifdef STRIP_ONE
77
ONE_CXXFLAGS += -g0
88
endif
99

10-
TWO_CXXFLAGS = $(LIMIT_DEBUG_INFO_FLAGS) -DIN_TWO
10+
TWO_CXXFLAGS = $(LIMIT_DEBUG_INFO_FLAGS)
1111
ifdef STRIP_TWO
1212
TWO_CXXFLAGS += -g0
1313
endif

‎lldb/test/API/functionalities/limit-debug-info/TestLimitDebugInfo.py‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ def _check_debug_info_is_limited(self, target):
3131
self._check_type(target, "InheritsFromTwo")
3232

3333
@skipIf(bugnumber="pr46284", debug_info="gmodules")
34+
@skipIfWindows # Clang emits type info even with -flimit-debug-info
3435
def test_one_and_two_debug(self):
3536
self.build()
3637
target = self.dbg.CreateTarget(self.getBuildArtifact("a.out"))
@@ -49,6 +50,7 @@ def test_one_and_two_debug(self):
4950
self.expect_expr("inherits_from_two.two", result_value="242")
5051

5152
@skipIf(bugnumber="pr46284", debug_info="gmodules")
53+
@skipIfWindows # Clang emits type info even with -flimit-debug-info
5254
def test_two_debug(self):
5355
self.build(dictionary=dict(STRIP_ONE="1"))
5456
target = self.dbg.CreateTarget(self.getBuildArtifact("a.out"))
@@ -68,6 +70,7 @@ def test_two_debug(self):
6870
self.expect_expr("inherits_from_two.two", result_value="242")
6971

7072
@skipIf(bugnumber="pr46284", debug_info="gmodules")
73+
@skipIfWindows # Clang emits type info even with -flimit-debug-info
7174
def test_one_debug(self):
7275
self.build(dictionary=dict(STRIP_TWO="1"))
7376
target = self.dbg.CreateTarget(self.getBuildArtifact("a.out"))

‎lldb/test/API/functionalities/limit-debug-info/onetwo.h‎

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,10 @@
1-
#ifdef IN_ONE
2-
#define ONE_API LLDB_DYLIB_EXPORT
3-
#else
4-
#define ONE_API LLDB_DYLIB_IMPORT
5-
#endif
6-
7-
#ifdef IN_TWO
8-
#define TWO_API LLDB_DYLIB_EXPORT
9-
#else
10-
#define TWO_API LLDB_DYLIB_IMPORT
11-
#endif
12-
13-
struct ONE_API One {
1+
struct One {
142
int one = 142;
153
constexpr One() = default;
164
virtual ~One();
175
};
186

19-
struct TWO_API Two : One {
7+
struct Two : One {
208
int two = 242;
219
constexpr Two() = default;
2210
~Two() override;

0 commit comments

Comments
 (0)