Author: Pavel Labath Date: 2020-07-02T14:34:33+02:00 New Revision: d6343e607ac8fa71fa6d99f9c86369ae9e66e671
URL: https://github.com/llvm/llvm-project/commit/d6343e607ac8fa71fa6d99f9c86369ae9e66e671 DIFF: https://github.com/llvm/llvm-project/commit/d6343e607ac8fa71fa6d99f9c86369ae9e66e671.diff LOG: [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 1276855f2b4485ec312b379c1b8eaf5510d9b157, which added the __declspec annotations -- they are not necessary anymore, and they needlessly complicate the test. Added: Modified: lldb/test/API/functionalities/limit-debug-info/Makefile lldb/test/API/functionalities/limit-debug-info/TestLimitDebugInfo.py lldb/test/API/functionalities/limit-debug-info/onetwo.h Removed: ################################################################################ diff --git a/lldb/test/API/functionalities/limit-debug-info/Makefile b/lldb/test/API/functionalities/limit-debug-info/Makefile index 400f76e29e1a..874b3a15e0fe 100644 --- a/lldb/test/API/functionalities/limit-debug-info/Makefile +++ b/lldb/test/API/functionalities/limit-debug-info/Makefile @@ -2,12 +2,12 @@ CFLAGS_EXTRAS = $(LIMIT_DEBUG_INFO_FLAGS) LD_EXTRAS = -L. -lone -ltwo CXX_SOURCES = main.cpp -ONE_CXXFLAGS = $(LIMIT_DEBUG_INFO_FLAGS) -DIN_ONE +ONE_CXXFLAGS = $(LIMIT_DEBUG_INFO_FLAGS) ifdef STRIP_ONE ONE_CXXFLAGS += -g0 endif -TWO_CXXFLAGS = $(LIMIT_DEBUG_INFO_FLAGS) -DIN_TWO +TWO_CXXFLAGS = $(LIMIT_DEBUG_INFO_FLAGS) ifdef STRIP_TWO TWO_CXXFLAGS += -g0 endif diff --git a/lldb/test/API/functionalities/limit-debug-info/TestLimitDebugInfo.py b/lldb/test/API/functionalities/limit-debug-info/TestLimitDebugInfo.py index 48d32958388c..d22aeaace7bf 100644 --- a/lldb/test/API/functionalities/limit-debug-info/TestLimitDebugInfo.py +++ b/lldb/test/API/functionalities/limit-debug-info/TestLimitDebugInfo.py @@ -31,6 +31,7 @@ def _check_debug_info_is_limited(self, target): self._check_type(target, "InheritsFromTwo") @skipIf(bugnumber="pr46284", debug_info="gmodules") + @skipIfWindows # Clang emits type info even with -flimit-debug-info def test_one_and_two_debug(self): self.build() target = self.dbg.CreateTarget(self.getBuildArtifact("a.out")) @@ -49,6 +50,7 @@ def test_one_and_two_debug(self): self.expect_expr("inherits_from_two.two", result_value="242") @skipIf(bugnumber="pr46284", debug_info="gmodules") + @skipIfWindows # Clang emits type info even with -flimit-debug-info def test_two_debug(self): self.build(dictionary=dict(STRIP_ONE="1")) target = self.dbg.CreateTarget(self.getBuildArtifact("a.out")) @@ -68,6 +70,7 @@ def test_two_debug(self): self.expect_expr("inherits_from_two.two", result_value="242") @skipIf(bugnumber="pr46284", debug_info="gmodules") + @skipIfWindows # Clang emits type info even with -flimit-debug-info def test_one_debug(self): self.build(dictionary=dict(STRIP_TWO="1")) target = self.dbg.CreateTarget(self.getBuildArtifact("a.out")) diff --git a/lldb/test/API/functionalities/limit-debug-info/onetwo.h b/lldb/test/API/functionalities/limit-debug-info/onetwo.h index 602a88c58eeb..82df76c64b58 100644 --- a/lldb/test/API/functionalities/limit-debug-info/onetwo.h +++ b/lldb/test/API/functionalities/limit-debug-info/onetwo.h @@ -1,22 +1,10 @@ -#ifdef IN_ONE -#define ONE_API LLDB_DYLIB_EXPORT -#else -#define ONE_API LLDB_DYLIB_IMPORT -#endif - -#ifdef IN_TWO -#define TWO_API LLDB_DYLIB_EXPORT -#else -#define TWO_API LLDB_DYLIB_IMPORT -#endif - -struct ONE_API One { +struct One { int one = 142; constexpr One() = default; virtual ~One(); }; -struct TWO_API Two : One { +struct Two : One { int two = 242; constexpr Two() = default; ~Two() override; _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits