Skip to content

Commit ab42729

Browse files
author
git apple-llvm automerger
committed
Merge commit '2959051e655a' from llvm.org/main into next
2 parents 5436ada + 2959051 commit ab42729

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2627,7 +2627,9 @@ Function *DWARFASTParserClang::ParseFunctionFromDWARF(
26272627
// If the mangled name is not present in the DWARF, generate the
26282628
// demangled name using the decl context. We skip if the function is
26292629
// "main" as its name is never mangled.
2630-
func_name.SetValue(ConstructDemangledNameFromDWARF(die));
2630+
func_name.SetDemangledName(ConstructDemangledNameFromDWARF(die));
2631+
// Ensure symbol is preserved (as the mangled name).
2632+
func_name.SetMangledName(ConstString(name));
26312633
} else
26322634
func_name.SetValue(ConstString(name));
26332635

lldb/test/API/lang/cpp/extern_c/main.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,10 @@ extern "C"
88

99
int foo()
1010
{
11-
puts("foo");
12-
return 2;
11+
puts("foo"); //% self.expect("image lookup -va $pc",
12+
//% substrs=[' name = "::foo()"',
13+
//% ' mangled = "foo"'])
14+
return 2;
1315
}
1416

1517
int main (int argc, char const *argv[], char const *envp[])

lldb/test/Shell/SymbolFile/DWARF/x86/debug-types-address-ranges.s

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
# RUN: %lldb %t -o "image lookup -a 0x48000 -v" -o exit | FileCheck %s
1212

1313
# CHECK: CompileUnit: id = {0x00000001}, file = "/tmp/a.cc", language = "c++"
14-
# CHECK: Function: id = {0x0000006a}, name = "::_start({{.*}})", range = [0x0000000000048000-0x000000000004800c)
14+
# CHECK: Function: id = {0x0000006a}, name = "::_start({{.*}})", mangled = "_start", range = [0x0000000000048000-0x000000000004800c)
1515
# CHECK: LineEntry: [0x0000000000048000-0x000000000004800a): /tmp/a.cc:4
1616
# CHECK: Symbol: id = {0x00000002}, range = [0x0000000000048000-0x000000000004800c), name="_start"
1717
# CHECK: Variable: id = {0x00000075}, name = "v1", {{.*}} decl = a.cc:4

0 commit comments

Comments
 (0)