[DWARF] Generate qualified names of functions if linkage names are missing.
Summary:
This is similar to the change introduced for variable DIEs in r233098. If the
linkage names of functions are missing in the DWARF, then their fully qualified
names (similar to the name that would be got by demangling their linkage name)
is generated using the decl context.
This change fixes TestNamespace when the test case is compiled with GCC, hence
it is enabled for GCC. The test and the test case are also enhanced to cover
variadic functions.
Test Plan: dotest.py -C <clang|gcc> -p TestNamespace
Reviewers: clayborg
Reviewed By: clayborg
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D8623
llvm-svn: 233336
diff --git a/lldb/test/lang/cpp/namespace/TestNamespace.py b/lldb/test/lang/cpp/namespace/TestNamespace.py
index e9f78e0..4e24926 100644
--- a/lldb/test/lang/cpp/namespace/TestNamespace.py
+++ b/lldb/test/lang/cpp/namespace/TestNamespace.py
@@ -21,7 +21,6 @@
self.namespace_variable_commands()
# rdar://problem/8668674
- @expectedFailureGcc # llvm.org/pr15302: lldb does not print 'anonymous namespace' when the inferior is built with GCC (4.7)
@dwarf_test
def test_with_dwarf_and_run_command(self):
"""Test that anonymous and named namespace variables display correctly."""
@@ -117,6 +116,9 @@
self.expect("p myanonfunc",
patterns = ['\(anonymous namespace\)::myanonfunc\(int\)'])
+ self.expect("p variadic_sum",
+ patterns = ['\(anonymous namespace\)::variadic_sum\(int, ...\)'])
+
if __name__ == '__main__':
import atexit
lldb.SBDebugger.Initialize()