[PATCH] [llvm-symbolizer] Respect the demangling option, and and -relative-address

Alexey Samsonov vonosmas at gmail.com
Fri May 1 16:49:31 PDT 2015


LGTM (after simplification suggested below).


================
Comment at: lib/DebugInfo/PDB/PDBContext.cpp:53
@@ -47,6 +52,3 @@
   DILineInfo Result;
-  if (auto Func = dyn_cast_or_null<PDBSymbolFunc>(Symbol.get())) {
-    if (Specifier.FNKind == DINameKind::LinkageName)
-      Result.FunctionName = Func->getUndecoratedName();
-    else if (Specifier.FNKind == DINameKind::ShortName)
-      Result.FunctionName = Func->getName();
+  if (Specifier.FNKind != DINameKind::None) {
+    std::string FunctionName;
----------------
Please move it to a separate function
  std::string getFunctionName(uint64_t Address, PDBSymbol *FnSymbol, DINameKind NameKind);
with a bunch of early-returns, and just do
  Result.FunctionName = getFunctionName(Address, Symbol.get(), Specifier.FNKind);

http://reviews.llvm.org/D9447

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list