From 74207ad7ba6115000911a7d6183c02177bdd8feb Mon Sep 17 00:00:00 2001 From: Pavel Labath Date: Wed, 12 Apr 2017 10:13:50 +0000 Subject: [PATCH] Fix TestGuessLanguage for gcc gcc emits DW_LANG_C89 even if we specify -std=c99 during compilation. Since this isn't an lldb bug, but just the way the compiler happens to be implemented, I teach the test to expect this situation correctly. llvm-svn: 300046 --- .../test/functionalities/frame-language/TestGuessLanguage.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/frame-language/TestGuessLanguage.py b/lldb/packages/Python/lldbsuite/test/functionalities/frame-language/TestGuessLanguage.py index 7aa3e29..178e165 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/frame-language/TestGuessLanguage.py +++ b/lldb/packages/Python/lldbsuite/test/functionalities/frame-language/TestGuessLanguage.py @@ -73,7 +73,13 @@ class TestFrameGuessLanguage(TestBase): self.assertTrue(breakpoint.GetHitCount() == 1) thread = threads[0] - self.check_language(thread, 0, lldb.eLanguageTypeC99) + + c_frame_language = lldb.eLanguageTypeC99 + # gcc emits DW_LANG_C89 even if -std=c99 was specified + if "gcc" in self.getCompiler(): + c_frame_language = lldb.eLanguageTypeC89 + + self.check_language(thread, 0, c_frame_language) self.check_language(thread, 1, lldb.eLanguageTypeC_plus_plus) self.check_language(thread, 2, lldb.eLanguageTypeC_plus_plus) -- 2.7.4