summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/functionalities/frame-language/TestGuessLanguage.py
diff options
context:
space:
mode:
authorPavel Labath <labath@google.com>2017-04-12 10:13:50 +0000
committerPavel Labath <labath@google.com>2017-04-12 10:13:50 +0000
commit74207ad7ba6115000911a7d6183c02177bdd8feb (patch)
tree56df8fcd327448b3de1d106555c3ef0543fa369a /lldb/packages/Python/lldbsuite/test/functionalities/frame-language/TestGuessLanguage.py
parentefe4e412ad3609a9cefaaee6584aaa34b9e64826 (diff)
downloadbcm5719-llvm-74207ad7ba6115000911a7d6183c02177bdd8feb.tar.gz
bcm5719-llvm-74207ad7ba6115000911a7d6183c02177bdd8feb.zip
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
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/functionalities/frame-language/TestGuessLanguage.py')
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/frame-language/TestGuessLanguage.py8
1 files changed, 7 insertions, 1 deletions
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 7aa3e29af55..178e165f3cb 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)
OpenPOWER on IntegriCloud