summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--llvm/lib/DebugInfo/Symbolize/Symbolize.cpp6
-rw-r--r--llvm/test/DebugInfo/llvm-symbolizer.test2
2 files changed, 5 insertions, 3 deletions
diff --git a/llvm/lib/DebugInfo/Symbolize/Symbolize.cpp b/llvm/lib/DebugInfo/Symbolize/Symbolize.cpp
index 303b6d4236a..6c81ec63283 100644
--- a/llvm/lib/DebugInfo/Symbolize/Symbolize.cpp
+++ b/llvm/lib/DebugInfo/Symbolize/Symbolize.cpp
@@ -209,7 +209,8 @@ DILineInfo ModuleInfo::symbolizeCode(
ModuleOffset, getDILineInfoSpecifier(Opts));
}
// Override function name from symbol table if necessary.
- if (Opts.PrintFunctions != FunctionNameKind::None && Opts.UseSymbolTable) {
+ if (Opts.PrintFunctions == FunctionNameKind::LinkageName &&
+ Opts.UseSymbolTable) {
std::string FunctionName;
uint64_t Start, Size;
if (getNameFromSymbolTable(SymbolRef::ST_Function, ModuleOffset,
@@ -233,7 +234,8 @@ DIInliningInfo ModuleInfo::symbolizeInlinedCode(
InlinedContext.addFrame(DILineInfo());
}
// Override the function name in lower frame with name from symbol table.
- if (Opts.PrintFunctions != FunctionNameKind::None && Opts.UseSymbolTable) {
+ if (Opts.PrintFunctions == FunctionNameKind::LinkageName &&
+ Opts.UseSymbolTable) {
DIInliningInfo PatchedInlinedContext;
for (uint32_t i = 0, n = InlinedContext.getNumberOfFrames(); i < n; i++) {
DILineInfo LineInfo = InlinedContext.getFrame(i);
diff --git a/llvm/test/DebugInfo/llvm-symbolizer.test b/llvm/test/DebugInfo/llvm-symbolizer.test
index 8a2aaaab3a3..69619b0261d 100644
--- a/llvm/test/DebugInfo/llvm-symbolizer.test
+++ b/llvm/test/DebugInfo/llvm-symbolizer.test
@@ -154,7 +154,7 @@ RUN: | FileCheck %s --check-prefix=STRIPPED
STRIPPED: global_func
RUN: echo "%p/Inputs/dwarfdump-test4.elf-x86-64 0x62c" > %t.input7
-RUN: llvm-symbolizer --functions=short --use-symbol-table=false --demangle=false < %t.input7 \
+RUN: llvm-symbolizer --functions=short --demangle=false < %t.input7 \
RUN: | FileCheck %s --check-prefix=SHORT_FUNCTION_NAME
SHORT_FUNCTION_NAME-NOT: _Z1cv
OpenPOWER on IntegriCloud