[PATCH] D56855: Add ___Z demangling to new common demangle function
    George Rimar via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Fri Jan 18 02:28:59 PST 2019
    
    
  
grimar added a comment.
minor nit:
================
Comment at: lib/Demangle/Demangle.cpp:19
+  if (MangledName.compare(0, 2, "_Z") == 0 ||
+      MangledName.compare(0, 4, "___Z") == 0)
     Demangled = itaniumDemangle(MangledName.c_str(), nullptr, nullptr, nullptr);
----------------
I wonder if
```
MangledName.compare(0, string::npos, "___Z")
```
 
would be a bit more readable way here?
("A value of string::npos indicates all characters until the end of the string.",
http://www.cplusplus.com/reference/string/string/compare/)
Repository:
  rL LLVM
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D56855/new/
https://reviews.llvm.org/D56855
    
    
More information about the llvm-commits
mailing list