[PATCH] D21930: [ELF] - Implement extern "c++" version script tag

George Rimar via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 4 01:46:42 PDT 2016

grimar added inline comments.

Comment at: ELF/SymbolTable.cpp:564
@@ -563,4 +563,3 @@
-// This function processes the --version-script option by marking all global
-// symbols with the VersionScriptGlobal flag, which acts as a filter on the
-// dynamic symbol table.
+static std::string demangleCpp(StringRef Name) {
+#if !defined(HAVE_CXXABI_H)
ruiu wrote:
> We already have `elf::demangle` function.
Sure we have it, but it will not work here I think. At least it has 2 conditions that we don't want to see here:

  if (!Config->Demangle)
    return Name;

  // __cxa_demangle can be used to demangle strings other than symbol
  // names which do not necessarily start with "_Z". Name can be
  // either a C or C++ symbol. Don't call __cxa_demangle if the name
  // does not look like a C++ symbol name to avoid getting unexpected
  // result for a C symbol that happens to match a mangled type name.
  if (!Name.startswith("_Z"))
    return Name;


More information about the llvm-commits mailing list