[PATCH] D139864: [AIX] Demangle the name prefix with '.' in AIX OS for llvm-cxxfilt

Stephen Peckham via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 10 11:58:05 PST 2023


stephenpeckham added inline comments.


================
Comment at: llvm/tools/llvm-cxxfilt/llvm-cxxfilt.cpp:72
+  // In XCOFF, Function entry lable begin with '.'.
+  if (Triple(sys::getProcessTriple()).isOSBinFormatXCOFF() && DecoratedStr[0] == '.') {
+    ++DecoratedStr;
----------------
Wouldn't it make more sense to introduce a StripDot variable similar to StripUnderscore?


================
Comment at: llvm/tools/llvm-cxxfilt/llvm-cxxfilt.cpp:84
+    return DotPrefix + Result;
 
   std::string Prefix;
----------------
I'm not sure I understand the interaction of all the options and demangling methods, but if nonMicrosoftDemangle() returns false, maybe the potential leading dot should be restored for the rest of this function.


================
Comment at: llvm/tools/llvm-cxxfilt/llvm-cxxfilt.cpp:180
     StripUnderscore = Triple(sys::getProcessTriple()).isOSBinFormatMachO();
 
   Types = Args.hasArg(OPT_types);
----------------
Set StripDot here if appropriate


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D139864/new/

https://reviews.llvm.org/D139864



More information about the llvm-commits mailing list